|
|||||||||||
| 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 |
| 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 |
| 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 belongs| Method Detail |
public String getId()
getId in interface TClasspublic Taxonomy getOntology()
getOntology in interface TClasspublic String getURI()
TClass
getURI in interface TClasspublic void setURI(String theURI)
TClass
setURI in interface TClasstheURI - the new URI to be setpublic String getComment()
TClass
getComment in interface TClasspublic void setComment(String aComment)
TClass
setComment in interface TClassaComment - the comment to be setpublic String getName()
TClass
getName in interface TClasspublic void setName(String aName)
TClass
setName in interface TClassaName - the new name of the classpublic void addSubClass(TClass subClass)
TClass
addSubClass in interface TClasssubClass - the subClass to be added.public void addSuperClass(TClass superClass)
TClass
addSuperClass in interface TClasssuperClass - the super class to be addedpublic void removeSubClass(TClass subClass)
TClass
removeSubClass in interface TClasssubClass - the sub class to be removedpublic void removeSuperClass(TClass superClass)
TClass
removeSuperClass in interface TClasssuperClass - the super class to be removed
public Set getSubClasses(byte closure)
throws NoSuchClosureTypeException
TClass
getSubClasses in interface TClassclosure - either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException - if an unknown closure is specified.
public Set getSuperClasses(byte closure)
throws NoSuchClosureTypeException
TClass
getSuperClasses in interface TClassclosure - either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException - if an unknown closure is specified.public void inferSubClassesTransitiveClosure()
TClass
inferSubClassesTransitiveClosure in interface TClasspublic void inferSuperClassesTransitiveClosure()
TClass
inferSuperClassesTransitiveClosure in interface TClasspublic boolean isTopClass()
TClass
isTopClass in interface TClasspublic 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 TClasspublic ArrayList getSuperClassesVSDistance()
TClass
getSuperClassesVSDistance in interface TClasspublic 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 | ||||||||||