gate.creole.ontology
Class PropertyImpl

java.lang.Object
  extended bygate.creole.ontology.PropertyImpl
All Implemented Interfaces:
Property
Direct Known Subclasses:
DatatypePropertyImpl, ObjectPropertyImpl

public abstract class PropertyImpl
extends Object
implements Property


Constructor Summary
PropertyImpl(String aName, OClass aDomain, Ontology aKB)
           
 
Method Summary
 OClass getDomain()
          Returns the domain of a property.
 String getName()
           
 Ontology getOntology()
          Gets the ontology to which the class belongs.
 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.
 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
 String toString()
           
 
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
getRange, isValueCompatible
 

Constructor Detail

PropertyImpl

public PropertyImpl(String aName,
                    OClass aDomain,
                    Ontology aKB)
Method Detail

getName

public String getName()
Specified by:
getName in interface Property
Returns:
the name of the property within the ontology's namespace

getURI

public String getURI()
Description copied from interface: Property
Returns the URI of this property.

Specified by:
getURI in interface Property

setURI

public void setURI(String theURI)
Description copied from interface: Property
Sets the URI of the property

Specified by:
setURI in interface Property
Parameters:
theURI -

setSamePropertyAs

public void setSamePropertyAs(Property theProperty)
Description copied from interface: Property
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.

Specified by:
setSamePropertyAs in interface Property
Parameters:
theProperty -

getSamePropertyAs

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

Specified by:
getSamePropertyAs in interface Property
Returns:
a Set value.

setSubPropertyOf

public void setSubPropertyOf(String propertyName)
Description copied from interface: Property
Add a SubPropertyOf relation between the given property and this.

Specified by:
setSubPropertyOf in interface Property
Parameters:
propertyName -

getSubPropertyOf

public Set getSubPropertyOf()
Description copied from interface: Property
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.

Specified by:
getSubPropertyOf in interface Property
Returns:
a Set value.

getDomain

public OClass getDomain()
Description copied from interface: Property
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

Specified by:
getDomain in interface Property

getOntology

public Ontology getOntology()
Description copied from interface: Property
Gets the ontology to which the class belongs.

Specified by:
getOntology in interface Property
Returns:
the ontology to which the class belongs

toString

public String toString()