GATE
Version 3.1-2270

gate.creole.ontology
Class ObjectPropertyImpl

java.lang.Object
  extended by gate.creole.ontology.OntologyResourceImpl
      extended by gate.creole.ontology.PropertyImpl
          extended by gate.creole.ontology.ObjectPropertyImpl
All Implemented Interfaces:
ObjectProperty, OntologyConstants, OntologyResource, Property
Direct Known Subclasses:
SymmetricPropertyImpl, TransitivePropertyImpl

public class ObjectPropertyImpl
extends PropertyImpl
implements ObjectProperty


Field Summary
protected  Set inversePropertiesSet
           
 
Fields inherited from class gate.creole.ontology.PropertyImpl
directDomain, directRange, domain, functional, inverseFunctional, range, samePropertiesSet, subPropertiesSet, subPropertiesTransitiveClosure, superPropertiesSet, superPropertiesTransitiveClosure
 
Fields inherited from class gate.creole.ontology.OntologyResourceImpl
comment, instanceProperties, name, ontology, taxonomy, uri
 
Fields inherited from interface gate.creole.ontology.OntologyConstants
DIRECT_CLOSURE, TRANSITIVE_CLOSURE
 
Constructor Summary
ObjectPropertyImpl(String name, String comment, OClass aDomainClass, OClass aRange, Ontology anOntology)
          Convenience constructor for simple cases where the domain and range are single classes.
ObjectPropertyImpl(String name, String comment, Set aDomain, Set aRange, Ontology anOntology)
          Constructor for this property.
 
Method Summary
 void addSuperProperty(Property property)
          Adds a SubPropertyOf relation between the given property and this.
 Set getInverseProperties()
          Returns the set of inverse properties for this property.
 Set getRange()
          Returns the set of range classes for this property.
 boolean isValidRange(OInstance instance)
           
 void setInverseOf(Property theInverse)
          Set theInverse as inverse property to this property.
 
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
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
 

Field Detail

inversePropertiesSet

protected Set inversePropertiesSet
Constructor Detail

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.
Method Detail

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

GATE
Version 3.1-2270