- All Superinterfaces:
FrontsNode
,OntResource
,Property
,RDFNode
,Resource
- All Known Subinterfaces:
AnnotationProperty
,DatatypeProperty
,FunctionalProperty
,InverseFunctionalProperty
,ObjectProperty
,SymmetricProperty
,TransitiveProperty
- All Known Implementing Classes:
AnnotationPropertyImpl
,DatatypePropertyImpl
,FunctionalPropertyImpl
,InverseFunctionalPropertyImpl
,ObjectPropertyImpl
,OntPropertyImpl
,SymmetricPropertyImpl
,TransitivePropertyImpl
Interface encapsulating a property in an ontology. This is an extension to the
standard Property
interface, adding a collection of convenience methods
for accessing the additional semantic features of properties in OWL and RDFS
such as domain, range, inverse, etc. Not all such capabilities exist in all
supported ontology languages.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a resource representing the domain of this property.void
Add a property that is equivalent to this property.void
addInverseOf
(Property prop) Add a property that this property is the inverse of.void
Add a resource representing the range of this property.void
addSubProperty
(Property prop) Add a sub-property of this property.void
addSuperProperty
(Property prop) Add a super-property of this property.Answer a view of this property as a datatype propertyAnswer a view of this property as a functional propertyAnswer a view of this property as an inverse functional propertyAnswer a view of this property as an object propertyAnswer a view of this property as a symmetric propertyAnswer a view of this property as a transitive propertyAnswer a facet of this property as a datatype property, adding additional information to the model if necessary.Answer a facet of this property as a functional property, adding additional information to the model if necessary.Answer a facet of this property as an inverse functional property, adding additional information to the model if necessary.Answer a facet of this property as an object property, adding additional information to the model if necessary.Answer a facet of this property as a symmetric property, adding additional information to the model if necessary.Answer a facet of this property as a transitive property, adding additional information to the model if necessary.Answer a resource that represents the domain class of this property.Answer a property that is equivalent to this property.Answer the property that has declared itself to be the inverse of this property, if any such property is defined.Answer a property of which this property is the inverse, if known, or null if there is no such property.getRange()
Answer a resource that represents the range class of this property.Answer a property that is the sub-property of this property.Answer a property that is the super-property of this property.boolean
Answer true if the given resource a class specifying the domain of this property.boolean
Answer true if the given property is equivalent to this property.boolean
Answer true if there is at least one inverse property for this property.boolean
Answer true if the given resource a class specifying the range of this property.boolean
hasSubProperty
(Property prop, boolean direct) Answer true if the given property is a sub-property of this property.boolean
hasSuperProperty
(Property prop, boolean direct) Answer true if the given property is a super-property of this property.boolean
Answer true if this property is a datatype propertyboolean
Answer true if this property is a functional propertyboolean
Answer true if this property is an inverse functional propertyboolean
isInverseOf
(Property prop) Answer true if this property is the inverse of the given property.boolean
Answer true if this property is an object propertyboolean
Answer true if this property is a symmetric propertyboolean
Answer true if this property is a transitive propertyExtendedIterator<? extends OntClass>
Answer an iterator of all of the classes in this ontology, such that each returned class has this property as one of its properties inOntClass.listDeclaredProperties()
.ExtendedIterator<? extends OntClass>
listDeclaringClasses
(boolean direct) Answer an iterator of all of the classes in this ontology, such that each returned class has this property as one of its properties inOntClass.listDeclaredProperties(boolean)
.ExtendedIterator<? extends OntResource>
Answer an iterator over all of the declared domain classes of this property.ExtendedIterator<? extends OntProperty>
Answer an iterator over all of the properties that are declared to be equivalent properties to this property.ExtendedIterator<? extends OntProperty>
Answer an iterator over the properties that are defined to be inverses of this property.ExtendedIterator<? extends OntProperty>
Answer an iterator over all of the properties that this property is declared to be the inverse of.ExtendedIterator<? extends OntResource>
Answer an iterator over all of the declared range classes of this property.Answer an iterator over any restrictions that mention this property as the property that the restriction is adding some constraint to.ExtendedIterator<? extends OntProperty>
Answer an iterator over all of the properties that are declared to be sub-properties of this property.ExtendedIterator<? extends OntProperty>
listSubProperties
(boolean direct) Answer an iterator over all of the properties that are declared to be sub-properties of this property.ExtendedIterator<? extends OntProperty>
Answer an iterator over all of the properties that are declared to be super-properties of this property.ExtendedIterator<? extends OntProperty>
listSuperProperties
(boolean direct) Answer an iterator over all of the properties that are declared to be super-properties of this property.void
removeDomain
(Resource cls) Remove the given class from the stated domain(s) of this property.void
Remove the statement that this property and the given property are equivalent.void
Remove the statement that this property is the inverse of the given property.void
removeRange
(Resource cls) Remove the given class from the stated range(s) of this property.void
removeSubProperty
(Property prop) Remove the given property from the sub-properties of this property.void
removeSuperProperty
(Property prop) Remove the given property from the super-properties of this property.void
Assert that the given resource represents the class of individuals that form the domain of this property.void
Assert that the given property is equivalent to this property.void
setInverseOf
(Property prop) Assert that this property is the inverse of the given property.void
Assert that the given resource represents the class of individuals that form the range of this property.void
setSubProperty
(Property prop) Assert that this property is super-property of the given property.void
setSuperProperty
(Property prop) Assert that this property is sub-property of the given property.Methods inherited from interface org.apache.jena.graph.FrontsNode
asNode
Methods inherited from interface org.apache.jena.ontology.OntResource
addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asIndividual, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDefinedBy, isDifferentFrom, isIndividual, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo
Methods inherited from interface org.apache.jena.rdf.model.Property
getLocalName, getNameSpace, getOrdinal, inModel, isProperty
Methods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, canAs, getModel, isAnon, isLiteral, isResource, isStmtResource, isURIResource, visitWith
Methods inherited from interface org.apache.jena.rdf.model.Resource
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getStmtTerm, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Method Details
-
setSuperProperty
Assert that this property is sub-property of the given property. Any existing statements for
subPropertyOf
will be removed.- Parameters:
prop
- The property that this property is a sub-property of- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
addSuperProperty
Add a super-property of this property.
- Parameters:
prop
- A property that is a super-property of this property.- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
getSuperProperty
OntProperty getSuperProperty()Answer a property that is the super-property of this property. If there is more than one such property, an arbitrary selection is made.
- Returns:
- A super-property of this property
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
listSuperProperties
ExtendedIterator<? extends OntProperty> listSuperProperties()Answer an iterator over all of the properties that are declared to be super-properties of this property. Each element of the iterator will be an
OntProperty
.- Returns:
- An iterator over the super-properties of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
listSuperProperties
Answer an iterator over all of the properties that are declared to be super-properties of this property. Each element of the iterator will be an
OntProperty
.- Parameters:
direct
- If true, only answer the directly adjacent properties in the property hierarchy: i.e. eliminate any property for which there is a longer route to reach that child under the super-property relation.- Returns:
- An iterator over the super-properties of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
hasSuperProperty
Answer true if the given property is a super-property of this property.
- Parameters:
prop
- A property to test.direct
- If true, only consider the directly adjacent properties in the property hierarchy- Returns:
- True if the given property is a super-property of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
removeSuperProperty
Remove the given property from the super-properties of this property. If this statement is not true of the current model, nothing happens.
- Parameters:
prop
- A property to be removed from the super-properties of this property- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
setSubProperty
Assert that this property is super-property of the given property. Any existing statements for
subPropertyOf
onprop
will be removed.- Parameters:
prop
- The property that is a sub-property of this property- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
addSubProperty
Add a sub-property of this property.
- Parameters:
prop
- A property that is a sub-property of this property.- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
getSubProperty
OntProperty getSubProperty()Answer a property that is the sub-property of this property. If there is more than one such property, an arbitrary selection is made.
- Returns:
- A sub-property of this property
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
listSubProperties
ExtendedIterator<? extends OntProperty> listSubProperties()Answer an iterator over all of the properties that are declared to be sub-properties of this property. Each element of the iterator will be an
OntProperty
.- Returns:
- An iterator over the sub-properties of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
listSubProperties
Answer an iterator over all of the properties that are declared to be sub-properties of this property. Each element of the iterator will be an
OntProperty
.- Parameters:
direct
- If true, only answer the directly adjacent properties in the property hierarchy: i.e. eliminate any property for which there is a longer route to reach that child under the sub-property relation.- Returns:
- An iterator over the sub-properties of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
hasSubProperty
Answer true if the given property is a sub-property of this property.
- Parameters:
prop
- A property to test.direct
- If true, only consider the directly adjacent properties in the property hierarchy- Returns:
- True if the given property is a sub-property of this property.
- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
removeSubProperty
Remove the given property from the sub-properties of this property. If this statement is not true of the current model, nothing happens.
- Parameters:
prop
- A property to be removed from the sub-properties of this property- Throws:
ProfileException
- If theProfile.SUB_PROPERTY_OF()
property is not supported in the current language profile.
-
setDomain
Assert that the given resource represents the class of individuals that form the domain of this property. Any existing
domain
statements for this property are removed.- Parameters:
res
- The resource that represents the domain class for this property.- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
addDomain
Add a resource representing the domain of this property.
- Parameters:
res
- A resource that represents a domain class for this property.- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
getDomain
OntResource getDomain()Answer a resource that represents the domain class of this property. If there is more than one such resource, an arbitrary selection is made.
- Returns:
- An resource representing the class that forms the domain of this property
- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
listDomain
ExtendedIterator<? extends OntResource> listDomain()Answer an iterator over all of the declared domain classes of this property. Each element of the iterator will be an
OntResource
.- Returns:
- An iterator over the classes that form the domain of this property.
- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
hasDomain
Answer true if the given resource a class specifying the domain of this property.
- Parameters:
res
- A resource representing a class- Returns:
- True if the given resource is one of the domain classes of this property.
- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
removeDomain
Remove the given class from the stated domain(s) of this property. If this statement is not true of the current model, nothing happens.
- Parameters:
cls
- A class to be removed from the declared domain(s) of this property- Throws:
ProfileException
- If theProfile.DOMAIN()
property is not supported in the current language profile.
-
setRange
Assert that the given resource represents the class of individuals that form the range of this property. Any existing
range
statements for this property are first removed. Therefore, if the property is known not to have a range declaration, it is more efficient to useaddRange(org.apache.jena.rdf.model.Resource)
since no removal step is necessary. SeeaddRange(org.apache.jena.rdf.model.Resource)
for additional usage notes on the value ofres
.- Parameters:
res
- The resource that represents the range class for this property.- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
addRange
Add a resource representing the range of this property. The resource denotes the class or datatype that objects of statements using this property as predicate should belong to. For datatype properties, XML Schema Datatype names are pre-declared as resources in the
XSD
vocabulary class. For object properties, the resource should be represent the range class. Note thatOntClass
is a Java sub-class ofResource
, so OntClass objects can be passed directly.- Parameters:
res
- A resource that represents a range class for this property.- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
getRange
OntResource getRange()Answer a resource that represents the range class of this property. If there is more than one such resource, an arbitrary selection is made.
- Returns:
- An resource representing the class that forms the range of this property
- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
listRange
ExtendedIterator<? extends OntResource> listRange()Answer an iterator over all of the declared range classes of this property. Each element of the iterator will be an
OntResource
.- Returns:
- An iterator over the classes that form the range of this property.
- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
hasRange
Answer true if the given resource a class specifying the range of this property.
- Parameters:
res
- A resource representing a class- Returns:
- True if the given resource is one of the range classes of this property.
- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
removeRange
Remove the given class from the stated range(s) of this property. If this statement is not true of the current model, nothing happens.
- Parameters:
cls
- A class to be removed from the declared range(s) of this property- Throws:
ProfileException
- If theProfile.RANGE()
property is not supported in the current language profile.
-
setEquivalentProperty
Assert that the given property is equivalent to this property. Any existing statements for
equivalentProperty
will be removed.- Parameters:
prop
- The property that this property is a equivalent to.- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
addEquivalentProperty
Add a property that is equivalent to this property.
- Parameters:
prop
- A property that is equivalent to this property.- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
getEquivalentProperty
OntProperty getEquivalentProperty()Answer a property that is equivalent to this property. If there is more than one such property, an arbitrary selection is made.
- Returns:
- A property equivalent to this property
- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
listEquivalentProperties
ExtendedIterator<? extends OntProperty> listEquivalentProperties()Answer an iterator over all of the properties that are declared to be equivalent properties to this property. Each element of the iterator will be an
OntProperty
.- Returns:
- An iterator over the properties equivalent to this property.
- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
hasEquivalentProperty
Answer true if the given property is equivalent to this property.
- Parameters:
prop
- A property to test for- Returns:
- True if the given property is equivalent to this property.
- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
removeEquivalentProperty
Remove the statement that this property and the given property are equivalent. If this statement is not true of the current model, nothing happens.
- Parameters:
prop
- A property that may be declared to be equivalent to this property- Throws:
ProfileException
- If theProfile.EQUIVALENT_PROPERTY()
property is not supported in the current language profile.
-
setInverseOf
Assert that this property is the inverse of the given property. Any existing statements for
inverseOf
will be removed.- Parameters:
prop
- The property that this property is a inverse to.- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
addInverseOf
Add a property that this property is the inverse of.
- Parameters:
prop
- A property that is the inverse of this property.- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
getInverseOf
OntProperty getInverseOf()Answer a property of which this property is the inverse, if known, or null if there is no such property. If there is more than one such property, an arbitrary selection is made.
Note that this method is slightly different to
getInverse()
. See the Javadoc ongetInverse()
for a detailed explanation.- Returns:
- A property which this property is the inverse of, or null.
- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
listInverseOf
ExtendedIterator<? extends OntProperty> listInverseOf()Answer an iterator over all of the properties that this property is declared to be the inverse of. Each element of the iterator will be an
OntProperty
.- Returns:
- An iterator over the properties inverse to this property.
- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
isInverseOf
Answer true if this property is the inverse of the given property.
- Parameters:
prop
- A property to test for- Returns:
- True if the this property is the inverse of the the given property.
- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
removeInverseProperty
Remove the statement that this property is the inverse of the given property. If this statement is not true of the current model, nothing happens.
- Parameters:
prop
- A property that may be declared to be inverse to this property- Throws:
ProfileException
- If theProfile.INVERSE_OF()
property is not supported in the current language profile.
-
asFunctionalProperty
FunctionalProperty asFunctionalProperty()Answer a view of this property as a functional property
- Returns:
- This property, but viewed as a FunctionalProperty node
- Throws:
ConversionException
- if the resource cannot be converted to a functional property given the language profile and the current state of the underlying model.
-
asDatatypeProperty
DatatypeProperty asDatatypeProperty()Answer a view of this property as a datatype property
- Specified by:
asDatatypeProperty
in interfaceOntResource
- Returns:
- This property, but viewed as a DatatypeProperty node
- Throws:
ConversionException
- if the resource cannot be converted to a datatype property given the language profile and the current state of the underlying model.
-
asObjectProperty
ObjectProperty asObjectProperty()Answer a view of this property as an object property
- Specified by:
asObjectProperty
in interfaceOntResource
- Returns:
- This property, but viewed as an ObjectProperty node
- Throws:
ConversionException
- if the resource cannot be converted to an object property given the language profile and the current state of the underlying model.
-
asTransitiveProperty
TransitiveProperty asTransitiveProperty()Answer a view of this property as a transitive property
- Returns:
- This property, but viewed as a TransitiveProperty node
- Throws:
ConversionException
- if the resource cannot be converted to a transitive property given the language profile and the current state of the underlying model.
-
asInverseFunctionalProperty
InverseFunctionalProperty asInverseFunctionalProperty()Answer a view of this property as an inverse functional property
- Returns:
- This property, but viewed as an InverseFunctionalProperty node
- Throws:
ConversionException
- if the resource cannot be converted to an inverse functional property given the language profile and the current state of the underlying model.
-
asSymmetricProperty
SymmetricProperty asSymmetricProperty()Answer a view of this property as a symmetric property
- Returns:
- This property, but viewed as a SymmetricProperty node
- Throws:
ConversionException
- if the resource cannot be converted to a symmetric property given the language profile and the current state of the underlying model.
-
convertToFunctionalProperty
FunctionalProperty convertToFunctionalProperty()Answer a facet of this property as a functional property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to a FunctionalProperty facet
-
convertToDatatypeProperty
DatatypeProperty convertToDatatypeProperty()Answer a facet of this property as a datatype property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to a DatatypeProperty facet
-
convertToObjectProperty
ObjectProperty convertToObjectProperty()Answer a facet of this property as an object property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to an ObjectProperty facet
-
convertToTransitiveProperty
TransitiveProperty convertToTransitiveProperty()Answer a facet of this property as a transitive property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to a TransitiveProperty facet
-
convertToInverseFunctionalProperty
InverseFunctionalProperty convertToInverseFunctionalProperty()Answer a facet of this property as an inverse functional property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to an InverseFunctionalProperty facet
-
convertToSymmetricProperty
SymmetricProperty convertToSymmetricProperty()Answer a facet of this property as a symmetric property, adding additional information to the model if necessary.
- Returns:
- This property, but converted to a SymmetricProperty facet
-
isFunctionalProperty
boolean isFunctionalProperty()Answer true if this property is a functional property
- Returns:
- True if this this property has an
rdf:type
that defines it as a functional property.
-
isDatatypeProperty
boolean isDatatypeProperty()Answer true if this property is a datatype property
- Specified by:
isDatatypeProperty
in interfaceOntResource
- Returns:
- True if this this property has an
rdf:type
that defines it as a datatype property.
-
isObjectProperty
boolean isObjectProperty()Answer true if this property is an object property
- Specified by:
isObjectProperty
in interfaceOntResource
- Returns:
- True if this this property has an
rdf:type
that defines it as an object property.
-
isTransitiveProperty
boolean isTransitiveProperty()Answer true if this property is a transitive property
- Returns:
- True if this this property has an
rdf:type
that defines it as a transitive property.
-
isInverseFunctionalProperty
boolean isInverseFunctionalProperty()Answer true if this property is an inverse functional property
- Returns:
- True if this this property has an
rdf:type
that defines it as an inverse functional property.
-
isSymmetricProperty
boolean isSymmetricProperty()Answer true if this property is a symmetric property
- Returns:
- True if this this property has an
rdf:type
that defines it as a symmetric property.
-
getInverse
OntProperty getInverse()Answer the property that has declared itself to be the inverse of this property, if any such property is defined. If no such property is defined, return null. If more than one inverse is defined, return an arbitrary selection.
Note that this method is slightly different from
getInverseOf()
. Suppose that we have::p an owl:ObjectProperty. :q an owl:ObjectProperty. :p owl:inverseOf :q.
Then,
getInverse()
called on theOntProperty
corresponding toq
will returnp
, sinceq
declares itself to bep
's inverse. However, unless an OWL reasoner is used, callinggetInverse()
onp
will returnnull
. Conversely, absent a reasoner,
ongetInverseOf()
p
will returnq
, but will return null when called onq
. In the presence of an OWL reasoner,getInverse()
andgetInverseOf()
are equivalent, sinceowl:inverseOf
is a symmetric property.- Returns:
- The property that is the inverse of this property, or null.
-
listInverse
ExtendedIterator<? extends OntProperty> listInverse()Answer an iterator over the properties that are defined to be inverses of this property.
- Returns:
- An iterator over the properties that declare themselves the
inverseOf
this property.
-
hasInverse
boolean hasInverse()Answer true if there is at least one inverse property for this property.
- Returns:
- True if property has an inverse.
-
listDeclaringClasses
ExtendedIterator<? extends OntClass> listDeclaringClasses()Answer an iterator of all of the classes in this ontology, such that each returned class has this property as one of its properties in
OntClass.listDeclaredProperties()
. This simulates a frame-like view of properties and classes; for more details see the RDF frames how-to.- Returns:
- An iterator of the classes having this property as one of their declared properties
-
listDeclaringClasses
Answer an iterator of all of the classes in this ontology, such that each returned class has this property as one of its properties in
OntClass.listDeclaredProperties(boolean)
. This simulates a frame-like view of properties and classes; for more details see the RDF frames how-to.- Parameters:
direct
- If true, use only direct associations between classes and properties- Returns:
- An iterator of the classes having this property as one of their declared properties
-
listReferringRestrictions
ExtendedIterator<Restriction> listReferringRestrictions()Answer an iterator over any restrictions that mention this property as the property that the restriction is adding some constraint to. For example:
<owl:Restriction> <owl:onProperty rdf:resource="#childOf" /> <owl:hasValue rdf:resource="#ian" /> </owl:Restriction>
Note that any such restrictions do not affect the global semantics of this property itself. Restrictions define new class expressions, and the property constraints are local to that class expression. This method is provided as a convenience to assist callers to navigate the relationships in the model.
- Returns:
- An iterator whose values are the restrictions from the local model that reference this property.
-