gate.creole.ontology
Interface Property

All Known Subinterfaces:
DatatypeProperty, FunctionalProperty, ObjectProperty, ReflexiveProperty, SymmetricProperty, TransitiveProperty
All Known Implementing Classes:
DatatypePropertyImpl, ObjectPropertyImpl, PropertyImpl

public interface Property


Method Summary
 OClass getDomain()
          Returns the domain of a property.
 String getName()
           
 Ontology getOntology()
          Gets the ontology to which the class belongs.
 Object getRange()
           
 Set getSamePropertyAs()
          Returns a set of all KBProperty instances that are in SamePropertyAs relation with this property.
 Set getSubPropertyOf()
          Return a set of all local names of properties that are in a subPropertyOf relation with this property.
 String getURI()
          Returns the URI of this property.
 boolean isValueCompatible(Object value)
           
 void setSamePropertyAs(Property theProperty)
          Add a samePropertyAs relation between the two properties.
 void setSubPropertyOf(String propertyName)
          Add a SubPropertyOf relation between the given property and this.
 void setURI(String theURI)
          Sets the URI of the property
 

Method Detail

getName

public String getName()
Returns:
the name of the property within the ontology's namespace

getURI

public String getURI()
Returns the URI of this property.


setURI

public void setURI(String theURI)
Sets the URI of the property

Parameters:
theURI -

setSamePropertyAs

public void setSamePropertyAs(Property theProperty)
Add a samePropertyAs relation between the two properties. Each property has a set of these, so it is possible to have samePropertyAs relation between more than two properties.

Parameters:
theProperty -

getSamePropertyAs

public Set getSamePropertyAs()
Returns a set of all KBProperty instances that are in SamePropertyAs relation with this property. Or null if there are no such properties.

Returns:
a Set value.

setSubPropertyOf

public void setSubPropertyOf(String propertyName)
Add a SubPropertyOf relation between the given property and this.

Parameters:
propertyName -

getSubPropertyOf

public Set getSubPropertyOf()
Return a set of all local names of properties that are in a subPropertyOf relation with this property. Null if no such properties. This is not a transitive closure. To obtain the full depth of the property hierarchy, one needs then to get the sub-properties of the sub-properties of this, etc.

Returns:
a Set value.

getDomain

public OClass getDomain()
Returns the domain of a property. There is no corresponding set method, because the property is created at knowledge base level by specifying its domain and range


isValueCompatible

public boolean isValueCompatible(Object value)
Parameters:
value -
Returns:
true if this value is compatible with the range restrictions on the property. False otherwise.

getOntology

public Ontology getOntology()
Gets the ontology to which the class belongs.

Returns:
the ontology to which the class belongs

getRange

public Object getRange()