|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractLanguageResource
gate.creole.ProtegeProjectName
Dummy Protege LR. Just keep the Protege project file name
Field Summary | |
private edu.stanford.smi.protege.event.KnowledgeBaseListener |
_knowledgeBaseListener
Track changes in Protege KnowledgeBase to transffer in Ontotext Editor |
private static boolean |
DEBUG
Debug flag |
private edu.stanford.smi.protege.model.KnowledgeBase |
knBase
Protege ontology |
private Ontology |
ontotextOntology
Ontotext Ontology object |
private URL |
ontotextOntologyUrl
|
private URL |
projectName
Protege project file name |
(package private) ProtegeWrapper |
visualResource
Keep visual resource to refresh Ontotext Editor if any |
Fields inherited from class gate.creole.AbstractLanguageResource |
dataStore, lrPersistentId, serialVersionUID |
Fields inherited from class gate.creole.AbstractResource |
name |
Fields inherited from class gate.util.AbstractFeatureBearer |
features |
Constructor Summary | |
ProtegeProjectName()
|
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. |
private void |
createKBListener()
|
private void |
createSubClasses(edu.stanford.smi.protege.model.Cls protegeClass,
OClass ontotextClass)
|
boolean |
equals(Object o)
Checks the equality of two ontologies. |
private void |
fillOntotextOntology()
|
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. |
edu.stanford.smi.protege.model.KnowledgeBase |
getKnowledgeBase()
|
String |
getLabel()
Gets the label. |
Ontology |
getOntology(URL someUrl)
Gets ontology by URL. |
URL |
getProjectName()
|
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 |
setKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase base)
|
void |
setLabel(String label)
Sets the label of the ontology. |
void |
setModified(boolean isModified)
Sets the modified flag. |
void |
setProjectName(URL name)
|
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 |
setViewResource(ProtegeWrapper visual)
|
void |
store()
Stores this ontology. |
Methods inherited from class gate.creole.AbstractLanguageResource |
cleanup, getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, sync |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getName, getParameterValue, getParameterValue, init, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class gate.util.AbstractFeatureBearer |
getFeatures, setFeatures |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 |
Field Detail |
private static final boolean DEBUG
private URL projectName
private edu.stanford.smi.protege.model.KnowledgeBase knBase
private Ontology ontotextOntology
private URL ontotextOntologyUrl
ProtegeWrapper visualResource
private edu.stanford.smi.protege.event.KnowledgeBaseListener _knowledgeBaseListener
Constructor Detail |
public ProtegeProjectName()
Method Detail |
public void setProjectName(URL name)
public URL getProjectName()
public void setViewResource(ProtegeWrapper visual)
public void setKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase base)
public edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()
private void createKBListener()
private void fillOntotextOntology()
private void createSubClasses(edu.stanford.smi.protege.model.Cls protegeClass, OClass ontotextClass)
public Ontology getOntology(URL someUrl) throws ResourceInstantiationException
Ontology
getOntology
in interface Ontology
someUrl
- the url of the ontology
ResourceInstantiationException
- if something gets wrong with the loadingpublic String getLabel()
Ontology
getLabel
in interface Ontology
public void setLabel(String label)
Ontology
setLabel
in interface Ontology
label
- the label to be setpublic URL getURL()
Ontology
getURL
in interface Ontology
public void setURL(URL aUrl)
Ontology
setURL
in interface Ontology
aUrl
- the url to be setpublic void setSourceURI(String theURI)
Ontology
setSourceURI
in interface Ontology
theURI
- the URI to be setpublic String getSourceURI()
Ontology
getSourceURI
in interface Ontology
public void setVersion(String theVersion)
Ontology
setVersion
in interface Ontology
theVersion
- the version to be setpublic String getVersion()
Ontology
getVersion
in interface Ontology
public void load() throws ResourceInstantiationException
Ontology
load
in interface Ontology
ResourceInstantiationException
public void store() throws ResourceInstantiationException
Ontology
store
in interface Ontology
ResourceInstantiationException
public String getId()
Ontology
getId
in interface Ontology
public void setId(String theId)
Ontology
setId
in interface Ontology
theId
- the id to be setpublic String getComment()
Ontology
getComment
in interface Ontology
public void setComment(String theComment)
Ontology
setComment
in interface Ontology
theComment
- the comment to be setpublic OClass createClass(String aName, String aComment)
Ontology
createClass
in interface Ontology
aName
- the name of this classaComment
- the comment of this class
public void removeClass(OClass theClass)
Ontology
removeClass
in interface Ontology
theClass
- the class to be removedpublic void addClass(OClass theClass)
Ontology
addClass
in interface Ontology
theClass
- the class to be addedpublic OClass getClassByName(String theName)
Ontology
getClassByName
in interface Ontology
theName
- the name of the class
public boolean containsClassByName(String theName)
Ontology
containsClassByName
in interface Ontology
theName
- name of a class
public Set getClasses()
Ontology
getClasses
in interface Ontology
public Iterator getClasses(Comparator comp)
Ontology
getClasses
in interface Ontology
comp
- a comparator defining the order of iterating the classes
public Set getTopClasses()
Ontology
getTopClasses
in interface Ontology
public int getTaxonomicDistance(OClass class1, OClass class2)
Ontology
getTaxonomicDistance
in interface Ontology
class1
- the first classclass2
- the second class
public boolean equals(Object o)
Ontology
equals
in interface Ontology
public void setModified(boolean isModified)
Ontology
setModified
in interface Ontology
isModified
- sets this param as a value of
the modified property of the ontologypublic boolean isModified()
Ontology
isModified
in interface LanguageResource
isModified
in class AbstractLanguageResource
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |