org.semanticweb.owlapi.owllink.server
Class OWLlinkReasonerBridge

java.lang.Object
  extended by org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge
All Implemented Interfaces:
RequestVisitor

public class OWLlinkReasonerBridge
extends java.lang.Object
implements RequestVisitor

The OWLlinkReasonerBridge mediates between OWLlink and an implementation of OWLReasoner. It supports the core OWLlink queries (as can be simulated via the OWL API) as well as the retraction extension.

Author: Olaf Noppens Date: 25.10.2009


Nested Class Summary
static class OWLlinkReasonerBridge.BlockablePrefixManagerProvider
           
static class OWLlinkReasonerBridge.PairsIterator<O>
           
 
Field Summary
protected  OWLReasonerFactory factory
           
protected  OWLOntologyManager manager
           
 
Constructor Summary
OWLlinkReasonerBridge(OWLReasonerFactory factory, OWLlinkReasonerConfiguration configuration)
           
 
Method Summary
 void answer(Classify query)
           
 void answer(CreateKB query)
           
 void answer(GetAllAnnotationProperties query)
           
 void answer(GetAllClasses query)
           
 void answer(GetAllDataProperties query)
           
 void answer(GetAllDatatypes query)
           
 void answer(GetAllIndividuals query)
           
 void answer(GetAllObjectProperties query)
           
 void answer(GetDataPropertiesBetween query)
           
 void answer(GetDataPropertiesOfLiteral query)
           
 void answer(GetDataPropertiesOfSource query)
           
 void answer(GetDataPropertySources query)
           
 void answer(GetDataPropertyTargets query)
           
 void answer(GetDescription query)
           
 void answer(GetDifferentIndividuals query)
           
 void answer(GetDisjointClasses query)
           
 void answer(GetDisjointDataProperties query)
           
 void answer(GetDisjointObjectProperties query)
           
 void answer(GetEquivalentClasses query)
           
 void answer(GetEquivalentDataProperties query)
           
 void answer(GetEquivalentObjectProperties query)
           
 void answer(GetFlattenedDataPropertySources query)
           
 void answer(GetFlattenedDifferentIndividuals query)
           
 void answer(GetFlattenedInstances query)
           
 void answer(GetFlattenedObjectPropertySources query)
           
 void answer(GetFlattenedObjectPropertyTargets query)
           
 void answer(GetFlattenedTypes query)
           
 void answer(GetInstances query)
           
 void answer(GetKBLanguage query)
           
 void answer(GetObjectPropertiesBetween query)
           
 void answer(GetObjectPropertiesOfSource query)
           
 void answer(GetObjectPropertiesOfTarget query)
           
 void answer(GetObjectPropertySources query)
           
 void answer(GetObjectPropertyTargets query)
           
 void answer(GetPrefixes query)
           
 void answer(GetSameIndividuals query)
           
 void answer(GetSettings query)
           
 void answer(GetSubClasses query)
           
 void answer(GetSubClassHierarchy query)
           
 void answer(GetSubDataProperties query)
           
 void answer(GetSubDataPropertyHierarchy query)
           
 void answer(GetSubObjectProperties query)
           
 void answer(GetSubObjectPropertyHierarchy query)
           
 void answer(GetSuperClasses query)
           
 void answer(GetSuperDataProperties query)
           
 void answer(GetSuperObjectProperties query)
           
 void answer(GetTypes query)
           
 void answer(IsClassSatisfiable query)
           
 void answer(IsDataPropertySatisfiable query)
           
 void answer(IsEntailed query)
           
 void answer(IsEntailedDirect query)
           
 void answer(IsKBConsistentlyDeclared query)
           
 void answer(IsKBSatisfiable query)
           
 void answer(IsObjectPropertySatisfiable query)
           
 void answer(LoadOntologies query)
           
 void answer(Realize query)
           
 void answer(ReleaseKB query)
           
 void answer(Request query)
          Common answer method for all queries where no specific answer method exists, i.e. for all non-core queries.
 void answer(Set query)
           
 void answer(Tell request)
           
protected   computeSynonyms( nodeSet, OWLReasoner reasoner)
           
protected  IndividualSynset computeSynonyms(OWLIndividual individual, OWLReasoner reasoner)
           
protected  java.util.Set<IndividualSynset> convertTo( nodeSet)
           
protected  IndividualSynonyms convertTo( node)
           
protected  java.util.Set<IndividualSynset> convertToIndividualSynsetSet( nodeSet)
           
protected   convertToNode( nodeSet)
           
protected  java.util.Set<> convertToSynsets( nodeSet)
          Returns a set of nodes which only contains named nodes.
protected  java.util.Set<OWLClass> getAllClasses(IRI kb)
           
protected  java.util.Set<OWLDataProperty> getAllDataProperties(IRI kb)
           
protected  java.util.Set<OWLIndividual> getAllIndividuals(IRI kb)
           
protected  java.util.Set<OWLObjectProperty> getAllObjectProperties(IRI kb)
           
protected  OWLOntologyManager getOntologyManager(IRI kb)
           
 OWLReasoner getReasoner(IRI kb)
           
 OWLlinkReasonerConfiguration getReasonerConfiguration(IRI kb, boolean createIfNull)
           
protected  Response getResponse()
           
protected  java.lang.String getWarning(OWLReasoner reasoner)
           
protected  ErrorResponse handle(java.lang.Exception e)
           
protected  ErrorResponse handleReasonerException(java.lang.Exception e)
           
 void logWarning(OWLReasoner reasoner, java.lang.String warning)
           
 void process(HttpRequest request, HttpResponse response)
           
 boolean process(java.io.InputStream in, java.io.OutputStream out, HttpResponse response, boolean zipContentIfAppropriate)
           
 void setReasonerKnowsTopProperty(boolean b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

manager

protected OWLOntologyManager manager

factory

protected OWLReasonerFactory factory
Constructor Detail

OWLlinkReasonerBridge

public OWLlinkReasonerBridge(OWLReasonerFactory factory,
                             OWLlinkReasonerConfiguration configuration)
Method Detail

process

public final void process(HttpRequest request,
                          HttpResponse response)
                   throws org.xml.sax.SAXException,
                          java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

process

public final boolean process(java.io.InputStream in,
                             java.io.OutputStream out,
                             HttpResponse response,
                             boolean zipContentIfAppropriate)
                      throws org.xml.sax.SAXException,
                             java.io.IOException
Throws:
org.xml.sax.SAXException
java.io.IOException

getReasoner

public final OWLReasoner getReasoner(IRI kb)
                              throws org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge.KBException
Throws:
org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge.KBException

getReasonerConfiguration

public final OWLlinkReasonerConfiguration getReasonerConfiguration(IRI kb,
                                                                   boolean createIfNull)
                                                            throws org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge.KBException
Throws:
org.semanticweb.owlapi.owllink.server.OWLlinkReasonerBridge.KBException

logWarning

public final void logWarning(OWLReasoner reasoner,
                             java.lang.String warning)

getOntologyManager

protected OWLOntologyManager getOntologyManager(IRI kb)

getWarning

protected java.lang.String getWarning(OWLReasoner reasoner)

handle

protected ErrorResponse handle(java.lang.Exception e)

handleReasonerException

protected ErrorResponse handleReasonerException(java.lang.Exception e)

answer

public void answer(Classify query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(Realize query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(CreateKB query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllAnnotationProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllClasses query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllDataProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllDatatypes query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllIndividuals query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetAllObjectProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDataPropertiesBetween query)
Specified by:
answer in interface RequestVisitor

getAllClasses

protected java.util.Set<OWLClass> getAllClasses(IRI kb)

getAllDataProperties

protected java.util.Set<OWLDataProperty> getAllDataProperties(IRI kb)

getAllObjectProperties

protected java.util.Set<OWLObjectProperty> getAllObjectProperties(IRI kb)

getAllIndividuals

protected java.util.Set<OWLIndividual> getAllIndividuals(IRI kb)

answer

public void answer(GetDataPropertiesOfLiteral query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDataPropertiesOfSource query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDataPropertySources query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDataPropertyTargets query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDescription query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDisjointClasses query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDisjointDataProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetDifferentIndividuals query)
Specified by:
answer in interface RequestVisitor

convertTo

protected java.util.Set<IndividualSynset> convertTo( nodeSet)

convertTo

protected IndividualSynonyms convertTo( node)

answer

public void answer(GetDisjointObjectProperties query)
Specified by:
answer in interface RequestVisitor

convertToSynsets

protected java.util.Set<> convertToSynsets( nodeSet)
Returns a set of nodes which only contains named nodes.

Parameters:
nodeSet -
Returns:

convertToNode

protected  convertToNode( nodeSet)

answer

public void answer(GetEquivalentClasses query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetEquivalentDataProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSameIndividuals query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetEquivalentObjectProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedDataPropertySources query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedDifferentIndividuals query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedInstances query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedObjectPropertySources query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedObjectPropertyTargets query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetFlattenedTypes query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetInstances query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetKBLanguage query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetObjectPropertiesBetween query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetObjectPropertiesOfSource query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetObjectPropertiesOfTarget query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetObjectPropertySources query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetObjectPropertyTargets query)
Specified by:
answer in interface RequestVisitor

convertToIndividualSynsetSet

protected java.util.Set<IndividualSynset> convertToIndividualSynsetSet( nodeSet)

computeSynonyms

protected IndividualSynset computeSynonyms(OWLIndividual individual,
                                           OWLReasoner reasoner)

computeSynonyms

protected  computeSynonyms( nodeSet,
                                OWLReasoner reasoner)

answer

public void answer(GetPrefixes query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSettings query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSubClasses query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSubClassHierarchy query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSubDataProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSubDataPropertyHierarchy query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSubObjectProperties query)
Specified by:
answer in interface RequestVisitor

setReasonerKnowsTopProperty

public void setReasonerKnowsTopProperty(boolean b)

answer

public void answer(GetSubObjectPropertyHierarchy query)
Specified by:
answer in interface RequestVisitor

getResponse

protected Response getResponse()

answer

public void answer(GetSuperClasses query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(Request query)
Description copied from interface: RequestVisitor
Common answer method for all queries where no specific answer method exists, i.e. for all non-core queries.

Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSuperDataProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetSuperObjectProperties query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(GetTypes query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsClassSatisfiable query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsDataPropertySatisfiable query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsKBConsistentlyDeclared query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsKBSatisfiable query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsEntailed query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsEntailedDirect query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(IsObjectPropertySatisfiable query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(LoadOntologies query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(ReleaseKB query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(Set query)
Specified by:
answer in interface RequestVisitor

answer

public void answer(Tell request)
Specified by:
answer in interface RequestVisitor