gate.creole.ontology
Interface OClass

All Known Implementing Classes:
OClassImpl

public interface OClass

An Interface representing a single ontology class


Field Summary
static byte DIRECT_CLOSURE
          denotes a direct closure(no transitivity)
static byte TRANSITIVE_CLOSURE
          denotes atransitive closure
 
Method Summary
 void addSubClass(OClass subClass)
          Adds a sub class to this class.
 void addSuperClass(OClass superClass)
          Adds a super class to this class.
 boolean equals(Object o)
          Checks the equality of two classes.
 String getComment()
          Gets the comment of the class.
 String getId()
          Gets the id.
 String getName()
          Gets class name.
 Ontology getOntology()
          Gets the ontology to which the class belongs.
 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.
 String getURI()
          Gets the URI of the class.
 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(OClass subClass)
          Removes a sub class.
 void removeSuperClass(OClass superClass)
          Removes a super class.
 void setComment(String aComment)
          Sets the class comment.
 void setName(String aName)
          Sets the class name.
 void setURI(String theURI)
          Sets the URI of the class.
 String toString()
          Dumps the class to string.
 

Field Detail

DIRECT_CLOSURE

public static final byte DIRECT_CLOSURE
denotes a direct closure(no transitivity)

See Also:
Constant Field Values

TRANSITIVE_CLOSURE

public static final byte TRANSITIVE_CLOSURE
denotes atransitive closure

See Also:
Constant Field Values
Method Detail

getId

public String getId()
Gets the id.

Returns:
the id of the class

getOntology

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

Returns:
the ontology to which the class belongs

getURI

public String getURI()
Gets the URI of the class.

Returns:
the URI of the class

setURI

public void setURI(String theURI)
Sets the URI of the class.

Parameters:
theURI - the new URI to be set

getComment

public String getComment()
Gets the comment of the class.

Returns:
the comment of the class

setComment

public void setComment(String aComment)
Sets the class comment.

Parameters:
aComment - the comment to be set

getName

public String getName()
Gets class name.

Returns:
the name of the class

setName

public void setName(String aName)
Sets the class name.

Parameters:
aName - the new name of the class

addSubClass

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

Parameters:
subClass - the subClass to be added.

addSuperClass

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

Parameters:
superClass - the super class to be added

removeSubClass

public void removeSubClass(OClass subClass)
Removes a sub class.

Parameters:
subClass - the sub class to be removed

removeSuperClass

public void removeSuperClass(OClass superClass)
Removes a super class.

Parameters:
superClass - the super class to be removed

getSubClasses

public Set getSubClasses(byte closure)
                  throws NoSuchClosureTypeException
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

public Set getSuperClasses(byte closure)
                    throws NoSuchClosureTypeException
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

public void inferSubClassesTransitiveClosure()
Infers the sub classes transitive closure.


inferSuperClassesTransitiveClosure

public void inferSuperClassesTransitiveClosure()
Infers the super classes transitive closure.


isTopClass

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

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

toString

public String toString()
Dumps the class to string.

Returns:
the string representation of the class.

getSuperClassesVSDistance

public 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

public 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

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

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