Package org.apache.jena.ontology.impl
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 java.lang.Object implements Profile
Abstract base class to provide shared implementation for ontology language profiles.
-
-
Constructor Summary
Constructors Constructor Description AbstractProfile()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.Resource
getAliasFor(Resource res)
Answer an alias for the given resource.boolean
hasAliasFor(Resource res)
Answer true if the given resource has an alias in this profile.java.util.Iterator<Resource>
listAliasesFor(Resource res)
Answer an iterator over the defined aliases for a resource.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jena.ontology.Profile
ALL_DIFFERENT, ALL_VALUES_FROM, ANNOTATION_PROPERTY, BACKWARD_COMPATIBLE_WITH, CARDINALITY, CARDINALITY_Q, CLASS, COMMENT, COMPLEMENT_OF, DATARANGE, DATATYPE_PROPERTY, DEPRECATED_CLASS, DEPRECATED_PROPERTY, DIFFERENT_FROM, DISJOINT_WITH, DISTINCT_MEMBERS, DOMAIN, EQUIVALENT_CLASS, EQUIVALENT_PROPERTY, FIRST, FUNCTIONAL_PROPERTY, getAnnotationProperties, getAxiomTypes, getClassDescriptionTypes, getLabel, HAS_CLASS_Q, HAS_VALUE, IMPORTS, INCOMPATIBLE_WITH, INTERSECTION_OF, INVERSE_FUNCTIONAL_PROPERTY, INVERSE_OF, IS_DEFINED_BY, isSupported, LABEL, LIST, MAX_CARDINALITY, MAX_CARDINALITY_Q, MIN_CARDINALITY, MIN_CARDINALITY_Q, NAMESPACE, NIL, NOTHING, OBJECT_PROPERTY, ON_PROPERTY, ONE_OF, ONTOLOGY, ONTOLOGY_PROPERTY, PRIOR_VERSION, PROPERTY, RANGE, REST, RESTRICTION, SAME_AS, SAME_INDIVIDUAL_AS, SEE_ALSO, SOME_VALUES_FROM, SUB_CLASS_OF, SUB_PROPERTY_OF, SYMMETRIC_PROPERTY, THING, TRANSITIVE_PROPERTY, UNION_OF, VERSION_INFO
-
-
-
-
Method Detail
-
hasAliasFor
public boolean hasAliasFor(Resource res)
Answer true if the given resource has an alias in this profile.
- Specified by:
hasAliasFor
in interfaceProfile
- 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 interfaceProfile
- Parameters:
res
- A resource (including properties) to test for an alias- Returns:
- The alias for
res
, or one of the aliases forres
if more than one is defined, or null if no alias is defined forres
.
-
listAliasesFor
public java.util.Iterator<Resource> listAliasesFor(Resource res)
Answer an iterator over the defined aliases for a resource.
- Specified by:
listAliasesFor
in interfaceProfile
- 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 triplesn
- some nodep
- a property containing a predicate node- Returns:
- true iff the graph contains (n, p, X) for some X
-
-