Class AbstractProfile

java.lang.Object
org.apache.jena.ontology.impl.AbstractProfile
All Implemented Interfaces:
Profile
Direct Known Subclasses:
OWLProfile, RDFSProfile

public abstract class AbstractProfile extends Object implements Profile

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

  • Constructor Details

    • AbstractProfile

      public AbstractProfile()
  • Method Details

    • hasAliasFor

      public boolean hasAliasFor(Resource res)

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

      Specified by:
      hasAliasFor in interface Profile
      Parameters:
      res - A resource (including properties) to test for an alias
      Returns:
      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
      Parameters:
      res - A resource (including properties) to test for an alias
      Returns:
      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 Iterator<Resource> listAliasesFor(Resource res)

      Answer an iterator over the defined aliases for a resource.

      Specified by:
      listAliasesFor in interface Profile
      Parameters:
      res - A resource (including properties)
      Returns:
      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.
      Parameters:
      g - an enhanced graph to search for triples
      n - some node
      p - a property containing a predicate node
      Returns:
      true iff the graph contains (n, p, X) for some X