GATE
Version 3.1-2270

gate.creole.ontology
Interface TClass

All Superinterfaces:
OntologyConstants, OntologyResource
All Known Subinterfaces:
OClass
All Known Implementing Classes:
OClassImpl, TClassImpl

public interface TClass
extends OntologyResource, OntologyConstants

An Interface representing a single ontology class


Field Summary
 
Fields inherited from interface gate.creole.ontology.OntologyConstants
DIRECT_CLOSURE, TRANSITIVE_CLOSURE
 
Method Summary
 void addSubClass(TClass subClass)
          Adds a sub class to this class.
 void addSuperClass(TClass superClass)
          Adds a super class to this class.
 boolean equals(Object o)
          Checks the equality of two classes.
 String getId()
          Gets the id.
 Set getSubClasses(byte closure)
          Gets the subclasses according to the desired closure.
 ArrayList getSubClassesVSDistance()
          Gets the sub classes, and returns them in an array list where on each index there is a collection of the sub classes at distance - the index.
 Set getSuperClasses(byte closure)
          Gets the super classes according to the desired closure.
 ArrayList getSuperClassesVSDistance()
          Gets the super classes, and returns them in an array list where on each index there is a collection of the super classes at distance - the index.
 void inferSubClassesTransitiveClosure()
          Infers the sub classes transitive closure.
 void inferSuperClassesTransitiveClosure()
          Infers the super classes transitive closure.
 boolean isTopClass()
          Checks whether this class is a top.
 void removeSubClass(TClass subClass)
          Removes a sub class.
 void removeSuperClass(TClass superClass)
          Removes a super class.
 String toString()
          Dumps the class to string.
 
Methods inherited from interface gate.creole.ontology.OntologyResource
addPropertyValue, getComment, getName, getOntology, getPropertyValues, getSetPropertiesNames, getTaxonomy, getURI, removePropertyValue, removePropertyValues, setComment, setName, setURI
 

Method Detail

getId

String getId()
Gets the id.

Returns:
the id of the class

addSubClass

void addSubClass(TClass subClass)
Adds a sub class to this class.

Parameters:
subClass - the subClass to be added.

addSuperClass

void addSuperClass(TClass superClass)
Adds a super class to this class.

Parameters:
superClass - the super class to be added

removeSubClass

void removeSubClass(TClass subClass)
Removes a sub class.

Parameters:
subClass - the sub class to be removed

removeSuperClass

void removeSuperClass(TClass superClass)
Removes a super class.

Parameters:
superClass - the super class to be removed

getSubClasses

Set getSubClasses(byte closure)
Gets the subclasses according to the desired closure.

Parameters:
closure - either DIRECT_CLOSURE or TRASITIVE_CLOSURE
Returns:
the set of subclasses
Throws:
NoSuchClosureTypeException - if an unknown closure is specified.

getSuperClasses

Set getSuperClasses(byte closure)
Gets the super classes according to the desired closure.

Parameters:
closure - either DIRECT_CLOSURE or TRASITIVE_CLOSURE
Returns:
the set of super classes
Throws:
NoSuchClosureTypeException - if an unknown closure is specified.

inferSubClassesTransitiveClosure

void inferSubClassesTransitiveClosure()
Infers the sub classes transitive closure.


inferSuperClassesTransitiveClosure

void inferSuperClassesTransitiveClosure()
Infers the super classes transitive closure.


isTopClass

boolean isTopClass()
Checks whether this class is a top.

Returns:
true if this is a top class, otherwise - false.

toString

String toString()
Dumps the class to string.

Overrides:
toString in class Object
Returns:
the string representation of the class.

getSuperClassesVSDistance

ArrayList getSuperClassesVSDistance()
Gets the super classes, and returns them in an array list where on each index there is a collection of the super classes at distance - the index.

Returns:
distance from this class to a set of super classes e.g. 1 : a,b 2 : c,d

getSubClassesVSDistance

ArrayList getSubClassesVSDistance()
Gets the sub classes, and returns them in an array list where on each index there is a collection of the sub classes at distance - the index.

Returns:
distance from this class to a set of sub classes e.g. 1 : a,b 2 : c,d

equals

boolean equals(Object o)
Checks the equality of two classes.

Overrides:
equals in class Object
Parameters:
o - the ontology class to be tested versus this one.
Returns:
true, if the classes are equal, otherwise - false.

GATE
Version 3.1-2270