GATE
Version 3.1-2270

gate.creole
Class ProtegeProjectName

java.lang.Object
  extended by gate.util.AbstractFeatureBearer
      extended by gate.creole.AbstractResource
          extended by gate.creole.AbstractLanguageResource
              extended by gate.creole.ProtegeProjectName
All Implemented Interfaces:
Taxonomy, LanguageResource, ProtegeProject, Resource, FeatureBearer, NameBearer, Serializable

public class ProtegeProjectName
extends AbstractLanguageResource
implements ProtegeProject, Taxonomy

Dummy Protege LR. Just keep the Protege project file name

See Also:
Serialized Form

Field Summary
 
Fields inherited from class gate.creole.AbstractLanguageResource
dataStore, lrPersistentId
 
Fields inherited from class gate.creole.AbstractResource
name
 
Fields inherited from class gate.util.AbstractFeatureBearer
features
 
Constructor Summary
ProtegeProjectName()
           
 
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 getDefaultNameSpace()
          Gets the default name space for this ontology.
 String getId()
          Gets the id of this ontology.
 edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()
           
 String getLabel()
          Gets the label.
 Taxonomy getOntology(URL someUrl)
           
 URL getProjectName()
           
 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()
          Returns true of an LR has been modified since the last sync.
 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 setDefaultNameSpace(String theURI)
          Sets the URI of the 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 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, getBeanInfo, 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
 
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
 

Constructor Detail

ProtegeProjectName

public ProtegeProjectName()
Method Detail

setProjectName

public void setProjectName(URL name)

getProjectName

public URL getProjectName()

setViewResource

public void setViewResource(ProtegeWrapper visual)

setKnowledgeBase

public void setKnowledgeBase(edu.stanford.smi.protege.model.KnowledgeBase base)

getKnowledgeBase

public edu.stanford.smi.protege.model.KnowledgeBase getKnowledgeBase()

getOntology

public Taxonomy getOntology(URL someUrl)
                     throws ResourceInstantiationException
Throws:
ResourceInstantiationException

getLabel

public String getLabel()
Description copied from interface: Taxonomy
Gets the label.

Specified by:
getLabel in interface Taxonomy
Returns:
the label of the ontology

setLabel

public void setLabel(String label)
Description copied from interface: Taxonomy
Sets the label of the ontology.

Specified by:
setLabel in interface Taxonomy
Parameters:
label - the label to be set

getURL

public URL getURL()
Description copied from interface: Taxonomy
Gets the url of this ontology

Specified by:
getURL in interface Taxonomy
Returns:
the url of this ontology

setURL

public void setURL(URL aUrl)
Description copied from interface: Taxonomy
Set the url of this ontology

Specified by:
setURL in interface Taxonomy
Parameters:
aUrl - the url to be set

setDefaultNameSpace

public void setDefaultNameSpace(String theURI)
Description copied from interface: Taxonomy
Sets the URI of the ontology

Specified by:
setDefaultNameSpace in interface Taxonomy
Parameters:
theURI - the URI to be set

getDefaultNameSpace

public String getDefaultNameSpace()
Description copied from interface: Taxonomy
Gets the default name space for this ontology. This value is prepended to local URIs (the ones not containing '#'.

Specified by:
getDefaultNameSpace in interface Taxonomy
Returns:
a String value.

setVersion

public void setVersion(String theVersion)
Description copied from interface: Taxonomy
Sets version to this ontology.

Specified by:
setVersion in interface Taxonomy
Parameters:
theVersion - the version to be set

getVersion

public String getVersion()
Description copied from interface: Taxonomy
Gets the version of this ontology.

Specified by:
getVersion in interface Taxonomy
Returns:
the version of this ontology

load

public void load()
          throws ResourceInstantiationException
Description copied from interface: Taxonomy
Loads this ontology. According to different storages - different implementations are expected. Should take care of the modifiedAfterLoading member

Specified by:
load in interface Taxonomy
Throws:
ResourceInstantiationException

store

public void store()
           throws ResourceInstantiationException
Description copied from interface: Taxonomy
Stores this ontology. According to different storages - different implementations are expected. Should take care of the modifiedAfterLoading member

Specified by:
store in interface Taxonomy
Throws:
ResourceInstantiationException

getId

public String getId()
Description copied from interface: Taxonomy
Gets the id of this ontology.

Specified by:
getId in interface Taxonomy
Returns:
the id of this ontology

setId

public void setId(String theId)
Description copied from interface: Taxonomy
Sets the id of this ontology.

Specified by:
setId in interface Taxonomy
Parameters:
theId - the id to be set

getComment

public String getComment()
Description copied from interface: Taxonomy
Gets the comment of this ontology.

Specified by:
getComment in interface Taxonomy
Returns:
the comment of this ontology

setComment

public void setComment(String theComment)
Description copied from interface: Taxonomy
Sets the comment of this ontology.

Specified by:
setComment in interface Taxonomy
Parameters:
theComment - the comment to be set

createClass

public TClass createClass(String aName,
                          String aComment)
Description copied from interface: Taxonomy
Creates a new OClass and returns it.

Specified by:
createClass in interface Taxonomy
Parameters:
aName - the name of this class
aComment - the comment of this class
Returns:
the newly created class

removeClass

public void removeClass(TClass theClass)
Description copied from interface: Taxonomy
Removes a class from this ontology.

Specified by:
removeClass in interface Taxonomy
Parameters:
theClass - the class to be removed

addClass

public void addClass(TClass theClass)
Description copied from interface: Taxonomy
Adds a class to the ontology.

Specified by:
addClass in interface Taxonomy
Parameters:
theClass - the class to be added

getClassByName

public TClass getClassByName(String theName)
Description copied from interface: Taxonomy
Retrieves a class by its name.

Specified by:
getClassByName in interface Taxonomy
Parameters:
theName - the name of the class
Returns:
the class matching the name or null if no matches.

containsClassByName

public boolean containsClassByName(String theName)
Description copied from interface: Taxonomy
Checks if the ontology contains a class with the given name.

Specified by:
containsClassByName in interface Taxonomy
Parameters:
theName - name of a class
Returns:
true if the ontology contains a class with the name specified

getClasses

public Set getClasses()
Description copied from interface: Taxonomy
Retrieves all classes as a set.

Specified by:
getClasses in interface Taxonomy
Returns:
set of all the classes in this ontology

getClasses

public Iterator getClasses(Comparator comp)
Description copied from interface: Taxonomy
Retireves an iterator over the classes, ordered according to the comparator.

Specified by:
getClasses in interface Taxonomy
Parameters:
comp - a comparator defining the order of iterating the classes
Returns:
an iterator over the classes

getTopClasses

public Set getTopClasses()
Description copied from interface: Taxonomy
Gets the top classes.

Specified by:
getTopClasses in interface Taxonomy
Returns:
set of the top classes of this ontology

getTaxonomicDistance

public int getTaxonomicDistance(TClass class1,
                                TClass class2)
Description copied from interface: Taxonomy
Gets the taxonomic distance between 2 classes.

Specified by:
getTaxonomicDistance in interface Taxonomy
Parameters:
class1 - the first class
class2 - the second class
Returns:
the taxonomic distance between the 2 classes

equals

public boolean equals(Object o)
Description copied from interface: Taxonomy
Checks the equality of two ontologies.

Specified by:
equals in interface Taxonomy
Overrides:
equals in class Object
Parameters:
o - the other ontology
Returns:
true if the ontologies are considered equal, otherwise - false.

setModified

public void setModified(boolean isModified)
Description copied from interface: Taxonomy
Sets the modified flag.

Specified by:
setModified in interface Taxonomy
Parameters:
isModified - sets this param as a value of the modified property of the ontology

isModified

public boolean isModified()
Description copied from class: AbstractLanguageResource
Returns true of an LR has been modified since the last sync. Always returns false for transient LRs.

Specified by:
isModified in interface Taxonomy
Specified by:
isModified in interface LanguageResource
Overrides:
isModified in class AbstractLanguageResource
Returns:
whether the ontology has been modified after the loading

isSubClassOf

public boolean isSubClassOf(String cls1,
                            String cls2)
Description copied from interface: Taxonomy
Check for subclass relation with transitive closure

Specified by:
isSubClassOf in interface Taxonomy
Parameters:
cls1 - the first class
cls2 - the second class

isDirectSubClassOf

public boolean isDirectSubClassOf(String cls1,
                                  String cls2)
Description copied from interface: Taxonomy
Check for subclass relation with direct closure

Specified by:
isDirectSubClassOf in interface Taxonomy
Parameters:
cls1 - the first class
cls2 - the second class

GATE
Version 3.1-2270