org.mindswap.owl
Interface OWLKnowledgeBase

All Superinterfaces:
OWLModel
All Known Subinterfaces:
OWLSKnowledgeBase

public interface OWLKnowledgeBase
extends OWLModel

Author:
Evren Sirin

Method Summary
 OWLOntology createOntology()
          Create an empty ontology which is automatically loaded to the KB.
 OWLOntology createOntology(boolean load)
           
 OWLOntology createOntology(java.net.URI uri)
          Create an empty ontology with the given logical URI (xml:base).
 OWLOntology createOntology(java.net.URI uri, java.net.URI fileURI)
          Create an empty ontology with the given logical URI (xml:base) and physical URI.
 OWLOntology createOntology(java.net.URI uri, java.net.URI fileURI, java.lang.Object implementation)
          Create an empty ontology with the given logical URI (xml:base), physical URI and an implementation specific data (Jena Model or OWL-API OWLOntology).
 OWLSOntology createOWLSOntology()
          Deprecated. Use createOntology() instead
 OWLSOntology createOWLSOntology(java.net.URI uri)
          Deprecated. Use createOntology(URI) instead
 boolean getAutoConsistency()
          Returns true if the KB checks consistency automatically after each ontology is loaded and rejects to load the ontology if it causes inconsistency.
 boolean getAutoTranslate()
           
 OWLOntology getBaseOntology()
          Return the base ontology of this KB.
 java.util.Set getOntologies()
          Return the set of loaded ontologies including the imported ones.
 java.util.Set getOntologies(boolean all)
          Return the set of ontologies loaded to this KB with the optino to include/exclude imported ones.
 OWLOntology getOntology(java.net.URI uri)
          Return the loaded ontology associated with this URI.
 QNameProvider getQNames()
           
 OWLReader getReader()
          Return the reader assocaited with this KB.
 OWLKnowledgeBase getTranslationSource()
           
 OWLOntology load(OWLOntology ontology)
          Load the ontology to the KB.
 OWLOntology load(OWLOntology ontology, boolean withImports)
          Load the ontology to the KB.
 OWLOntology loadOntology(OWLOntology ontology)
          Deprecated. Please use load(OWLOntology) instead
 OWLOntology read(java.io.InputStream in, java.net.URI baseURI)
          Read the ontology using the given InputStream and the base URI, load it to this KB and return a reference to the ontology object created.
 OWLOntology read(java.io.Reader in, java.net.URI baseURI)
          Read the ontology using the given Reader and the base URI, load it to this KB and return a reference to the ontology object created.
 OWLOntology read(java.lang.String uri)
          Read the ontology from the given URI, load it to this KB and return a reference to the ontology object created.
 OWLOntology read(java.net.URI uri)
          Read the ontology from the given URI, load it to this KB and return a reference to the ontology object created.
 java.util.List readAllServices(java.io.InputStream in, java.net.URI baseURI)
           
 java.util.List readAllServices(java.io.Reader in, java.net.URI baseURI)
           
 java.util.List readAllServices(java.lang.String uri)
           
 java.util.List readAllServices(java.net.URI uri)
           
 Service readService(java.io.InputStream in, java.net.URI baseURI)
           
 Service readService(java.io.Reader in, java.net.URI baseURI)
           
 Service readService(java.lang.String uri)
           
 Service readService(java.net.URI uri)
           
 void setAutoConsistency(boolean auto)
          Set/clear the behavior to check consistency automatically after each ontology is loaded.
 void setAutoTranslate(boolean auto)
           
 void setReader(OWLReader reader)
          Set the reader assocaited with this KB.
 void unload(OWLOntology ontology)
          Unload the ontology from the KB.
 void unload(java.net.URI uri)
          Unload the ontology with the given URI from the KB.
 
Methods inherited from interface org.mindswap.owl.OWLModel
addProperty, addProperty, addProperty, addProperty, addProperty, addType, apply, classify, createAnyOrder, createAnyOrder, createAtomicProcess, createAtomicProcess, createChoice, createChoice, createClass, createCompositeProcess, createCompositeProcess, createControlConstructBag, createControlConstructList, createDataProperty, createDataValue, createDataValue, createDataValue, createDataValue, createForEach, createForEach, createGrounding, createGrounding, createIfThenElse, createIfThenElse, createIndividual, createInput, createInput, createInputBinding, createInputBinding, createInstance, createInstance, createJavaAtomicGrounding, createJavaAtomicGrounding, createJavaGrounding, createJavaGrounding, createList, createList, createList, createList, createList, createList, createLocal, createLocal, createObjectProperty, createOutput, createOutput, createOutputBinding, createOutputBinding, createPerform, createPerform, createPerform, createProduce, createProduce, createProfile, createProfile, createRepeatUntil, createRepeatUntil, createRepeatWhile, createRepeatWhile, createResult, createResult, createSequence, createSequence, createService, createService, createServiceParameter, createServiceParameter, createSplit, createSplit, createSplitJoin, createSplitJoin, createSWRLCondition, createSWRLCondition, createSWRLExpression, createSWRLExpression, createUPnPAtomicGrounding, createUPnPAtomicGrounding, createUPnPMessageMap, createUPnPMessageMap, createValueData, createValueOf, createValueOf, createWSDLAtomicGrounding, createWSDLAtomicGrounding, createWSDLInputMessageMap, createWSDLInputMessageMap, createWSDLOperationRef, createWSDLOperationRef, createWSDLOutputMessageMap, createWSDLOutputMessageMap, getClass, getDataProperty, getDataType, getDifferentIndividuals, getEntity, getEnumerations, getEquivalentClasses, getEquivalentProperties, getImplementation, getIncomingProperties, getIncomingProperties, getIncomingProperties, getIncomingProperty, getIncomingProperty, getIndividual, getIndividuals, getInstances, getObjectProperty, getProcess, getProcesses, getProcesses, getProfile, getProfiles, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getProperty, getReasoner, getSameIndividuals, getService, getServices, getSubClasses, getSubClasses, getSubProperties, getSuperClasses, getSuperClasses, getSuperProperties, getType, getType, getTypes, hasProperty, hasProperty, isClassified, isConsistent, isDifferentFrom, isDisjoint, isDisjoint, isEnumerated, isEquivalent, isLockSupported, isSameAs, isSubClassOf, isSubTypeOf, isSubTypeOf, isTrue, isTrue, isTrue, isType, lockForRead, lockForWrite, parseLiteral, prepare, query, query, query, refresh, releaseLock, removeProperties, removeProperty, removeTypes, setProperty, setProperty, setProperty, setProperty, setReasoner, setReasoner
 

Method Detail

getOntologies

java.util.Set getOntologies()
Return the set of loaded ontologies including the imported ones.

Returns:

getOntologies

java.util.Set getOntologies(boolean all)
Return the set of ontologies loaded to this KB with the optino to include/exclude imported ones. An ontology ont is considered to be imported if there was no explicit function call to load the ontology, i.e load(ont) or read(ont.getURI(), but ont was imported by one of the loaded ontologies.

Parameters:
all - If true return all onotlogies, otherwise return only the explcicitly loaded ones
Returns:

getOntology

OWLOntology getOntology(java.net.URI uri)
Return the loaded ontology associated with this URI. Return null if there is not ontology with this URI.

Parameters:
uri - URI of the ontology
Returns:
Ontology with the given URI

getBaseOntology

OWLOntology getBaseOntology()
Return the base ontology of this KB. At the creation time of each KB an empty ontology is created to be the base onotlogy of this KB. Any function that adds data to the underlying RDF model (addProperty, setProperty, etc.) will actually add the data to this base ontology.

Specified by:
getBaseOntology in interface OWLModel
Returns:

createOntology

OWLOntology createOntology()
Create an empty ontology which is automatically loaded to the KB.

Returns:
An empty ontology

createOntology

OWLOntology createOntology(boolean load)

createOntology

OWLOntology createOntology(java.net.URI uri)
Create an empty ontology with the given logical URI (xml:base). Ontology is automatically loaded to the KB.

Parameters:
uri -
Returns:
An empty ontology

createOntology

OWLOntology createOntology(java.net.URI uri,
                           java.net.URI fileURI)
Create an empty ontology with the given logical URI (xml:base) and physical URI. Ontology is automatically loaded to the KB.

Parameters:
uri - Logical URI of the onotlogy
fileURI - Physical URI of the onotlogy
Returns:
An empty ontology

createOntology

OWLOntology createOntology(java.net.URI uri,
                           java.net.URI fileURI,
                           java.lang.Object implementation)
Create an empty ontology with the given logical URI (xml:base), physical URI and an implementation specific data (Jena Model or OWL-API OWLOntology). Ontology is automatically loaded to the KB.

Parameters:
uri -
fileURI -
implementation -
Returns:
The loaded ontology

loadOntology

OWLOntology loadOntology(OWLOntology ontology)
Deprecated. Please use load(OWLOntology) instead


load

OWLOntology load(OWLOntology ontology)
Load the ontology to the KB. If the ontology is created using another KB a copy will be created before load. The imports will automatically be loaded. It is guaranteed that the getKB() function on the returned OWLOntology (and any of its import ontologies) will return a reference to this KB.

Parameters:
ontology -
Returns:
The loaded ontology

load

OWLOntology load(OWLOntology ontology,
                 boolean withImports)
Load the ontology to the KB. If the ontology is created using another KB a copy will be created before load. The imports will automatically be loaded if the second parameter is true. It is guaranteed that the getKB() function on the returned OWLOntology (and any of its import ontologies) will return a reference to this KB.

Parameters:
ontology -
withImports -
Returns:
The loaded ontology

unload

void unload(OWLOntology ontology)
Unload the ontology from the KB. The imports of the ontology will automatically be unloaded if there are no other ontologies importing them. Note that ontologies loaded explicitly using the loadOntology will not be unloaded. This function does nothing if the ontology is not loaded in this KB.

Parameters:
ontology -

unload

void unload(java.net.URI uri)
Unload the ontology with the given URI from the KB. The imports of the ontology will automatically be unloaded if there are no other ontologies importing them. Note that ontologies loaded explicitly using the loadOntology will not be unloaded.

Parameters:
uri -

getReader

OWLReader getReader()
Return the reader assocaited with this KB.

Returns:

setReader

void setReader(OWLReader reader)
Set the reader assocaited with this KB.

Parameters:
reader -

read

OWLOntology read(java.lang.String uri)
                 throws java.net.URISyntaxException,
                        java.io.FileNotFoundException
Read the ontology from the given URI, load it to this KB and return a reference to the ontology object created. Note that ontologies imported by the given ontology are also loaded to the KB.

This function is equivalent to kb.read(new URI(uri)). For loading local files use kb.read(file.toURI()) instead. If the input string is known to be a URI the function call kb.read(URI.create(uri)) can be used to avoid URISyntaxException.

Parameters:
uri -
Returns:
The loaded ontology
Throws:
java.net.URISyntaxException - When the given string is not a well-formed URI
java.io.FileNotFoundException

read

OWLOntology read(java.net.URI uri)
                 throws java.io.FileNotFoundException
Read the ontology from the given URI, load it to this KB and return a reference to the ontology object created. Note that ontologies imported by the given ontology are also loaded to the KB. For loading local files use kb.read(file.toURI())

Parameters:
uri -
Returns:
The loaded ontology
Throws:
java.io.FileNotFoundException

read

OWLOntology read(java.io.Reader in,
                 java.net.URI baseURI)
Read the ontology using the given Reader and the base URI, load it to this KB and return a reference to the ontology object created. Note that ontologies imported by the given ontology are also loaded to the KB.

Parameters:
in -
baseURI -
Returns:
The loaded ontology

read

OWLOntology read(java.io.InputStream in,
                 java.net.URI baseURI)
Read the ontology using the given InputStream and the base URI, load it to this KB and return a reference to the ontology object created. Note that ontologies imported by the given ontology are also loaded to the KB.

Parameters:
in -
baseURI -
Returns:
The loaded ontology

getQNames

QNameProvider getQNames()
Returns:

getAutoConsistency

boolean getAutoConsistency()
Returns true if the KB checks consistency automatically after each ontology is loaded and rejects to load the ontology if it causes inconsistency.


setAutoConsistency

void setAutoConsistency(boolean auto)
Set/clear the behavior to check consistency automatically after each ontology is loaded. When AutoConsistency is turned on an ontology that causes inconsistency will not be loaded. If turned off no consistency check will be done automaically.


getAutoTranslate

boolean getAutoTranslate()

setAutoTranslate

void setAutoTranslate(boolean auto)

getTranslationSource

OWLKnowledgeBase getTranslationSource()

createOWLSOntology

OWLSOntology createOWLSOntology()
Deprecated. Use createOntology() instead


createOWLSOntology

OWLSOntology createOWLSOntology(java.net.URI uri)
Deprecated. Use createOntology(URI) instead


readService

Service readService(java.lang.String uri)
                    throws java.net.URISyntaxException,
                           java.io.FileNotFoundException
Throws:
java.net.URISyntaxException
java.io.FileNotFoundException

readService

Service readService(java.net.URI uri)
                    throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

readService

Service readService(java.io.Reader in,
                    java.net.URI baseURI)

readService

Service readService(java.io.InputStream in,
                    java.net.URI baseURI)

readAllServices

java.util.List readAllServices(java.lang.String uri)
                               throws java.net.URISyntaxException,
                                      java.io.FileNotFoundException
Throws:
java.net.URISyntaxException
java.io.FileNotFoundException

readAllServices

java.util.List readAllServices(java.net.URI uri)
                               throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

readAllServices

java.util.List readAllServices(java.io.Reader in,
                               java.net.URI baseURI)

readAllServices

java.util.List readAllServices(java.io.InputStream in,
                               java.net.URI baseURI)


Copyright © 2004 Evren Sirin. All Rights Reserved.