|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.ontology.TClassImpl
Represents a single ontology class.
Field Summary | |
(package private) String |
comment
the comment of the class |
(package private) Set |
directSubClasses
the set of direct sub classes of this class |
(package private) Set |
directSuperClasses
the set of direct super classes of this class |
(package private) String |
id
the id of the class |
(package private) String |
name
the name of the class |
(package private) Taxonomy |
ontology
the ontology to which the class belongs |
(package private) Set |
subClassesTransitiveClosure
The sub classes transitive closure set |
(package private) Set |
superClassesTransitiveClosure
The super classes transitive closure set |
(package private) String |
uri
the URI of the class |
Fields inherited from interface gate.creole.ontology.TClass |
DIRECT_CLOSURE, TRANSITIVE_CLOSURE |
Constructor Summary | |
TClassImpl(String anId,
String aName,
String aComment,
Taxonomy anOntology)
Creates a new class given id,name,comment and ontology. |
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 |
getComment()
Gets the comment of the class. |
String |
getId()
Gets the id of the class. |
String |
getName()
Gets class name. |
Taxonomy |
getOntology()
Gets the ontology to which this class is associated. |
Set |
getSubClasses(byte closure)
Gets the subclasses according to the desired closure. |
static Set |
getSubClasses(byte closure,
Set classes)
|
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. |
static Set |
getSuperClasses(byte closure,
Set classes)
|
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(TClass subClass)
Removes a sub class. |
void |
removeSuperClass(TClass 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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
Taxonomy ontology
String uri
String id
String name
String comment
Set directSubClasses
Set directSuperClasses
Set subClassesTransitiveClosure
Set superClassesTransitiveClosure
Constructor Detail |
public TClassImpl(String anId, String aName, String aComment, Taxonomy anOntology)
anId
- the id of the new classaName
- the name of the new classaComment
- the comment of the new classanOntology
- the ontology to which the new class belongsMethod Detail |
public String getId()
getId
in interface TClass
public Taxonomy getOntology()
getOntology
in interface TClass
public String getURI()
TClass
getURI
in interface TClass
public void setURI(String theURI)
TClass
setURI
in interface TClass
theURI
- the new URI to be setpublic String getComment()
TClass
getComment
in interface TClass
public void setComment(String aComment)
TClass
setComment
in interface TClass
aComment
- the comment to be setpublic String getName()
TClass
getName
in interface TClass
public void setName(String aName)
TClass
setName
in interface TClass
aName
- the new name of the classpublic void addSubClass(TClass subClass)
TClass
addSubClass
in interface TClass
subClass
- the subClass to be added.public void addSuperClass(TClass superClass)
TClass
addSuperClass
in interface TClass
superClass
- the super class to be addedpublic void removeSubClass(TClass subClass)
TClass
removeSubClass
in interface TClass
subClass
- the sub class to be removedpublic void removeSuperClass(TClass superClass)
TClass
removeSuperClass
in interface TClass
superClass
- the super class to be removedpublic Set getSubClasses(byte closure) throws NoSuchClosureTypeException
TClass
getSubClasses
in interface TClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException
- if an unknown closure is specified.public Set getSuperClasses(byte closure) throws NoSuchClosureTypeException
TClass
getSuperClasses
in interface TClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException
- if an unknown closure is specified.public void inferSubClassesTransitiveClosure()
TClass
inferSubClassesTransitiveClosure
in interface TClass
public void inferSuperClassesTransitiveClosure()
TClass
inferSuperClassesTransitiveClosure
in interface TClass
public boolean isTopClass()
TClass
isTopClass
in interface TClass
public String toString()
TClass
toString
in interface TClass
public static Set getSubClasses(byte closure, Set classes)
public static Set getSuperClasses(byte closure, Set classes)
public ArrayList getSubClassesVSDistance()
TClass
getSubClassesVSDistance
in interface TClass
public ArrayList getSuperClassesVSDistance()
TClass
getSuperClassesVSDistance
in interface TClass
public boolean equals(Object o)
TClass
equals
in interface TClass
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |