|
|||||||||||
| 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(TClass theClass)
Adds a class to the ontology. |
boolean |
containsClassByName(String theName)
Checks if the ontology contains a class with the given name. |
TClass |
createClass(String aName,
String aComment)
Creates a new OClass and returns it. |
boolean |
equals(Object o)
Checks the equality of two ontologies. |
TClass |
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. |
Taxonomy |
getOntology(URL someUrl)
Gets taxonomy by URL. |
String |
getSourceURI()
Gets the source URI. |
int |
getTaxonomicDistance(TClass class1,
TClass 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 |
isDirectSubClassOf(String cls1,
String cls2)
Check for subclass relation with direct closure |
boolean |
isModified()
Checks the modified flag. |
boolean |
isSubClassOf(String cls1,
String cls2)
Check for subclass relation with transitive closure |
void |
load()
Loads this ontology. |
void |
removeClass(TClass 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 Taxonomy getOntology(URL someUrl)
throws ResourceInstantiationException
someUrl - the url of the taxonomy
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 set
public void load()
throws ResourceInstantiationException
ResourceInstantiationException
public void store()
throws ResourceInstantiationException
ResourceInstantiationExceptionpublic 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 set
public TClass createClass(String aName,
String aComment)
aName - the name of this classaComment - the comment of this class
public void removeClass(TClass theClass)
theClass - the class to be removedpublic void addClass(TClass theClass)
theClass - the class to be addedpublic TClass 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(TClass class1,
TClass class2)
class1 - the first classclass2 - the second class
public boolean isSubClassOf(String cls1,
String cls2)
throws NoSuchClosureTypeException
cls1 - the first classcls2 - the second class
NoSuchClosureTypeException
public boolean isDirectSubClassOf(String cls1,
String cls2)
throws NoSuchClosureTypeException
cls1 - the first classcls2 - the second class
NoSuchClosureTypeExceptionpublic boolean equals(Object o)
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 | ||||||||||