public class OwlObjectProperty extends OwlProperty
Constructor and Description |
---|
OwlObjectProperty(java.lang.String name)
Create a new OwlObjectProperty
|
OwlObjectProperty(java.lang.String name,
OwlClass propDomain,
OwlClass propRange)
Create a new OwlObjectProperty with the specified domain and range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addValueToThing(OwlThing thing,
java.lang.String value)
Apply the value to this property for the given OwlThing.
|
boolean |
buildRelation(OwlThing owlThing,
OwlThing related,
RdfTriple.TripleType relationType)
Build the relationship for this property for the OwlThings.
|
static OwlObjectProperty |
createFromElement(org.w3c.dom.Element element)
Create a property from an OWL RDF object property element.
|
OwlObjectProperty |
getInverse()
Get the inverse property for this property
|
Property |
getParent()
Get the parent Object property, if any, for this property
|
static OwlObjectProperty |
getProperty(java.lang.String name)
Get the Object property from the internal map of properties
|
static java.util.Set<java.lang.String> |
getPropertyNames()
Get the list of ObjectProperty names
|
OwlClass |
getRange()
Get the range for this Object Property.
|
boolean |
isSymmetric()
Return whether this ObjectProperty is symmetric
|
boolean |
isTransitive()
Return whether this ObjectProperty is transitive
|
void |
removeRelation(OwlThing owlThing,
OwlThing related)
Removes the relationship for this property for the OwlThings.
|
void |
setInverse(OwlObjectProperty inverseProperty)
Set the inverse property.
|
void |
setName(java.lang.String propName)
Set the name of this object property
|
void |
setParent(OwlObjectProperty prop)
Set the parent for this property
|
void |
setRange(OwlClass owlCls)
Set the range for this property
|
void |
setSymmetric(boolean flag)
Set whether this property is symmetric
|
void |
setTransitive(boolean flag)
Set whether this property is transitive
|
getComment, getDisplayName, getDomain, isFunctional, isInverseFunctional, setComment, setDisplayName, setDomain, setFunctional, setInverseFunctional
addProperty, clearDefined, equals, getName, getUri, hashCode, isDescendant, isDescendant, putProperty, setUri, toString
public OwlObjectProperty(java.lang.String name)
name
- the property namepublic boolean addValueToThing(OwlThing thing, java.lang.String value)
addValueToThing
in class OwlProperty
thing
- The OwlThing to apply the property to.value
- The value for this propertypublic boolean buildRelation(OwlThing owlThing, OwlThing related, RdfTriple.TripleType relationType)
related
OwlThing as the value of this object
property for the OwlThing owlThing
. This method also sets
any properties on objects due to symmetric or transitive relationships.
If there is an inverse property, this method also sets the inverse
property on the related OwlThing.owlThing
- the thing to set the property forrelated
- the thing to set as the value for this property.relationType
- the base relationship typepublic OwlObjectProperty getInverse()
public Property getParent()
public OwlClass getRange()
public boolean isSymmetric()
public boolean isTransitive()
public void removeRelation(OwlThing owlThing, OwlThing related)
related
OwlThing as a value of this
object property for the OwlThing owlThing
. This method also
removes any properties on objects due to symmetric relationships. If
there is an inverse property, this method also removes the inverse
property on the related OwlThing.owlThing
- the thing to set the property forrelated
- the thing to set as the value for this property.public void setInverse(OwlObjectProperty inverseProperty)
inverseProperty
- the inverse object propertypublic void setName(java.lang.String propName)
public void setParent(OwlObjectProperty prop)
prop
- the parent propertypublic void setRange(OwlClass owlCls)
owlCls
- the range for the propertypublic void setSymmetric(boolean flag)
flag
- flag indicating a symmetric propertypublic void setTransitive(boolean flag)
flag
- flag indicating a transitive propertypublic static OwlObjectProperty createFromElement(org.w3c.dom.Element element)
element
- the element containing the object property parameters.public static OwlObjectProperty getProperty(java.lang.String name)
name
- the name of the propertypublic static java.util.Set<java.lang.String> getPropertyNames()