|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Ontology
Represents a DL ontology.
| Method Summary | ||
|---|---|---|
java.lang.Object |
accept(KAON2Visitor visitor)
Accepts a visitor for this object. |
|
void |
addOntologyListener(OntologyListener ontologyListener)
Adds a listener to this ontology. |
|
void |
addOntologyProperty(java.lang.String ontologyPropertyURI,
java.lang.String value)
Adds the property value for this ontology. |
|
void |
addToImports(Ontology ontology)
Adds specified ontology to the set of ontologies imported in this ontology. |
|
void |
applyChanges(java.util.List<OntologyChangeEvent> changes)
Applies a list of changes to the ontology. |
|
void |
cancelPendingImportSave()
Cancels the import or save operation that is pending on this ontology. |
|
boolean |
containsAxiom(Axiom axiom,
boolean checkIncludedOntologies)
Checks whether given axiom is contained in this ontology. |
|
boolean |
containsEntity(Entity entity,
boolean checkIncludedOntologies)
Checks whether given entity is contained in this ontology. |
|
Request<Axiom> |
createAxiomRequest()
Returns an object that can be used to retrieve axioms. |
|
|
createAxiomRequest(java.lang.Class<E> axiomType)
Returns an object that can be used to retrieve axioms of given type. |
|
Request<Entity> |
createEntityRequest()
Returns an object that can be used to retrieve existing entities. |
|
|
createEntityRequest(java.lang.Class<E> entityType)
Returns an object that can be used to retrieve existing entities of given type. |
|
Reasoner |
createReasoner()
Creates a reasoner for this ontolgy. |
|
java.util.Set<Ontology> |
getAllImportedOntologies()
Returns the set of all imported ontologies (including the ones which are indirectly imported). |
|
KAON2Connection |
getConnection()
Returns the connection associated with this ontology. |
|
Ontology |
getDeclaringOntology(Axiom axiom)
Returns the ontology where the given axiom is declared. |
|
boolean |
getDuplicateAxiomsThrowException()
Returns true if duplicate additions of axioms to this ontology result in an exception. |
|
java.util.Set<Ontology> |
getImportedOntologies()
Returns the set of imported ontologies. |
|
long |
getLockTimeout()
Returns the time how much this ontology waits to acquire locks. |
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getOntologyProperties()
Returns the properties for this ontology. |
|
java.util.Set<java.lang.String> |
getOntologyPropertyValues(java.lang.String ontologyPropertyURI)
Returns the values of a property for this ontology. |
|
java.lang.String |
getOntologyURI()
Returns the URI of the ontology. |
|
java.util.Map<java.lang.String,java.lang.Object> |
getParameters()
Returns the parameters of this ontology. |
|
java.lang.String |
getPhysicalURI()
Returns the physical URI of the ontology. |
|
void |
importContentsFrom(java.io.File file)
Exports this ontolgy into specified format. |
|
void |
importContentsFrom(java.io.InputStream inputStream,
java.lang.String physicalURI)
Adds axioms from the supplied input stream into this ontology. |
|
void |
importContentsFrom(java.io.Reader reader,
java.lang.String physicalURI)
Adds the contents from the supplied source into this ontology. |
|
void |
importContentsFrom(java.lang.String physicalURI)
Exports this ontolgy into specified format. |
|
void |
persist()
Ensures that the ontology is persisted. |
|
void |
removeFromImports(Ontology ontology)
Removes specified ontology from the set of ontologies imported in this ontology. |
|
void |
removeOntologyListener(OntologyListener ontologyListener)
Removes a listener from this ontology. |
|
void |
removeOntologyProperty(java.lang.String ontologyPropertyURI,
java.lang.String value)
Removes the property with given value for this ontology. |
|
void |
resumeNotifications()
Resumes the the change notifications for this ontology. |
|
void |
saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.File file,
java.lang.String encoding)
Exports this ontolgy into specified format. |
|
void |
saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.OutputStream outputStream,
java.lang.String encoding)
Exports this ontolgy into specified format. |
|
void |
saveOntology(OntologyFileFormat ontologyFileFormat,
java.lang.String physicalURI,
java.lang.String encoding)
Exports this ontolgy into specified format. |
|
void |
saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.Writer writer,
java.lang.String encoding)
Exports this ontolgy into specified format. |
|
void |
setDuplicateAxiomsThrowException(boolean throwExceptionOnDuplicates)
Determines if duplicate additions of axioms to this ontology should result in an exception. |
|
void |
setLockTimeout(long lockTimeout)
Determines the time in miliseconds how much one should wait for acquiring locks. |
|
void |
suspendNotifications()
Suspends the change notifications for this ontology. |
|
| Method Detail |
|---|
KAON2Connection getConnection()
java.util.Map<java.lang.String,java.lang.Object> getParameters()
java.lang.String getOntologyURI()
java.lang.String getPhysicalURI()
void addToImports(Ontology ontology)
throws KAON2Exception
ontology - the ontology that is imported
KAON2Exception - thrown if there is an error
void removeFromImports(Ontology ontology)
throws KAON2Exception
ontology - the ontology that is imported
KAON2Exception - thrown if there is an errorjava.util.Set<Ontology> getImportedOntologies()
java.util.Set<Ontology> getAllImportedOntologies()
java.lang.Object accept(KAON2Visitor visitor)
visitor - the visitor for this object
null)
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getOntologyProperties()
throws KAON2Exception
KAON2Exception - thrown if there is an error
java.util.Set<java.lang.String> getOntologyPropertyValues(java.lang.String ontologyPropertyURI)
throws KAON2Exception
ontologyPropertyURI - the ontology property
KAON2Exception - thrown if there is an error
void addOntologyProperty(java.lang.String ontologyPropertyURI,
java.lang.String value)
throws KAON2Exception
ontologyPropertyURI - the ontology propertyvalue - the value
KAON2Exception - thrown if there is an error
void removeOntologyProperty(java.lang.String ontologyPropertyURI,
java.lang.String value)
throws KAON2Exception
ontologyPropertyURI - the ontology propertyvalue - the value
KAON2Exception - thrown if there is an error (e.g. if value does not exist)
void applyChanges(java.util.List<OntologyChangeEvent> changes)
throws KAON2Exception
changes - the set of changes applied to the ontology
KAON2Exception - thrown if there is an errorvoid suspendNotifications()
void resumeNotifications()
void addOntologyListener(OntologyListener ontologyListener)
ontologyListener - the listener objectvoid removeOntologyListener(OntologyListener ontologyListener)
ontologyListener - the listener objectlong getLockTimeout()
void setLockTimeout(long lockTimeout)
lockTimeout - the amount of time in miliseconds to wait for a lock (-1 means wait forever)
boolean getDuplicateAxiomsThrowException()
throws KAON2Exception
true if duplicate additions of axioms to this ontology result in an exception.
By default this property is always true.
true if duplicate additions of axioms result in an exception
KAON2Exception - thrown if there is an error (e.g. if value does not exist)
void setDuplicateAxiomsThrowException(boolean throwExceptionOnDuplicates)
throws KAON2Exception
throwExceptionOnDuplicates - true if duplicate additions of axioms should result in an exception
KAON2Exception - thrown if there is an error (e.g. if value does not exist)
boolean containsAxiom(Axiom axiom,
boolean checkIncludedOntologies)
throws KAON2Exception
axiom - the axiom to be checkedcheckIncludedOntologies - if true, then included ontologies are checked for the axiom as well
true if the ontology contains the axiom
KAON2Exception - thrown if there is an error
Ontology getDeclaringOntology(Axiom axiom)
throws KAON2Exception
null is retruned.
If more then one ontology contains the axiom, one of them is chosen non-deterministically.
axiom - the axiom whose declaring ontology should be determined
KAON2Exception - thrown if there is an error
boolean containsEntity(Entity entity,
boolean checkIncludedOntologies)
throws KAON2Exception
entity - the entity to be checkedcheckIncludedOntologies - if true, then included ontologies are checked for the entity as well
true if the ontology contains the entity
KAON2Exception - thrown if there is an errorRequest<Axiom> createAxiomRequest()
<E extends Axiom> Request<E> createAxiomRequest(java.lang.Class<E> axiomType)
axiomType - the type of the axioms to be retrieved
Request<Entity> createEntityRequest()
<E extends Entity> Request<E> createEntityRequest(java.lang.Class<E> entityType)
entityType - the type of the entity
void saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.Writer writer,
java.lang.String encoding)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
ontologyFileFormat - the format into which the ontology is exportedwriter - the writer into which the ontology is exportedencoding - the encoding for XML
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.OutputStream outputStream,
java.lang.String encoding)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
ontologyFileFormat - the format into which the ontology is exportedoutputStream - the output stream into which the ontology is exportedencoding - the encoding for XML
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void saveOntology(OntologyFileFormat ontologyFileFormat,
java.io.File file,
java.lang.String encoding)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
ontologyFileFormat - the format into which the ontology is exportedfile - the file into which the ontology is exportedencoding - the encoding for XML
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void saveOntology(OntologyFileFormat ontologyFileFormat,
java.lang.String physicalURI,
java.lang.String encoding)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
ontologyFileFormat - the format into which the ontology is exportedphysicalURI - the physical URI into which the ontology is exported (currently only file URIs are supproted)encoding - the encoding for XML
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void importContentsFrom(java.io.Reader reader,
java.lang.String physicalURI)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
reader - the reader containing the ontology textphysicalURI - the physical URI of the ontology text
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void importContentsFrom(java.io.InputStream inputStream,
java.lang.String physicalURI)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
inputStream - the input stream containing the ontology textphysicalURI - the physical URI of the ontology text
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void importContentsFrom(java.io.File file)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
file - the file containing the ontology text
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void importContentsFrom(java.lang.String physicalURI)
throws KAON2Exception,
java.io.IOException,
java.lang.InterruptedException
physicalURI - the physical URI containing the ontology text
KAON2Exception - thrown if there is an error
java.io.IOException - thrown if there is an I/O error
java.lang.InterruptedException - thrown if the export process is interrupted
void cancelPendingImportSave()
throws KAON2Exception
KAON2Exception - thrown if there is an error
void persist()
throws KAON2Exception
KAON2Exception - thrown if there is an error
Reasoner createReasoner()
throws KAON2Exception
KAON2Exception - thrown if the reasoner cannot be created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||