org.semanticweb.owlapi.owllink
Class OWLlinkHTTPXMLReasoner
java.lang.Object
OWLReasonerBase
org.semanticweb.owlapi.owllink.OWLlinkHTTPXMLReasoner
- All Implemented Interfaces:
- OWLlinkReasoner
public class OWLlinkHTTPXMLReasoner
- extends OWLReasonerBase
- implements OWLlinkReasoner
OWLlinkHTTPXMLReasoner is an implementation of OWLlinkReasoner that uses XML over
HTTP as binding protocol.
It behaves as a normal OWLReasoner, i.e., changes on the root ontology will be transfered to the OWLlinkServer
via OWLlink. For that a knowledge base (see getDefaultKB()) will be created that contains all
axioms of the root ontology and its import closure. Calling methods of OWLReasoner will always be executed
with respect to that OWLlink knowledge base. In addition, additional knowledge bases can be created directly
over OWLlink (CreateKB requests) and all OWLlink requests (either on the knowledge base related to the
root ontolgoy or on any other knowledge base managed by the OWLlink server) are supported.
- Author:
- Olaf Noppens
|
Method Summary |
ResponseMessage |
answer(Request... request)
Answers the given list of requests in
exactly the given ordering. |
|
answer(Request<R> request)
Answers the given request. |
void |
classify()
|
protected |
convertByNamePolicy(SetOfIndividuals individuals)
|
protected |
convertToNamedIndividual(IndividualSynonyms synonyms)
|
protected |
convertToNamedIndividuals(SetOfIndividualSynsets setOfsynsets)
|
protected void |
createDefaultKB()
|
|
getBottomClassNode()
|
|
getBottomDataPropertyNode()
|
|
getBottomObjectPropertyNode()
|
|
getDataPropertyDomains(OWLDataProperty pe,
boolean direct)
|
java.util.Set<OWLLiteral> |
getDataPropertyValues(OWLNamedIndividual ind,
OWLDataProperty pe)
|
IRI |
getDefaultKB()
|
|
getDifferentIndividuals(OWLNamedIndividual ind)
|
|
getDisjointClasses(OWLClassExpression ce)
|
|
getDisjointDataProperties(OWLDataPropertyExpression pe)
|
|
getDisjointObjectProperties(OWLObjectPropertyExpression pe)
|
|
getEquivalentClasses(OWLClassExpression ce)
|
|
getEquivalentDataProperties(OWLDataProperty pe)
|
|
getEquivalentObjectProperties(OWLObjectPropertyExpression pe)
|
|
getInstances(OWLClassExpression ce,
boolean direct)
|
|
getInverseObjectProperties(OWLObjectPropertyExpression pe)
|
|
getObjectPropertyDomains(OWLObjectPropertyExpression pe,
boolean direct)
|
|
getObjectPropertyRanges(OWLObjectPropertyExpression pe,
boolean direct)
|
|
getObjectPropertyValues(OWLNamedIndividual ind,
OWLObjectPropertyExpression pe)
|
java.util.Set<InferenceType> |
getPrecomputableInferenceTypes()
|
protected Description |
getReasonerInfo()
|
java.lang.String |
getReasonerName()
|
Version |
getReasonerVersion()
|
|
getSameIndividuals(OWLNamedIndividual ind)
|
|
getSubClasses(OWLClassExpression ce,
boolean direct)
|
|
getSubDataProperties(OWLDataProperty pe,
boolean direct)
|
|
getSubObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
|
|
getSuperClasses(OWLClassExpression ce,
boolean direct)
|
|
getSuperDataProperties(OWLDataProperty pe,
boolean direct)
|
|
getSuperObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
|
|
getTopClassNode()
|
|
getTopDataPropertyNode()
|
|
getTopObjectPropertyNode()
|
|
getTypes(OWLNamedIndividual ind,
boolean direct)
|
|
getUnsatisfiableClasses()
|
protected void |
handleChanges(java.util.Set<OWLAxiom> addAxioms,
java.util.Set<OWLAxiom> removeAxioms)
|
void |
interrupt()
|
boolean |
isConsistent()
|
boolean |
isEntailed(OWLAxiom axiom)
|
boolean |
isEntailmentCheckingSupported( axiomType)
|
boolean |
isPrecomputed(InferenceType inferenceType)
|
boolean |
isSatisfiable(OWLClassExpression classExpression)
|
protected
|
performRequest(Request<R> request)
|
protected
|
performRequestOWLAPI(Request<R> request)
If an OWLLink error occurs the error will be tried to be thrown as OWLAPI exception,
e.g., OWLlinkUnsatisfiableKBErrorResponseException as InconsistentOntologyException. |
protected ResponseMessage |
performRequests(Request... request)
|
void |
precomputeInferences(InferenceType... inferenceTypes)
|
void |
realise()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultKnowledgeBase
protected IRI defaultKnowledgeBase
prov
protected PrefixManagerProvider prov
OWLlinkHTTPXMLReasoner
public OWLlinkHTTPXMLReasoner(OWLOntology rootOntology,
OWLlinkReasonerConfiguration configuration,
BufferingMode bufferingMode)
getReasonerName
public java.lang.String getReasonerName()
getReasonerVersion
public Version getReasonerVersion()
isEntailmentCheckingSupported
public boolean isEntailmentCheckingSupported( axiomType)
interrupt
public void interrupt()
getDefaultKB
public IRI getDefaultKB()
answer
public <R extends Response> R answer(Request<R> request)
- Description copied from interface:
OWLlinkReasoner
- Answers the given request. If the OWLlink server answers with an Error response (or
any subtype thereof) an OWLlinkErrorResponseException (or an appropriate
subtype thereof) will be thrown.
- Specified by:
answer in interface OWLlinkReasoner
- Parameters:
request - Request to be performed
- Returns:
- Response object of the given request
answer
public ResponseMessage answer(Request... request)
- Description copied from interface:
OWLlinkReasoner
- Answers the given list of
requests in
exactly the given ordering.
- Specified by:
answer in interface OWLlinkReasoner
- Parameters:
request - Requests to be answered
- Returns:
- ResponseMessage for the given requests.
handleChanges
protected void handleChanges(java.util.Set<OWLAxiom> addAxioms,
java.util.Set<OWLAxiom> removeAxioms)
isConsistent
public boolean isConsistent()
throws ReasonerInterruptedException,
TimeOutException
- Throws:
ReasonerInterruptedException
TimeOutException
isSatisfiable
public boolean isSatisfiable(OWLClassExpression classExpression)
throws ReasonerInterruptedException,
TimeOutException,
ClassExpressionNotInProfileException,
FreshEntitiesException,
InconsistentOntologyException
- Throws:
ReasonerInterruptedException
TimeOutException
ClassExpressionNotInProfileException
FreshEntitiesException
InconsistentOntologyException
isEntailed
public boolean isEntailed(OWLAxiom axiom)
throws ReasonerInterruptedException,
UnsupportedEntailmentTypeException,
TimeOutException,
AxiomNotInProfileException,
FreshEntitiesException
- Throws:
ReasonerInterruptedException
UnsupportedEntailmentTypeException
TimeOutException
AxiomNotInProfileException
FreshEntitiesException
getTopClassNode
public getTopClassNode()
getBottomClassNode
public getBottomClassNode()
getSubClasses
public getSubClasses(OWLClassExpression ce,
boolean direct)
getSuperClasses
public getSuperClasses(OWLClassExpression ce,
boolean direct)
throws InconsistentOntologyException,
ClassExpressionNotInProfileException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
ClassExpressionNotInProfileException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getDisjointClasses
public getDisjointClasses(OWLClassExpression ce)
getEquivalentClasses
public getEquivalentClasses(OWLClassExpression ce)
throws InconsistentOntologyException,
ClassExpressionNotInProfileException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
ClassExpressionNotInProfileException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getUnsatisfiableClasses
public getUnsatisfiableClasses()
throws ReasonerInterruptedException,
TimeOutException
- Throws:
ReasonerInterruptedException
TimeOutException
getSubObjectProperties
public getSubObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getSuperObjectProperties
public getSuperObjectProperties(OWLObjectPropertyExpression pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getEquivalentObjectProperties
public getEquivalentObjectProperties(OWLObjectPropertyExpression pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getTopObjectPropertyNode
public getTopObjectPropertyNode()
getBottomObjectPropertyNode
public getBottomObjectPropertyNode()
getDisjointObjectProperties
public getDisjointObjectProperties(OWLObjectPropertyExpression pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getInverseObjectProperties
public getInverseObjectProperties(OWLObjectPropertyExpression pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getObjectPropertyDomains
public getObjectPropertyDomains(OWLObjectPropertyExpression pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getObjectPropertyRanges
public getObjectPropertyRanges(OWLObjectPropertyExpression pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getTopDataPropertyNode
public getTopDataPropertyNode()
getBottomDataPropertyNode
public getBottomDataPropertyNode()
getSubDataProperties
public getSubDataProperties(OWLDataProperty pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getSuperDataProperties
public getSuperDataProperties(OWLDataProperty pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getEquivalentDataProperties
public getEquivalentDataProperties(OWLDataProperty pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getDisjointDataProperties
public getDisjointDataProperties(OWLDataPropertyExpression pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getDataPropertyDomains
public getDataPropertyDomains(OWLDataProperty pe,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getInstances
public getInstances(OWLClassExpression ce,
boolean direct)
throws InconsistentOntologyException,
ClassExpressionNotInProfileException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
ClassExpressionNotInProfileException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getTypes
public getTypes(OWLNamedIndividual ind,
boolean direct)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getObjectPropertyValues
public getObjectPropertyValues(OWLNamedIndividual ind,
OWLObjectPropertyExpression pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getDataPropertyValues
public java.util.Set<OWLLiteral> getDataPropertyValues(OWLNamedIndividual ind,
OWLDataProperty pe)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getSameIndividuals
public getSameIndividuals(OWLNamedIndividual ind)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
getDifferentIndividuals
public getDifferentIndividuals(OWLNamedIndividual ind)
throws InconsistentOntologyException,
FreshEntitiesException,
ReasonerInterruptedException,
TimeOutException
- Throws:
InconsistentOntologyException
FreshEntitiesException
ReasonerInterruptedException
TimeOutException
convertToNamedIndividuals
protected convertToNamedIndividuals(SetOfIndividualSynsets setOfsynsets)
convertToNamedIndividual
protected convertToNamedIndividual(IndividualSynonyms synonyms)
convertByNamePolicy
protected convertByNamePolicy(SetOfIndividuals individuals)
precomputeInferences
public void precomputeInferences(InferenceType... inferenceTypes)
throws ReasonerInterruptedException,
TimeOutException,
InconsistentOntologyException
- Throws:
ReasonerInterruptedException
TimeOutException
InconsistentOntologyException
isPrecomputed
public boolean isPrecomputed(InferenceType inferenceType)
getPrecomputableInferenceTypes
public java.util.Set<InferenceType> getPrecomputableInferenceTypes()
classify
public void classify()
realise
public void realise()
createDefaultKB
protected void createDefaultKB()
getReasonerInfo
protected Description getReasonerInfo()
performRequests
protected ResponseMessage performRequests(Request... request)
performRequest
protected <R extends Response> R performRequest(Request<R> request)
performRequestOWLAPI
protected <R extends Response> R performRequestOWLAPI(Request<R> request)
- If an OWLLink error occurs the error will be tried to be thrown as OWLAPI exception,
e.g., OWLlinkUnsatisfiableKBErrorResponseException as InconsistentOntologyException.
- Type Parameters:
R - - Parameters:
request -
- Returns: