- All Implemented Interfaces:
FrontsNode,OntProperty,OntResource,Property,RDFNode,Resource
- Direct Known Subclasses:
AnnotationPropertyImpl,DatatypePropertyImpl,FunctionalPropertyImpl,ObjectPropertyImpl
Implementation of the abstraction representing a general ontology property.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic ImplementationA factory for generating OntProperty facets from nodes in enhanced graphs.Fields inherited from class org.apache.jena.ontology.impl.OntResourceImpl
KNOWN_LANGUAGESFields inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
rdfNodeFactory -
Constructor Summary
ConstructorsConstructorDescriptionOntPropertyImpl(Node n, EnhGraph g) Construct an ontology property represented by the given node in the given graph. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a resource representing the domain of this property.voidAdd a property that is equivalent to this property.voidaddInverseOf(Property prop) Add a property that is the inverse of this property.voidAdd a resource representing the range of this property.voidaddSubProperty(Property prop) Add a sub-property of this property.voidaddSuperProperty(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 is the inverse of this property.Answer a property that is an inverse of this property.intReturns the ordinal value of a containment 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.booleanAnswer true if the given resource a class specifying the domain of this property.booleanAnswer true if the given property is equivalent to this property.booleanAnswer true if there is at least one inverse property for this property.booleanAnswer true if the given resource a class specifying the range of this property.booleanhasSubProperty(Property prop, boolean direct) Answer true if the given property is a sub-property of this property.booleanhasSuperProperty(Property prop, boolean direct) Answer true if the given property is a super-property of this property.Answer a property that is attached to the given model, which will either be this property or a new property object with the same URI in the given model.booleanAnswer true if this property is a datatype propertybooleanAnswer true if this property is a functional propertybooleanAnswer true if this property is an inverse functional propertybooleanisInverseOf(Property prop) Answer true if this property is the inverse of the given property.booleanAnswer true if this property is an object propertybooleanAnswer true to indicate that this resource is an RDF property.booleanAnswer true if this property is a symmetric propertybooleanAnswer true if this property is a transitive propertyAnswer 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().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).Answer an iterator over all of the declared domain classes of this property.Answer an iterator over all of the properties that are declared to be equivalent properties to this property.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 are declared to be inverse properties of this property.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.Answer an iterator over all of the properties that are declared to be sub-properties of this property.listSubProperties(boolean direct) Answer an iterator over all of the properties that are declared to be sub-properties of this property.Answer an iterator over all of the properties that are declared to be super-properties of this property.listSuperProperties(boolean direct) Answer an iterator over all of the properties that are declared to be super-properties of this property.voidremoveDomain(Resource cls) Remove the given class from the stated domain(s) of this property.voidRemove the statement that this property and the given property are equivalent.voidRemove the statement that this property is the inverse of the given property.voidremoveRange(Resource cls) Remove the given class from the stated range(s) of this property.voidremoveSubProperty(Property prop) Remove the given property from the sub-properties of this property.voidremoveSuperProperty(Property prop) Remove the given property from the super-properties of this property.voidAssert that the given resource represents the class of individuals that form the domain of this property.voidAssert that the given property is equivalent to this property.voidsetInverseOf(Property prop) Assert that the given property is the inverse of this property.voidAssert that the given resource represents the class of individuals that form the range of this property.voidsetSubProperty(Property prop) Assert that this property is super-property of the given property.voidsetSuperProperty(Property prop) Assert that this property is sub-property of the given property.Methods inherited from class org.apache.jena.ontology.impl.OntResourceImpl
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, 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, setVersionInfoMethods inherited from class org.apache.jena.rdf.model.impl.ResourceImpl
abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, addProperty, asLiteral, asResource, asStatementTerm, begin, commit, getId, getLocalName, getModel, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, listProperties, removeAll, removeProperties, toString, visitWithMethods inherited from class org.apache.jena.enhanced.EnhNode
as, asNode, canAs, equals, getGraph, hashCode, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, isValid, viewAsMethods inherited from class org.apache.jena.enhanced.Polymorphic
addView, supportsMethods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods 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, 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, setVersionInfoMethods inherited from interface org.apache.jena.rdf.model.Property
getLocalName, getNameSpaceMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, asStatementTerm, canAs, getModel, isAnon, isLiteral, isResource, isStatementTerm, isURIResource, visitWithMethods 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, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Field Details
-
factory
A factory for generating OntProperty facets from nodes in enhanced graphs. Note: should not be invoked directly by user code: useas()instead.
-
-
Constructor Details
-
OntPropertyImpl
Construct an ontology property represented by the given node in the given graph.
- Parameters:
n- The node that represents the resourceg- The enh graph that contains n
-
-
Method Details
-
isProperty
public boolean isProperty()Answer true to indicate that this resource is an RDF property.
- Specified by:
isPropertyin interfaceOntResource- Specified by:
isPropertyin interfaceProperty- Overrides:
isPropertyin classOntResourceImpl- Returns:
- True.
-
getOrdinal
public int getOrdinal()Description copied from interface:PropertyReturns the ordinal value of a containment property.RDF containers use properties of the form _1, _2, _3 etc to represent the containment relationship between the container and the objects it contains. When invoked on such a containment property, this method returns the integer part of the property name. When invoked on other properties, it returns 0.
- Specified by:
getOrdinalin interfaceProperty- Returns:
- The ordinal value of a containment property, or 0 otherwise.
- See Also:
-
setSuperProperty
Assert that this property is sub-property of the given property. Any existing statements for
subPropertyOfwill be removed.- Specified by:
setSuperPropertyin interfaceOntProperty- 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.
- Specified by:
addSuperPropertyin interfaceOntProperty- 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
Answer a property that is the super-property of this property. If there is more than one such property, an arbitrary selection is made.
- Specified by:
getSuperPropertyin interfaceOntProperty- Returns:
- A super-property 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.- Specified by:
listSuperPropertiesin interfaceOntProperty- 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.- Specified by:
listSuperPropertiesin interfaceOntProperty- 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.
- Specified by:
hasSuperPropertyin interfaceOntProperty- 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.
-
removeSuperProperty
Remove the given property from the super-properties of this property. If this statement is not true of the current model, nothing happens.
- Specified by:
removeSuperPropertyin interfaceOntProperty- 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
subPropertyOfonpropwill be removed.- Specified by:
setSubPropertyin interfaceOntProperty- 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.
- Specified by:
addSubPropertyin interfaceOntProperty- 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
Answer a property that is the sub-property of this property. If there is more than one such property, an arbitrary selection is made.
- Specified by:
getSubPropertyin interfaceOntProperty- Returns:
- A sub-property 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.- Specified by:
listSubPropertiesin interfaceOntProperty- 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.- Specified by:
listSubPropertiesin interfaceOntProperty- Parameters:
direct- If true, only answer the direcly 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.
- Specified by:
hasSubPropertyin interfaceOntProperty- Parameters:
prop- A property to test.direct- If true, only consider the direcly adjacent properties in the property hierarchy- Returns:
- True if the given property is a sub-property of this property.
-
removeSubProperty
Remove the given property from the sub-properties of this property. If this statement is not true of the current model, nothing happens.
- Specified by:
removeSubPropertyin interfaceOntProperty- 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
domainstatements for this property are removed.- Specified by:
setDomainin interfaceOntProperty- 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.
- Specified by:
addDomainin interfaceOntProperty- 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
Answer a resource that represents the domain class of this property. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getDomainin interfaceOntProperty- 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
Answer an iterator over all of the declared domain classes of this property. Each element of the iterator will be an
OntResource.- Specified by:
listDomainin interfaceOntProperty- 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.
- Specified by:
hasDomainin interfaceOntProperty- Parameters:
res- A resource representing a class- Returns:
- True if the given resource is one of the domain classes of this property.
-
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.
- Specified by:
removeDomainin interfaceOntProperty- 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
rangestatements for this property are removed.- Specified by:
setRangein interfaceOntProperty- 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.
- Specified by:
addRangein interfaceOntProperty- 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
Answer a resource that represents the range class of this property. If there is more than one such resource, an arbitrary selection is made.
- Specified by:
getRangein interfaceOntProperty- 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
Answer an iterator over all of the declared range classes of this property. Each element of the iterator will be an
OntResource.- Specified by:
listRangein interfaceOntProperty- 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.
- Specified by:
hasRangein interfaceOntProperty- Parameters:
res- A resource representing a class- Returns:
- True if the given resource is one of the range classes of this property.
-
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.
- Specified by:
removeRangein interfaceOntProperty- 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
equivalentPropertywill be removed.- Specified by:
setEquivalentPropertyin interfaceOntProperty- 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.
- Specified by:
addEquivalentPropertyin interfaceOntProperty- 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
Answer a property that is equivalent to this property. If there is more than one such property, an arbitrary selection is made.
- Specified by:
getEquivalentPropertyin interfaceOntProperty- Returns:
- A property equivalent to this property
- Throws:
ProfileException- If theProfile.EQUIVALENT_PROPERTY()property is not supported in the current language profile.
-
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.- Specified by:
listEquivalentPropertiesin interfaceOntProperty- 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.
- Specified by:
hasEquivalentPropertyin interfaceOntProperty- Parameters:
prop- A property to test for- Returns:
- True if the given property is equivalent to this property.
-
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.
- Specified by:
removeEquivalentPropertyin interfaceOntProperty- 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 the given property is the inverse of this property. Any existing statements for
inverseOfwill be removed.- Specified by:
setInverseOfin interfaceOntProperty- 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 is the inverse of this property.
- Specified by:
addInverseOfin interfaceOntProperty- 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
Answer a property that is an inverse of this property. If there is more than one such property, an arbitrary selection is made.
- Specified by:
getInverseOfin interfaceOntProperty- Returns:
- A property inverse to this property
- Throws:
ProfileException- If theProfile.INVERSE_OF()property is not supported in the current language profile.
-
listInverseOf
Answer an iterator over all of the properties that are declared to be inverse properties of this property. Each element of the iterator will be an
OntProperty.- Specified by:
listInverseOfin interfaceOntProperty- 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.
- Specified by:
isInverseOfin interfaceOntProperty- Parameters:
prop- A property to test for- Returns:
- True if the this property is the inverse of the the given property.
-
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.
- Specified by:
removeInversePropertyin interfaceOntProperty- 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
Answer a view of this property as a functional property
- Specified by:
asFunctionalPropertyin interfaceOntProperty- 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
Answer a view of this property as a datatype property
- Specified by:
asDatatypePropertyin interfaceOntProperty- Specified by:
asDatatypePropertyin interfaceOntResource- Overrides:
asDatatypePropertyin classOntResourceImpl- 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
Answer a view of this property as an object property
- Specified by:
asObjectPropertyin interfaceOntProperty- Specified by:
asObjectPropertyin interfaceOntResource- Overrides:
asObjectPropertyin classOntResourceImpl- 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
Answer a view of this property as a transitive property
- Specified by:
asTransitivePropertyin interfaceOntProperty- 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
Answer a view of this property as an inverse functional property
- Specified by:
asInverseFunctionalPropertyin interfaceOntProperty- 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
Answer a view of this property as a symmetric property
- Specified by:
asSymmetricPropertyin interfaceOntProperty- 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
Answer a facet of this property as a functional property, adding additional information to the model if necessary.
- Specified by:
convertToFunctionalPropertyin interfaceOntProperty- Returns:
- This property, but converted to a FunctionalProperty facet
-
convertToDatatypeProperty
Answer a facet of this property as a datatype property, adding additional information to the model if necessary.
- Specified by:
convertToDatatypePropertyin interfaceOntProperty- Returns:
- This property, but converted to a DatatypeProperty facet
-
convertToObjectProperty
Answer a facet of this property as an object property, adding additional information to the model if necessary.
- Specified by:
convertToObjectPropertyin interfaceOntProperty- Returns:
- This property, but converted to an ObjectProperty facet
-
convertToTransitiveProperty
Answer a facet of this property as a transitive property, adding additional information to the model if necessary.
- Specified by:
convertToTransitivePropertyin interfaceOntProperty- Returns:
- This property, but converted to a TransitiveProperty facet
-
convertToInverseFunctionalProperty
Answer a facet of this property as an inverse functional property, adding additional information to the model if necessary.
- Specified by:
convertToInverseFunctionalPropertyin interfaceOntProperty- Returns:
- This property, but converted to an InverseFunctionalProperty facet
-
convertToSymmetricProperty
Answer a facet of this property as a symmetric property, adding additional information to the model if necessary.
- Specified by:
convertToSymmetricPropertyin interfaceOntProperty- Returns:
- This property, but converted to a SymmetricProperty facet
-
isFunctionalProperty
public boolean isFunctionalProperty()Answer true if this property is a functional property
- Specified by:
isFunctionalPropertyin interfaceOntProperty- Returns:
- True if this this property has an
rdf:typethat defines it as a functional property.
-
isDatatypeProperty
public boolean isDatatypeProperty()Answer true if this property is a datatype property
- Specified by:
isDatatypePropertyin interfaceOntProperty- Specified by:
isDatatypePropertyin interfaceOntResource- Overrides:
isDatatypePropertyin classOntResourceImpl- Returns:
- True if this this property has an
rdf:typethat defines it as a datatype property.
-
isObjectProperty
public boolean isObjectProperty()Answer true if this property is an object property
- Specified by:
isObjectPropertyin interfaceOntProperty- Specified by:
isObjectPropertyin interfaceOntResource- Overrides:
isObjectPropertyin classOntResourceImpl- Returns:
- True if this this property has an
rdf:typethat defines it as an object property.
-
isTransitiveProperty
public boolean isTransitiveProperty()Answer true if this property is a transitive property
- Specified by:
isTransitivePropertyin interfaceOntProperty- Returns:
- True if this this property has an
rdf:typethat defines it as a transitive property.
-
isInverseFunctionalProperty
public boolean isInverseFunctionalProperty()Answer true if this property is an inverse functional property
- Specified by:
isInverseFunctionalPropertyin interfaceOntProperty- Returns:
- True if this this property has an
rdf:typethat defines it as an inverse functional property.
-
isSymmetricProperty
public boolean isSymmetricProperty()Answer true if this property is a symmetric property
- Specified by:
isSymmetricPropertyin interfaceOntProperty- Returns:
- True if this this property has an
rdf:typethat defines it as a symmetric property.
-
getInverse
Answer the property that is the inverse of this property. If no such property is defined, return null. If more than one inverse is defined, return an arbitrary selection.
- Specified by:
getInversein interfaceOntProperty- Returns:
- The property that is the inverse of this property, or null.
-
listInverse
Answer an iterator over the properties that are defined to be inverses of this property.
- Specified by:
listInversein interfaceOntProperty- Returns:
- An iterator over the properties that declare themselves the
inverseOfthis property.
-
hasInverse
public boolean hasInverse()Answer true if there is at least one inverse property for this property.
- Specified by:
hasInversein interfaceOntProperty- Returns:
- True if property has an inverse.
-
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 howto.- Specified by:
listDeclaringClassesin interfaceOntProperty- 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 howto.- Specified by:
listDeclaringClassesin interfaceOntProperty- 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
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.
- Specified by:
listReferringRestrictionsin interfaceOntProperty- Returns:
- An iterator whose values are the restrictions from the local model that reference this property.
-
inModel
Answer a property that is attached to the given model, which will either be this property or a new property object with the same URI in the given model. If the given model is an ontology model, make the new property object an ontproperty.
-