gate.creole.ontology
Class ObjectPropertyImpl
java.lang.Object
gate.creole.ontology.OntologyResourceImpl
gate.creole.ontology.PropertyImpl
gate.creole.ontology.ObjectPropertyImpl
- All Implemented Interfaces:
- ObjectProperty, OntologyConstants, OntologyResource, Property
- Direct Known Subclasses:
- SymmetricPropertyImpl, TransitivePropertyImpl
public class ObjectPropertyImpl
- extends PropertyImpl
- implements ObjectProperty
Fields inherited from class gate.creole.ontology.PropertyImpl |
directDomain, directRange, domain, functional, inverseFunctional, range, samePropertiesSet, subPropertiesSet, subPropertiesTransitiveClosure, superPropertiesSet, superPropertiesTransitiveClosure |
Methods inherited from class gate.creole.ontology.PropertyImpl |
addSubProperty, calculateSubPropertiesClosure, calculateSuperPropertiesClosure, getDomain, getName, getSamePropertyAs, getSubProperties, getSuperProperties, getURI, isFunctional, isInverseFunctional, isValidDomain, isValidRange, recalculateDomain, recalculateRange, removeSubProperty, removeSuperProperty, setFunctional, setInverseFunctional, setSamePropertyAs, setURI, toString |
Methods inherited from class gate.creole.ontology.OntologyResourceImpl |
addPropertyValue, getComment, getOntology, getPropertyValue, getPropertyValues, getSetPropertiesNames, getTaxonomy, removePropertyValue, removePropertyValues, setComment, setName, setOntology |
Methods inherited from interface gate.creole.ontology.Property |
addSubProperty, getDomain, getSamePropertyAs, getSubProperties, getSuperProperties, isFunctional, isInverseFunctional, isValidDomain, isValidRange, removeSubProperty, removeSuperProperty, setFunctional, setInverseFunctional, setSamePropertyAs |
Methods inherited from interface gate.creole.ontology.OntologyResource |
addPropertyValue, getComment, getName, getOntology, getPropertyValues, getSetPropertiesNames, getTaxonomy, getURI, removePropertyValue, removePropertyValues, setComment, setName, setURI |
inversePropertiesSet
protected Set inversePropertiesSet
ObjectPropertyImpl
public ObjectPropertyImpl(String name,
String comment,
OClass aDomainClass,
OClass aRange,
Ontology anOntology)
- Convenience constructor for simple cases where the domain and range are
single classes.
- Parameters:
aName
- the name of the property.aDomainClass
- the class representing the domain.aRange
- the class representing the range.anOntology
- the ontology this property belongs to.
ObjectPropertyImpl
public ObjectPropertyImpl(String name,
String comment,
Set aDomain,
Set aRange,
Ontology anOntology)
- Constructor for this property.
- Parameters:
aName
- the name of the property.aDomain
- the set of domain restrictions for this property. A set of
OClass
values.aRange
- the set of range restrictions for this property. A set of
OClass
values.anOntology
- the ontology this property belongs to.
addSuperProperty
public void addSuperProperty(Property property)
- Description copied from interface:
Property
- Adds a SubPropertyOf relation between the given property and this.
- Specified by:
addSuperProperty
in interface Property
- Overrides:
addSuperProperty
in class PropertyImpl
isValidRange
public boolean isValidRange(OInstance instance)
- Specified by:
isValidRange
in interface ObjectProperty
- Parameters:
instance
-
- Returns:
- true if this value is compatible with the range restrictions on the
property. False otherwise.
getRange
public Set getRange()
- Description copied from class:
PropertyImpl
- Returns the set of range classes for this property. This is composed from
the classes declared as range restriction for this property plus all the
range restrictions from the super-properties.
- Specified by:
getRange
in interface Property
- Overrides:
getRange
in class PropertyImpl
- Returns:
- a set of
OClass
or Class
objects.
getInverseProperties
public Set getInverseProperties()
- Description copied from interface:
ObjectProperty
- Returns the set of inverse properties for this property. Null if no such
properties. The set contains objects of KBProperty instances.
- Specified by:
getInverseProperties
in interface ObjectProperty
- Returns:
- a
Set
value.
setInverseOf
public void setInverseOf(Property theInverse)
- Description copied from interface:
ObjectProperty
- Set theInverse as inverse property to this property.
- Specified by:
setInverseOf
in interface ObjectProperty