uk.ac.manchester.cs.owl.inference.dig11
Class HTTPReasonerImpl

java.lang.Object
  extended by uk.ac.manchester.cs.owl.inference.dig11.HTTPReasonerImpl
All Implemented Interfaces:
HTTPReasoner

public class HTTPReasonerImpl
extends java.lang.Object
implements HTTPReasoner

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 21-Nov-2006


Field Summary
static boolean log
          Deprecated. Use DIGReasonerPreferences to set logging
 
Constructor Summary
HTTPReasonerImpl(OWLOntologyManager manager)
           
 
Method Summary
 void clearKnowledgeBase(java.lang.String kbURI)
          Clears the knowledge base
 java.lang.String createKnowledgeBase()
          A helper method that asks the reasoner to create a new knowledgebase.
 DIGReasonerIdentity getIdentity()
          Gets the identity of the inference
 java.lang.String getReasonerURL()
          Gets the URL of the reasoner.
protected  void log(org.w3c.dom.Document doc)
          A helper method that lets us log the DIG XML used to communicate with the reasoner.
protected  void performErrorCheck(org.w3c.dom.Document doc)
          This method checks for any errors in the DIG response and throws a DIGErrorException if there are any errors.
 org.w3c.dom.Document performRequest(org.w3c.dom.Document request)
          Sends a request to the reasoner and retrieves the response.
 void releaseKnowledgeBase(java.lang.String kbURI)
          A helper method that releases a previously created knowledgebase.
 void setReasonerURL(java.net.URL url)
          Sets the URL of the inference.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static boolean log
Deprecated. Use DIGReasonerPreferences to set logging
Constructor Detail

HTTPReasonerImpl

public HTTPReasonerImpl(OWLOntologyManager manager)
Method Detail

setReasonerURL

public void setReasonerURL(java.net.URL url)
Sets the URL of the inference.

Specified by:
setReasonerURL in interface HTTPReasoner
Parameters:
url - The URL

getReasonerURL

public java.lang.String getReasonerURL()
Gets the URL of the reasoner.

Specified by:
getReasonerURL in interface HTTPReasoner

getIdentity

public DIGReasonerIdentity getIdentity()
                                throws DIGReasonerException
Gets the identity of the inference

Specified by:
getIdentity in interface HTTPReasoner
Returns:
ADIGReasonerIdentity object that encapsulates the information about the inference.
Throws:
DIGReasonerException

createKnowledgeBase

public java.lang.String createKnowledgeBase()
                                     throws DIGReasonerException
A helper method that asks the reasoner to create a new knowledgebase.

Specified by:
createKnowledgeBase in interface HTTPReasoner
Returns:
A String that represents a URI that is an identifier for the newly created knowledgebase.
Throws:
DIGReasonerException

releaseKnowledgeBase

public void releaseKnowledgeBase(java.lang.String kbURI)
                          throws DIGReasonerException
A helper method that releases a previously created knowledgebase.

Specified by:
releaseKnowledgeBase in interface HTTPReasoner
Parameters:
kbURI - The URI of the knowledgebase
Throws:
DIGReasonerException

clearKnowledgeBase

public void clearKnowledgeBase(java.lang.String kbURI)
                        throws DIGReasonerException
Clears the knowledge base

Specified by:
clearKnowledgeBase in interface HTTPReasoner
Parameters:
kbURI - The uri that identifies the knowledge base to be cleared.
Throws:
DIGReasonerException

performRequest

public org.w3c.dom.Document performRequest(org.w3c.dom.Document request)
                                    throws DIGReasonerException
Description copied from interface: HTTPReasoner
Sends a request to the reasoner and retrieves the response.

Specified by:
performRequest in interface HTTPReasoner
Parameters:
request - A Document containing the DIG request
Returns:
A Document containing the reponse from the reasoner
Throws:
DIGReasonerException

performErrorCheck

protected void performErrorCheck(org.w3c.dom.Document doc)
                          throws DIGErrorException
This method checks for any errors in the DIG response and throws a DIGErrorException if there are any errors.

Parameters:
doc - The XML DIG Document that contains that response from the reasoner.
Throws:
DIGErrorException

log

protected void log(org.w3c.dom.Document doc)
A helper method that lets us log the DIG XML used to communicate with the reasoner.