|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Defines the interface of an ontology
Method Summary | |
void |
addClass(OClass theClass)
Adds a class to the ontology. |
boolean |
containsClassByName(String theName)
Checks if the ontology contains a class with the given name. |
OClass |
createClass(String aName,
String aComment)
Creates a new OClass and returns it. |
boolean |
equals(Object o)
Checks the equality of two ontologies. |
OClass |
getClassByName(String theName)
Retrieves a class by its name. |
Set |
getClasses()
Retrieves all classes as a set. |
Iterator |
getClasses(Comparator comp)
Retireves an iterator over the classes, ordered according to the comparator. |
String |
getComment()
Gets the comment of this ontology. |
String |
getId()
Gets the id of this ontology. |
String |
getLabel()
Gets the label. |
Ontology |
getOntology(URL someUrl)
Gets ontology by URL. |
String |
getSourceURI()
Gets the source URI. |
int |
getTaxonomicDistance(OClass class1,
OClass class2)
Gets the taxonomic distance between 2 classes. |
Set |
getTopClasses()
Gets the top classes. |
URL |
getURL()
Gets the url of this ontology |
String |
getVersion()
Gets the version of this ontology. |
boolean |
isModified()
Checks the modified flag. |
void |
load()
Loads this ontology. |
void |
removeClass(OClass theClass)
Removes a class from this ontology. |
void |
setComment(String theComment)
Sets the comment of this ontology. |
void |
setId(String theId)
Sets the id of this ontology. |
void |
setLabel(String theLabel)
Sets the label of the ontology. |
void |
setModified(boolean isModified)
Sets the modified flag. |
void |
setSourceURI(String theURI)
Sets the URI of the ontology |
void |
setURL(URL aUrl)
Set the url of this ontology |
void |
setVersion(String theVersion)
Sets version to this ontology. |
void |
store()
Stores this ontology. |
Methods inherited from interface gate.LanguageResource |
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, sync |
Methods inherited from interface gate.Resource |
cleanup, getParameterValue, init, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
getFeatures, setFeatures |
Methods inherited from interface gate.util.NameBearer |
getName, setName |
Method Detail |
public Ontology getOntology(URL someUrl) throws ResourceInstantiationException
someUrl
- the url of the ontology
ResourceInstantiationException
- if something gets wrong with the loadingpublic String getLabel()
public void setLabel(String theLabel)
theLabel
- the label to be setpublic URL getURL()
public void setURL(URL aUrl)
aUrl
- the url to be setpublic void load() throws ResourceInstantiationException
ResourceInstantiationException
public void store() throws ResourceInstantiationException
ResourceInstantiationException
public void setSourceURI(String theURI)
theURI
- the URI to be setpublic String getSourceURI()
public void setVersion(String theVersion)
theVersion
- the version to be setpublic String getVersion()
public String getId()
public void setId(String theId)
theId
- the id to be setpublic String getComment()
public void setComment(String theComment)
theComment
- the comment to be setpublic OClass createClass(String aName, String aComment)
aName
- the name of this classaComment
- the comment of this class
public void removeClass(OClass theClass)
theClass
- the class to be removedpublic void addClass(OClass theClass)
theClass
- the class to be addedpublic OClass getClassByName(String theName)
theName
- the name of the class
public boolean containsClassByName(String theName)
theName
- name of a class
public Set getClasses()
public Iterator getClasses(Comparator comp)
comp
- a comparator defining the order of iterating the classes
public Set getTopClasses()
public int getTaxonomicDistance(OClass class1, OClass class2)
class1
- the first classclass2
- the second class
public boolean equals(Object o)
equals
in class Object
o
- the other ontology
public void setModified(boolean isModified)
isModified
- sets this param as a value of
the modified property of the ontologypublic boolean isModified()
isModified
in interface LanguageResource
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |