- All Superinterfaces:
org.apache.jena.graph.FrontsNode,OntObject,OntProperty,OntRelationalProperty,org.apache.jena.rdf.model.RDFNode,org.apache.jena.rdf.model.Resource
- All Known Subinterfaces:
OntObjectProperty.Inverse,OntObjectProperty.Named
- All Known Implementing Classes:
OntObjectPropertyImpl,OntObjectPropertyImpl.InversePropertyImpl,OntObjectPropertyImpl.NamedImpl
A common interface for any Ontology Object Property Expression.
In OWL2, there are two types of object property expressions:
named object property (entity) and InverseOf anonymous property expression.
Range values for this property expression are restricted to individuals
(as distinct from datatype valued
properties).-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a ObjectInverseOf.static interfaceInterface encapsulating an Ontology Named Object Property. -
Method Summary
Modifier and TypeMethodDescriptiondefault OntStatementCreates theP rdf:type owl:AsymmetricPropertyproperty declaration statement, wherePis this property.default OntObjectPropertyAdds a newowl:propertyDisjointWithstatement for this and the specified property.default OntObjectPropertyAdds a statement with theRDFS.domainas predicate and the specifiedclass expressionas an object.default OntObjectPropertyAdds a newowl:equivalentPropertystatement.default OntStatementCreates and returns a newowl:equivalentPropertystatement with the given property as an object and this property as a subject.default OntStatementCreates theP rdf:type owl:InverseFunctionalPropertyproperty declaration statement, wherePis this property.default OntStatementAdds a new inverse-of statement.default OntObjectPropertyAdds a new inverse-of a statement, returns this property instance.default OntStatementCreates theP rdf:type owl:IrreflexivePropertyproperty declaration statement, wherePis this property.addNegativeAssertion(OntIndividual source, OntIndividual target) Adds a negative property assertion ontology object.default OntObjectPropertyaddPropertyChain(Collection<OntObjectProperty> properties) Adds a new sub-property-of a chain statement and returns this object itself.default OntObjectPropertyaddPropertyChain(OntObjectProperty... properties) Adds a new sub-property-of a chain statement and returns this object itself.default OntStatementaddPropertyChainAxiomStatement(Collection<OntObjectProperty> properties) Adds a new sub-property-of chain statement.default OntStatementaddPropertyChainAxiomStatement(OntObjectProperty... properties) Creates a property chainontology listand returns the statementP owl:propertyChainAxiom ( P1 ... Pn )to allow the addition of annotations.default OntStatementAdds a disjoint object property (i.e., the_:this owl:propertyDisjointWith @otherstatement).default OntObjectPropertyAdds a statement with theRDFS.rangeas predicate and the specifiedclass expressionas an object.default OntStatementCreates theP rdf:type owl:ReflexivePropertyproperty declaration statement, wherePis this property.default OntObjectPropertyaddSubProperty(OntObjectProperty property) Adds the given property as sub property returning this property itself.default OntObjectPropertyaddSuperProperty(OntObjectProperty property) Adds the given property as super property returning this property itself.default OntStatementCreates theP rdf:type owl:SymmetricPropertyproperty declaration statement, wherePis this property.default OntStatementCreates theP rdf:type owl:TransitivePropertyproperty declaration statement, wherePis this property.default OntObjectProperty.NamedasNamed()default OntObjectPropertyDeletes all property chain lists including their annotations.createPropertyChain(Collection<OntObjectProperty> properties) Creates a property chain logical constructions as aontology []-listofObject Property Expressions that is attached to this Object Property Expression at object positions with the predicateowl:propertyChainAxiom.default Stream<OntObjectProperty>Returns disjoint properties (statement:P1 owl:propertyDisjointWith P2).default Stream<OntDisjoint.ObjectProperties>Lists allOntDisjointsections where this object property is a member.default Stream<OntObjectProperty>Returns all equivalent object properties (i.e.default Optional<OntList<OntObjectProperty>>findPropertyChain(org.apache.jena.rdf.model.RDFNode list) Finds the firstPropertyChainlogical construction attached to this property for the specified []-list as an object.default Stream<OntObjectProperty>Lists all members from the right part of statementP owl:propertyChainAxiom ( P1 ... Pn ), wherePis this property.default <X extends org.apache.jena.rdf.model.RDFNode>
XSafely converts this RDF resource to the giventypeinterface, if it is possible.getModel()Returns the ontology model associated with this resource.default Stream<OntObjectProperty>Lists all object properties from the right part of the statement_:this owl:inverseOf P.default Optional<OntObjectProperty>Finds the first object property from the right part of the statements_:x owl:inverseOf PNorP1 owl:inverseOf P2.default booleandefault booleandefault booleanbooleanisLocal()Determines if this Ontology Resource is locally defined.default booleandefault booleandefault booleanReturns all associated negative object property assertions.negativeAssertions(OntIndividual source) Returns all associated negative object property assertions for the specified source individual.Returns aStreamover all property chainontology lists that are attached to this Object Property Expression on the predicateowl:propertyChainAxiom.ranges()Returns all ranges.ranges(boolean direct) Gets all direct or indirect ranges that present in RDF graph.default OntObjectPropertyremoveDisjointProperty(org.apache.jena.rdf.model.Resource property) Removes theowl:propertyDisjointWithstatement (a statement with the predicateowl:propertyDisjointWith) for the specified resource (considered as an object), including the corresponding statement's annotations.default OntObjectPropertyremoveDomain(org.apache.jena.rdf.model.Resource domain) Removes the specified domain resource (predicate isrdfs:domain), including the corresponding statement's annotations.default OntObjectPropertyremoveEquivalentProperty(org.apache.jena.rdf.model.Resource property) Removes the equivalent property statement (a statement with the predicateowl:equivalentProperty) for the specified resource (considered as an object), including the corresponding statement's annotations.default OntObjectPropertyremoveInverseProperty(org.apache.jena.rdf.model.Resource other) Removes the statement with the predicateowl:inverseOfand the given object property as an object.removePropertyChain(org.apache.jena.rdf.model.Resource list) Deletes the given property chain list including all its annotations.default OntObjectPropertyremoveRange(org.apache.jena.rdf.model.Resource range) Removes the specified range resource (predicate isrdfs:range), including the corresponding statement's annotations.default OntObjectPropertyremoveSubProperty(org.apache.jena.rdf.model.Resource property) Removes the specified sub property (predicate isrdfs:subPropertyOf), including the corresponding statement's annotations.default OntObjectPropertyremoveSuperProperty(org.apache.jena.rdf.model.Resource property) Removes the specified super property (predicate isrdfs:subPropertyOf), including the corresponding statement's annotations.default OntObjectPropertysetAsymmetric(boolean asymmetric) Adds or removes theP rdf:type owl:AsymmetricPropertystatement depending on the given flag and returns this property to allow cascading calls.default OntObjectPropertysetFunctional(boolean functional) Adds or removesowl:FunctionalPropertydeclaration for this property according to the given boolean flag.default OntObjectPropertysetInverseFunctional(boolean inverseFunctional) Adds or removes theP rdf:type owl:InverseFunctionalPropertystatement depending on the given flag and returns this property to allow cascading calls.default OntObjectPropertysetIrreflexive(boolean irreflexive) Adds or removes theP rdf:type owl:IrreflexivePropertystatement depending on the given flag and returns this property to allow cascading calls.default OntObjectPropertysetReflexive(boolean reflexive) Adds or removes theP rdf:type owl:ReflexivePropertystatement depending on the given flag and returns this property to allow cascading calls.default OntObjectPropertysetSymmetric(boolean symmetric) Adds or removes theP rdf:type owl:SymmetricPropertystatement depending on the given flag and returns this property to allow cascading calls.default OntObjectPropertysetTransitive(boolean transitive) Adds or removes theP rdf:type owl:TransitivePropertystatement depending on the given flag and returns this property to allow cascading calls.default Stream<OntObjectProperty>Lists all the properties that are declared to be sub-properties of this property (directly or indirectly).subProperties(boolean direct) Answers aStreamover all the properties that are declared to be sub-properties of this property.default Stream<OntObjectProperty>Lists all the properties that are declared to be super-properties of this property (directly or indirectly).superProperties(boolean direct) Answers aStreamover all the properties that are declared to be super-properties of this property.Methods inherited from interface org.apache.jena.graph.FrontsNode
asNodeMethods inherited from interface org.apache.jena.ontapi.model.OntObject
addAnnotation, addAnnotation, addAnnotation, addComment, addComment, addLabel, addLabel, addStatement, annotate, annotate, annotations, annotationValues, annotationValues, clearAnnotations, content, getComment, getComment, getLabel, getLabel, getMainStatement, getRequiredProperty, hasType, objects, objects, objectType, remove, spec, statement, statement, statements, statements, typesMethods inherited from interface org.apache.jena.ontapi.model.OntProperty
addDomainStatement, addRangeStatement, addSubPropertyOfStatement, asProperty, declaringClasses, hasSubProperty, hasSuperPropertyMethods inherited from interface org.apache.jena.ontapi.model.OntRelationalProperty
addFunctionalDeclaration, domains, domains, isFunctional, referringRestrictionsMethods inherited from interface org.apache.jena.rdf.model.RDFNode
as, asLiteral, asResource, asStatementTerm, canAs, 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, getLocalName, getNameSpace, getProperty, getProperty, getPropertyResourceValue, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, inModel, listProperties, listProperties, listProperties, removeAll, removeProperties, toString
-
Method Details
-
subProperties
Answers aStreamover all the properties that are declared to be sub-properties of this property. Each element of theStreamwill have the same type as this property instance: if it is datatype property the method will return only data properties, etc. The parameterdirectcontrols selectivity over the properties that appear in theStream. Consider the following scenario:
(so:D rdfs:subPropertyOf :C . :C rdfs:subPropertyOf :A . :B rdfs:subPropertyOf :A .Ahas two sub-properties,BandC, andChas sub-propertyD) In a raw model, with no inference support, listing the sub-property ofAwill answerBandC. In an inferencing model,rdfs:subPropertyOfis known to be transitive, so the sub-properties iterator will includeD. Thedirectsub-properties are those members of the closure of the subPropertyOf relation, restricted to properties that cannot be reached by a longer route, i.e., the ones that are directly adjacent to the given root. Thus, the direct sub-properties ofAareBandConly, and notD- even in an inferencing graph. Note that this is different from the entailments from the raw graph. Suppose we add to this example:
Now, in the raw graph,:D rdfs:subPropertyOf :A.Ahas sub-propertyC. But the direct sub-properties ofAremainBandC, since there is a longer pathA-C-Dthat means thatDis not a direct sub-property ofA. The assertion in the raw graph thatAhas sub-propertyDis essentially redundant, since this can be inferred from the closure of the graph.- Specified by:
subPropertiesin interfaceOntProperty- Specified by:
subPropertiesin interfaceOntRelationalProperty- Parameters:
direct-booleaniftrueanswers the directly adjacent properties in the sub-property relation: i.e., eliminate any properties for which there is a longer route to reach that parent under the sub-property relation- Returns:
- distinct
Streamof object property expressions - See Also:
-
superProperties
Answers aStreamover all the properties that are declared to be super-properties of this property. Each element of theStreamwill have the same type as this property instance: if it is datatype property the method will return only data properties, etc. The parameterdirectcontrols selectivity over the properties that appear in theStream. Consider the following scenario:
(so:A rdfs:subPropertyOf :B . :A rdfs:subPropertyOf :C . :C rdfs:subPropertyOf :D .Ahas super-propertyBandC, andChas super-propertyD) In a raw model, with no inference support, listing the super-property ofAwill answerBandC. In an inferencing model,rdfs:subPropertyOfis known to be transitive, so the super-property iterator will includeD. Thedirectsuper-properties are those members of the closure of the inverse-subPropertyOf relation, restricted to properties that cannot be reached by a longer route, i.e., the ones that are directly adjacent to the given root. Thus, the direct super-property ofAareBandConly, and notD- even in an inferencing graph. Note that this is different from the entailments from the raw graph. Suppose we add to this example:
Now, in the raw graph,:A rdfs:subPropertyOf :D .Ahas super-propertyB,C,D. But the direct super-property ofAremain onlyBand C, since there is a longer pathA-C-Dthat means thatDis not a direct super-property ofA. The assertion in the raw graph thatAhas super-propertyDis essentially redundant, since this can be inferred from the closure of the graph.- Specified by:
superPropertiesin interfaceOntProperty- Specified by:
superPropertiesin interfaceOntRelationalProperty- Parameters:
direct-boolean: iftrueanswers the directly adjacent properties in the super-property relation, i.e., eliminate any property for which there is a longer route to reach that parent under the super-property relation- Returns:
- distinct
Streamof object property expressions - See Also:
-
propertyChains
Stream<OntList<OntObjectProperty>> propertyChains()Returns aStreamover all property chainontology lists that are attached to this Object Property Expression on the predicateowl:propertyChainAxiom.- Returns:
StreamofOntLists with generic-parameterOntOPE
-
addNegativeAssertion
OntNegativeAssertion.WithObjectProperty addNegativeAssertion(OntIndividual source, OntIndividual target) Adds a negative property assertion ontology object.- Parameters:
source-OntIndividualtarget-OntIndividual- Returns:
OntNegativeAssertion.WithObjectProperty- See Also:
-
createPropertyChain
Creates a property chain logical constructions as aontology []-listofObject Property Expressions that is attached to this Object Property Expression at object positions with the predicateowl:propertyChainAxiom. The resulting rdf-list will consist of all the elements of the specified collection in the given order with the possibility of duplication. Note: Anynulls in a collection will causeexception.- Parameters:
properties-Collection(preferablyList) ofobject property expressions- Returns:
OntListofOntObjectPropertys- See Also:
-
removePropertyChain
OntObjectProperty removePropertyChain(org.apache.jena.rdf.model.Resource list) throws OntJenaException Deletes the given property chain list including all its annotations.- Parameters:
list-Resourcecan beOntListorRDFList- Returns:
- this instance to allow cascading calls
- Throws:
OntJenaException- if in the whole graph, there is no property chain with the specified []-list- See Also:
-
asNamed
-
ranges
Returns all ranges. The statement pattern isP rdfs:range C, wherePis this object property, andCis one of the return class expressions.- Specified by:
rangesin interfaceOntProperty- Specified by:
rangesin interfaceOntRelationalProperty- Returns:
StreamofOntClasss- See Also:
-
ranges
Gets all direct or indirect ranges that present in RDF graph. Indirect ranges are calculated usingOntClass.subClasses(true)relationship. For example, consider the following statements (if someone has some dog, then this dog is a Dog):
from these statements it can be derived that if someone has some dog, then this dog can be a Labrador::Dog rdf:type owl:Class . :Labrador rdf:type owl:Class . :Labrador rdfs:subClassOf :Dog . :hasDog rdf:type owl:ObjectProperty . :hasDog rdfs:range :Dog .:hasDog rdfs:domain :Labrador .- Parameters:
direct-boolean- Returns:
StreamofOntClasses, distinct
-
subProperties
Lists all the properties that are declared to be sub-properties of this property (directly or indirectly). Note: the return elements have the same type as this instance.Equivalent to
this.subProperties(false).The pattern is
Pi rdfs:subPropertyOf PjwherePi, Pjare object properties.- Specified by:
subPropertiesin interfaceOntProperty- Specified by:
subPropertiesin interfaceOntRelationalProperty- Returns:
StreamofOntObjectPropertys- See Also:
-
superProperties
Lists all the properties that are declared to be super-properties of this property (directly or indirectly). Note: the return elements have the same type as this instance.Equivalent to
this.superProperties(false).The pattern is
Pi rdfs:subPropertyOf PjwherePi, Pjare object properties.- Specified by:
superPropertiesin interfaceOntProperty- Specified by:
superPropertiesin interfaceOntRelationalProperty- Returns:
StreamofOntObjectPropertys- See Also:
-
disjoints
Lists allOntDisjointsections where this object property is a member.- Returns:
- a
StreamofOntDisjoint.ObjectProperties
-
disjointProperties
Returns disjoint properties (statement:P1 owl:propertyDisjointWith P2).- Specified by:
disjointPropertiesin interfaceOntRelationalProperty- Returns:
StreamofOntObjectPropertys- See Also:
-
equivalentProperties
Returns all equivalent object properties (i.e.Pi owl:equivalentProperty Pj, wherePi- this property).- Specified by:
equivalentPropertiesin interfaceOntRelationalProperty- Returns:
StreamofOntObjectPropertys.- See Also:
-
inverseProperties
Lists all object properties from the right part of the statement_:this owl:inverseOf P. Please note: the return list items are not required to beInverse Object Property Expressions.- Returns:
StreamofOntObjectPropertys (eitherOntObjectProperty.InverseorOntObjectProperty.Named)- See Also:
-
negativeAssertions
Returns all associated negative object property assertions.- Specified by:
negativeAssertionsin interfaceOntRelationalProperty- Returns:
StreamofOntNegativeAssertion.WithObjectPropertys- See Also:
-
negativeAssertions
Returns all associated negative object property assertions for the specified source individual.- Parameters:
source-OntIndividual- Returns:
StreamofOntNegativeAssertion.WithObjectPropertys- See Also:
-
findPropertyChain
default Optional<OntList<OntObjectProperty>> findPropertyChain(org.apache.jena.rdf.model.RDFNode list) Finds the firstPropertyChainlogical construction attached to this property for the specified []-list as an object.- Parameters:
list-RDFNode- Returns:
Optionalaround theontology []-listwithobject property expressions as items
-
clearPropertyChains
Deletes all property chain lists including their annotations.- Returns:
- this instance to allow cascading calls
- See Also:
-
fromPropertyChain
Lists all members from the right part of statementP owl:propertyChainAxiom ( P1 ... Pn ), wherePis this property. Note: the result ignores repetitions, e.g., forSubObjectPropertyOf( ObjectPropertyChain( :hasParent :hasParent ) :hasGrandparent ), it returns only:hasParentproperty.- Returns:
- distinct
Streamof all sub-object properties, possible empty in case of nil-list or if there is no property-chains at all - See Also:
-
addPropertyChainAxiomStatement
Creates a property chainontology listand returns the statementP owl:propertyChainAxiom ( P1 ... Pn )to allow the addition of annotations. See RDF Graph annotation specification, for example, 2.3.1 Axioms that Generate a Main Triple.- Parameters:
properties- Array ofOntObjectPropertys withoutnulls- Returns:
OntStatementto provide the ability to add annotations subsequently- See Also:
-
addPropertyChainAxiomStatement
Adds a new sub-property-of chain statement.- Parameters:
properties- Collection ofOntObjectPropertys- Returns:
OntStatement(i.e._:this owl:propertyChainAxiom ( ... )) to provide the ability to add annotations subsequently- See Also:
-
addInverseFunctionalDeclaration
Creates theP rdf:type owl:InverseFunctionalPropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addTransitiveDeclaration
Creates theP rdf:type owl:TransitivePropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addSymmetricDeclaration
Creates theP rdf:type owl:SymmetricPropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addAsymmetricDeclaration
Creates theP rdf:type owl:AsymmetricPropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addReflexiveDeclaration
Creates theP rdf:type owl:ReflexivePropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addIrreflexiveDeclaration
Creates theP rdf:type owl:IrreflexivePropertyproperty declaration statement, wherePis this property.- Returns:
OntStatementto allow the subsequent addition of annotations- See Also:
-
addInverseOfStatement
Adds a new inverse-of statement.- Parameters:
other-OntObjectProperty, notnull- Returns:
OntStatementto allow subsequent annotations adding- See Also:
-
addEquivalentPropertyStatement
Creates and returns a newowl:equivalentPropertystatement with the given property as an object and this property as a subject.- Parameters:
other-OntObjectProperty, notnull- Returns:
OntStatementto allow subsequent annotations adding- See Also:
-
addPropertyDisjointWithStatement
Adds a disjoint object property (i.e., the_:this owl:propertyDisjointWith @otherstatement).- Parameters:
other-OntObjectProperty, notnull- Returns:
OntStatementto allow subsequent annotations adding- See Also:
-
addSuperProperty
Adds the given property as super property returning this property itself.- Parameters:
property-OntObjectProperty, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addSubProperty
Adds the given property as sub property returning this property itself.- Parameters:
property-OntObjectProperty, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addRange
Adds a statement with theRDFS.rangeas predicate and the specifiedclass expressionas an object.- Parameters:
range-OntClass, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addDomain
Adds a statement with theRDFS.domainas predicate and the specifiedclass expressionas an object.- Specified by:
addDomainin interfaceOntRelationalProperty- Parameters:
ce-OntClass, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addEquivalentProperty
Adds a newowl:equivalentPropertystatement.- Parameters:
other-OntObjectProperty, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addDisjointProperty
Adds a newowl:propertyDisjointWithstatement for this and the specified property.- Parameters:
other-OntDataProperty, notnull- Returns:
OntDataPropertythis instance to allow cascading calls- See Also:
-
addInverseProperty
Adds a new inverse-of a statement, returns this property instance.- Parameters:
other-OntObjectProperty, notnull- Returns:
- this instance to allow cascading calls
- See Also:
-
addPropertyChain
Adds a new sub-property-of a chain statement and returns this object itself. Note: the method saves a collection order with possible duplicates.- Parameters:
properties- anArrayofobject properties- Returns:
- this instance to allow cascading calls
- See Also:
-
addPropertyChain
Adds a new sub-property-of a chain statement and returns this object itself. Note: the method saves a collection order with possible duplicates.- Parameters:
properties- aCollectionofobject properties- Returns:
- this instance to allow cascading calls
- See Also:
-
removeSuperProperty
Removes the specified super property (predicate isrdfs:subPropertyOf), including the corresponding statement's annotations. No-op in case no such super-property is found. Ifnullis specified, the method removes all triples with predicaterdfs:subPropertyOfand this property as a subject.- Specified by:
removeSuperPropertyin interfaceOntProperty- Specified by:
removeSuperPropertyin interfaceOntRelationalProperty- Parameters:
property-Resourceornullto remove all direct super properties- Returns:
- this instance to allow cascading calls
-
removeSubProperty
Removes the specified sub property (predicate isrdfs:subPropertyOf), including the corresponding statement's annotations. No-op in case no such super-property is found. Ifnullis specified, the method removes all triples with predicaterdfs:subPropertyOfand this property as an object.- Specified by:
removeSubPropertyin interfaceOntProperty- Parameters:
property-Resourceornullto remove all direct super properties- Returns:
- this instance to allow cascading calls
-
removeEquivalentProperty
Removes the equivalent property statement (a statement with the predicateowl:equivalentProperty) for the specified resource (considered as an object), including the corresponding statement's annotations. No-op in case no such equivalent property relationship is found. Removes all triples with predicateowl:equivalentProperty(and all theirs annotation triples) ifnullis given.- Specified by:
removeEquivalentPropertyin interfaceOntRelationalProperty- Parameters:
property-Resourceornullto remove all equivalent properties- Returns:
- this instance to allow cascading calls
-
removeDisjointProperty
Removes theowl:propertyDisjointWithstatement (a statement with the predicateowl:propertyDisjointWith) for the specified resource (considered as an object), including the corresponding statement's annotations. No-op in case no such disjoint property relationship is found. Removes all triples with predicateowl:propertyDisjointWith(and all theirs annotation triples) ifnullis given.- Specified by:
removeDisjointPropertyin interfaceOntRelationalProperty- Parameters:
property-Resourceornullto remove all disjoint properties- Returns:
- this instance to allow cascading calls
- See Also:
-
removeDomain
Removes the specified domain resource (predicate isrdfs:domain), including the corresponding statement's annotations. No-op in case no such domain is found. Removes all domains ifnullis specified.- Specified by:
removeDomainin interfaceOntProperty- Specified by:
removeDomainin interfaceOntRelationalProperty- Parameters:
domain-Resource, ornullto remove all domains- Returns:
- this instance to allow cascading calls
-
removeRange
Removes the specified range resource (predicate isrdfs:range), including the corresponding statement's annotations. No-op in case no such range is found. Removes all ranges ifnullis specified.- Specified by:
removeRangein interfaceOntProperty- Specified by:
removeRangein interfaceOntRelationalProperty- Parameters:
range-Resource, ornullto remove all ranges- Returns:
- this instance to allow cascading calls
-
removeInverseProperty
Removes the statement with the predicateowl:inverseOfand the given object property as an object. If the argument isnull, allowl:inverseOfstatements will be removed for this object property. No-op in case there is noowl:inverseOfstatements.- Parameters:
other-OntObjectPropertyornullto remove allowl:inverseOfstatements- Returns:
- this instance to allow cascading calls
- See Also:
-
setFunctional
Adds or removesowl:FunctionalPropertydeclaration for this property according to the given boolean flag. Note: the statement is removed along with all its annotations.- Specified by:
setFunctionalin interfaceOntRelationalProperty- Parameters:
functional-trueif should be functional- Returns:
- this instance to allow cascading calls
- See Also:
-
inverseProperty
Finds the first object property from the right part of the statements_:x owl:inverseOf PNorP1 owl:inverseOf P2. Here_:xis an anonymous object property expression (i.e.Inverse Object Property),PNis anamed object propertyandP1,P2are any object property expressions. What exactly is the first statement is defined at the level of model; in general, it is unpredictable.- Returns:
OptionalofOntObjectProperty- See Also:
-
isInverseFunctional
default boolean isInverseFunctional()- Returns:
trueiff it is an inverse functional property
-
setInverseFunctional
Adds or removes theP rdf:type owl:InverseFunctionalPropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
inverseFunctional- iftruethe property must be inverse-functional- Returns:
- this instance to allow cascading calls
- See Also:
-
isTransitive
default boolean isTransitive()- Returns:
trueiff it is a transitive property
-
setTransitive
Adds or removes theP rdf:type owl:TransitivePropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
transitive- iftruethe property must be transitive- Returns:
- this instance to allow cascading calls
- See Also:
-
isSymmetric
default boolean isSymmetric()- Returns:
trueiff it is a symmetric property
-
setSymmetric
Adds or removes theP rdf:type owl:SymmetricPropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
symmetric- iftruethe property must be symmetric- Returns:
- this instance to allow cascading calls
- See Also:
-
isAsymmetric
default boolean isAsymmetric()- Returns:
trueiff it is an asymmetric property
-
setAsymmetric
Adds or removes theP rdf:type owl:AsymmetricPropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
asymmetric- iftruethe property must be asymmetric- Returns:
- this instance to allow cascading calls
- See Also:
-
isReflexive
default boolean isReflexive()- Returns:
trueiff it is a reflexive property
-
setReflexive
Adds or removes theP rdf:type owl:ReflexivePropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
reflexive- iftruethe property must be reflexive- Returns:
- this instance to allow cascading calls
- See Also:
-
isIrreflexive
default boolean isIrreflexive()- Returns:
trueiff it is an irreflexive property
-
setIrreflexive
Adds or removes theP rdf:type owl:IrreflexivePropertystatement depending on the given flag and returns this property to allow cascading calls. Note: the statement is removed along with all its annotations.- Parameters:
irreflexive- iftruethe property must be irreflexive- Returns:
- this instance to allow cascading calls
- See Also:
-
getModel
OntModel getModel()Returns the ontology model associated with this resource. If the Resource was not created by a Model, the result may be null.- Specified by:
getModelin interfaceorg.apache.jena.rdf.model.RDFNode- Returns:
OntModel
-
isLocal
boolean isLocal()Determines if this Ontology Resource is locally defined. This means that the resource definition (i.e., a theroot statement) belongs to the base ontology graph. If the ontology contains subgraphs (which should matchowl:importsin OWL) and the resource is defined in one of them, than this method called from top-level interface will returnfalse.- Returns:
trueif this resource is local to the base model graph.
-
getAs
Safely converts this RDF resource to the giventypeinterface, if it is possible. Otherwise, returnsnull. A calling of this method is effectively equivalent to the expressionthis.canAs(type) ? this.as(type) : null.- Type Parameters:
X- any subtype ofRDFNode- Parameters:
type- aClass-type of the desired RDF view (interface)- Returns:
- an instance of the type
Xornull - See Also:
-
RDFNode.as(Class)RDFNode.canAs(Class)
-