|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.ontology.OClassImpl
Represents a single ontology class.
Field Summary |
Fields inherited from interface gate.creole.ontology.OClass |
DIRECT_CLOSURE, TRANSITIVE_CLOSURE |
Constructor Summary | |
OClassImpl(String anId,
String aName,
String aComment,
Ontology anOntology)
Creates a new class given id,name,comment and ontology. |
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 of the class. |
String |
getName()
Gets class name. |
Ontology |
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(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. |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public OClassImpl(String anId, String aName, String aComment, Ontology 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 OClass
public Ontology getOntology()
getOntology
in interface OClass
public String getURI()
OClass
getURI
in interface OClass
public void setURI(String theURI)
OClass
setURI
in interface OClass
theURI
- the new URI to be setpublic String getComment()
OClass
getComment
in interface OClass
public void setComment(String aComment)
OClass
setComment
in interface OClass
aComment
- the comment to be setpublic String getName()
OClass
getName
in interface OClass
public void setName(String aName)
OClass
setName
in interface OClass
aName
- the new name of the classpublic void addSubClass(OClass subClass)
OClass
addSubClass
in interface OClass
subClass
- the subClass to be added.public void addSuperClass(OClass superClass)
OClass
addSuperClass
in interface OClass
superClass
- the super class to be addedpublic void removeSubClass(OClass subClass)
OClass
removeSubClass
in interface OClass
subClass
- the sub class to be removedpublic void removeSuperClass(OClass superClass)
OClass
removeSuperClass
in interface OClass
superClass
- the super class to be removedpublic Set getSubClasses(byte closure) throws NoSuchClosureTypeException
OClass
getSubClasses
in interface OClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException
- if an unknown closure is specified.public Set getSuperClasses(byte closure) throws NoSuchClosureTypeException
OClass
getSuperClasses
in interface OClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
NoSuchClosureTypeException
- if an unknown closure is specified.public void inferSubClassesTransitiveClosure()
OClass
inferSubClassesTransitiveClosure
in interface OClass
public void inferSuperClassesTransitiveClosure()
OClass
inferSuperClassesTransitiveClosure
in interface OClass
public boolean isTopClass()
OClass
isTopClass
in interface OClass
public String toString()
OClass
toString
in interface OClass
public static Set getSubClasses(byte closure, Set classes)
public static Set getSuperClasses(byte closure, Set classes)
public ArrayList getSubClassesVSDistance()
OClass
getSubClassesVSDistance
in interface OClass
public ArrayList getSuperClassesVSDistance()
OClass
getSuperClassesVSDistance
in interface OClass
public boolean equals(Object o)
OClass
equals
in interface OClass
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |