Class AbstractProfile

  • All Implemented Interfaces:
    Direct Known Subclasses:
    OWLProfile, RDFSProfile

    public abstract class AbstractProfile
    extends java.lang.Object
    implements Profile

    Abstract base class to provide shared implementation for ontology language profiles.

    • Constructor Detail

      • AbstractProfile

        public AbstractProfile()
    • Method Detail

      • hasAliasFor

        public boolean hasAliasFor​(Resource res)

        Answer true if the given resource has an alias in this profile.

        Specified by:
        hasAliasFor in interface Profile
        res - A resource (including properties) to test for an alias
        True if there is an alias for res
      • getAliasFor

        public Resource getAliasFor​(Resource res)

        Answer an alias for the given resource. If there is more than one such alias, a choice is made non-deterministically between the alternatives.

        Specified by:
        getAliasFor in interface Profile
        res - A resource (including properties) to test for an alias
        The alias for res, or one of the aliases for res if more than one is defined, or null if no alias is defined for res.
      • listAliasesFor

        public java.util.Iterator<Resource> listAliasesFor​(Resource res)

        Answer an iterator over the defined aliases for a resource.

        Specified by:
        listAliasesFor in interface Profile
        res - A resource (including properties)
        An iterator over the aliases for res. If there are no aliases, the empty iterator is returned.
      • containsSome

        public static boolean containsSome​(EnhGraph g,
                                           Node n,
                                           Property p)
        Utility method: answer true iff the enhanced graph contains some triple which has n as subject, p.asNode() as predicate, and any object.
        g - an enhanced graph to search for triples
        n - some node
        p - a property containing a predicate node
        true iff the graph contains (n, p, X) for some X