|
GATE Version 3.1-2270 |
|||||||||
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
com.ontotext.gate.ontology.TaxonomyImpl
com.ontotext.gate.ontology.OntologyImpl
gate.creole.ontology.jena.JenaOntologyImpl
public class JenaOntologyImpl
An implementation for GATE Ontologies based on Jena2
Nested Class Summary | |
---|---|
protected class |
JenaOntologyImpl.CleanUpAction
|
protected class |
JenaOntologyImpl.LoadOntologyDataAction
|
protected class |
JenaOntologyImpl.SaveOntologyAction
|
Field Summary | |
---|---|
protected List |
actionsList
|
static int |
DAML
Constant for DAML ontology type. |
protected URL |
damlFileURL
|
protected String |
language
|
static int |
OWL_DL
Constant for Owl-DL ontology type. |
static int |
OWL_FULL
Constant for Owl-Full ontology type. |
static int |
OWL_LITE
Constant for Owl-Lite ontology type. |
protected URL |
owlDlFileURL
|
protected URL |
owlFullFileURL
|
protected URL |
owlLiteFileURL
|
static int |
RDFS
Constant for RDF-S ontology type. |
protected URL |
rdfsFileURL
|
Fields inherited from class com.ontotext.gate.ontology.OntologyImpl |
---|
instances, instancesByName, propertyDefinitionSet |
Fields inherited from class com.ontotext.gate.ontology.TaxonomyImpl |
---|
DIRECT_CLOSURE, lastGeneratedId, modified, nullBuffers, TRANSITIVE_CLOSURE |
Fields inherited from class gate.creole.AbstractLanguageResource |
---|
dataStore, lrPersistentId |
Fields inherited from class gate.util.AbstractFeatureBearer |
---|
features |
Constructor Summary | |
---|---|
JenaOntologyImpl()
|
Method Summary | |
---|---|
void |
cleanup()
Clear the internal state of the resource |
protected Set |
convertoToGateClasses(Iterator jenaIterator)
|
List |
getActions()
Returns a list of Action objects. |
URL |
getDamlFileURL()
|
String |
getLanguage()
|
URL |
getOwlDlFileURL()
|
URL |
getOwlFullFileURL()
|
URL |
getOwlLiteFileURL()
|
URL |
getRdfsFileURL()
|
Resource |
init()
Initialises this resource, and returns it. |
void |
load()
Loads the ontology from an external file. |
void |
load(URL inputURL,
int ontologyType)
Loads ontological data of a given type from a URL. |
void |
save(File outputFile,
int ontologyType)
Saves the ontology to a file. |
void |
setDamlFileURL(URL damlFileURL)
|
void |
setLanguage(String language)
|
void |
setOwlDlFileURL(URL owlDlFileURL)
|
void |
setOwlFullFileURL(URL owlFullFileURL)
|
void |
setOwlLiteFileURL(URL owlLiteFileURL)
|
void |
setRdfsFileURL(URL rdfsFileURL)
|
protected void |
toGateClassRec(com.hp.hpl.jena.ontology.OntClass jenaClass,
OClass parent)
Converts a Jena class and all its subclasses to GATE classes and adds them to this ontology. |
protected void |
toJenaClassRec(OClass aGateClass,
com.hp.hpl.jena.ontology.OntModel jenaModel,
com.hp.hpl.jena.ontology.OntClass parentClass)
Converts a GATE class and all its subclasses (recursively) to Jena classes and adds them to the Jena model provided. |
Methods inherited from class com.ontotext.gate.ontology.OntologyImpl |
---|
addDatatypeProperty, addDatatypeProperty, addInstance, addInstance, addObjectProperty, addObjectProperty, addProperty, addProperty, addPropertyDefinition, addSymmetricProperty, addSymmetricProperty, addTransitiveProperty, addTransitiveProperty, createClass, getDirectInstances, getInstanceByName, getInstances, getInstances, getPropertyDefinitionByName, getPropertyDefinitions, reduceToMostSpecificClasses, removeInstance |
Methods inherited from class com.ontotext.gate.ontology.TaxonomyImpl |
---|
addClass, addObjectModificationListener, containsClassByName, equals, fireObjectModificationEvent, getClassByName, getClasses, getClasses, getComment, getDefaultNameSpace, getId, getLabel, getOntology, getTaxonomicDistance, getTopClasses, getURL, getVersion, isDirectSubClassOf, isModified, isSubClassOf, reinfer, removeClass, setComment, setDefaultNameSpace, setId, setLabel, setModified, setURL, setVersion, store, toString |
Methods inherited from class gate.creole.AbstractLanguageResource |
---|
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, sync |
Methods inherited from class gate.creole.AbstractResource |
---|
checkParameterValues, getBeanInfo, getName, getParameterValue, getParameterValue, 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, wait, wait, wait |
Methods inherited from interface gate.creole.ontology.Taxonomy |
---|
addClass, containsClassByName, equals, getClassByName, getClasses, getClasses, getComment, getDefaultNameSpace, getId, getLabel, getTaxonomicDistance, getTopClasses, getURL, getVersion, isDirectSubClassOf, isModified, isSubClassOf, removeClass, setComment, setDefaultNameSpace, setId, setLabel, setModified, setURL, setVersion, store |
Methods inherited from interface gate.LanguageResource |
---|
getDataStore, getLRPersistenceId, getParent, setDataStore, setLRPersistenceId, setParent, sync |
Methods inherited from interface gate.Resource |
---|
getParameterValue, setParameterValue, setParameterValues |
Methods inherited from interface gate.util.FeatureBearer |
---|
getFeatures, setFeatures |
Methods inherited from interface gate.util.NameBearer |
---|
getName, setName |
Field Detail |
---|
protected URL owlLiteFileURL
protected URL owlDlFileURL
protected URL owlFullFileURL
protected URL rdfsFileURL
protected URL damlFileURL
protected String language
protected List actionsList
public static final int OWL_LITE
public static final int OWL_DL
public static final int OWL_FULL
public static final int RDFS
public static final int DAML
Constructor Detail |
---|
public JenaOntologyImpl()
Method Detail |
---|
public Resource init() throws ResourceInstantiationException
TaxonomyImpl
init
in interface Resource
init
in class TaxonomyImpl
ResourceInstantiationException
public List getActions()
ActionsPublisher
getActions
in interface ActionsPublisher
List
of Action
s.public void load() throws ResourceInstantiationException
load
in interface Taxonomy
load
in class TaxonomyImpl
ResourceInstantiationException
public void load(URL inputURL, int ontologyType) throws ResourceInstantiationException
inputURL
- the URL for the file to be read.ontologyType
- the type of ontology (one of OWL_LITE
, OWL_DL
,
OWL_FULL
, RDFS
or DAML
).
ResourceInstantiationException
public void save(File outputFile, int ontologyType)
outputFile
- the file to write to.ontologyType
- the output format to write.protected void toJenaClassRec(OClass aGateClass, com.hp.hpl.jena.ontology.OntModel jenaModel, com.hp.hpl.jena.ontology.OntClass parentClass)
aClass
- the GATE class to be converted.jenaModel
- the Jena model to be populated.parentClass
- the parent of the GATE class in the Jena model. If null
then the created Jena class will be marked as a top class.protected Set convertoToGateClasses(Iterator jenaIterator)
protected void toGateClassRec(com.hp.hpl.jena.ontology.OntClass jenaClass, OClass parent)
aClass
- the Class in Jena modelparent
- the parent class for the class to be added in this ontology.public void cleanup()
AbstractLanguageResource
cleanup
in interface Resource
cleanup
in class AbstractLanguageResource
public String getLanguage()
public void setLanguage(String language)
language
- The language to set.public URL getDamlFileURL()
public void setDamlFileURL(URL damlFileURL)
damlFileURL
- The damlFileURL to set.public URL getOwlDlFileURL()
public void setOwlDlFileURL(URL owlDlFileURL)
owlDlFileURL
- The owlDlFileURL to set.public URL getOwlFullFileURL()
public void setOwlFullFileURL(URL owlFullFileURL)
owlFullFileURL
- The owlFullFileURL to set.public URL getOwlLiteFileURL()
public void setOwlLiteFileURL(URL owlLiteFileURL)
owlLiteFileURL
- The owlLiteFileURL to set.public URL getRdfsFileURL()
public void setRdfsFileURL(URL rdfsFileURL)
rdfsFileURL
- The rdfsFileURL to set.
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |