|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.creole.ontology.OntologyResourceImpl
gate.creole.ontology.TClassImpl
public class TClassImpl
Represents a single ontology class.
Field Summary |
---|
Fields inherited from class gate.creole.ontology.OntologyResourceImpl |
---|
comment, instanceProperties, name, ontology, taxonomy, uri |
Fields inherited from interface gate.creole.ontology.OntologyConstants |
---|
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 resource. |
String |
getId()
Gets the id of the class. |
String |
getName()
Gets resource name. |
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. |
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 resource comment. |
void |
setName(String aName)
Sets the resource name. |
void |
setURI(String theURI)
Sets the URI of the resource. |
String |
toString()
Dumps the class to string. |
Methods inherited from class gate.creole.ontology.OntologyResourceImpl |
---|
addPropertyValue, getOntology, getPropertyValue, getPropertyValues, getSetPropertiesNames, getTaxonomy, getURI, removePropertyValue, removePropertyValues, setOntology |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gate.creole.ontology.OntologyResource |
---|
addPropertyValue, getOntology, getPropertyValues, getSetPropertiesNames, getTaxonomy, getURI, removePropertyValue, removePropertyValues |
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 void setURI(String theURI)
OntologyResource
setURI
in interface OntologyResource
setURI
in class OntologyResourceImpl
theURI
- The URI to set.public String getComment()
OntologyResource
getComment
in interface OntologyResource
getComment
in class OntologyResourceImpl
public void setComment(String aComment)
OntologyResource
setComment
in interface OntologyResource
setComment
in class OntologyResourceImpl
aComment
- The comment to set.public String getName()
OntologyResource
getName
in interface OntologyResource
getName
in class OntologyResourceImpl
public void setName(String aName)
OntologyResource
setName
in interface OntologyResource
setName
in class OntologyResourceImpl
aName
- The name to set.public 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)
TClass
getSubClasses
in interface TClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
public Set getSuperClasses(byte closure)
TClass
getSuperClasses
in interface TClass
closure
- either DIRECT_CLOSURE or TRASITIVE_CLOSURE
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
toString
in class Object
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
equals
in class Object
o
- the ontology class to be tested versus this one.
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |