Protégé-OWL 3.4.8

edu.stanford.smi.protegex.owl.inference.dig.reasoner
Class DefaultDIGReasoner

java.lang.Object
  extended by edu.stanford.smi.protegex.owl.inference.dig.reasoner.DefaultDIGReasoner
All Implemented Interfaces:
DIGReasoner

public class DefaultDIGReasoner
extends Object
implements DIGReasoner

User: matthewhorridge
The Univeristy Of Manchester
Medical Informatics Group
Date: Jun 4, 2004

matthew.horridge@cs.man.ac.uk
www.cs.man.ac.uk/~horridgm


Field Summary
static String DEFAULT_URL_PROPERTY
           
static boolean log
          Deprecated. Use DIGReasonerPreferences to set logging
 
Fields inherited from interface edu.stanford.smi.protegex.owl.inference.dig.reasoner.DIGReasoner
digLogger, LOGGER_NAME
 
Constructor Summary
DefaultDIGReasoner()
           
 
Method Summary
 void clearKnowledgeBase(String kbURI)
          Clears the knowledge base
 String createKnowledgeBase()
          A helper method that asks the reasoner to create a new knowledgebase.
 DIGReasonerIdentity getIdentity()
          Gets the identity of the inference
 String getReasonerURL()
          Gets the URL of the reasoner.
static void log(Level level, Document doc)
          A helper method that lets us log the DIG XML used to communicate with the reasoner.
protected  void performErrorCheck(Document doc)
          This method checks for any errors in the DIG response and throws a DIGErrorException if there are any errors.
 Document performRequest(Document request)
          Sends a request to the reasoner and retrieves the response.
 void releaseKnowledgeBase(String kbURI)
          A helper method that releases a previously created knowledgebase.
 void setReasonerURL(String 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

DEFAULT_URL_PROPERTY

public static final String DEFAULT_URL_PROPERTY
See Also:
Constant Field Values

log

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

DefaultDIGReasoner

public DefaultDIGReasoner()
Method Detail

setReasonerURL

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

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

getReasonerURL

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

Specified by:
getReasonerURL in interface DIGReasoner

getIdentity

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

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

createKnowledgeBase

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

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

releaseKnowledgeBase

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

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

clearKnowledgeBase

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

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

performRequest

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

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

performErrorCheck

protected void performErrorCheck(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

public static void log(Level level,
                       Document doc)
A helper method that lets us log the DIG XML used to communicate with the reasoner.


Protégé-OWL 3.4.8

Submit a bug report or feature request
Copyright (c) 1998-2012 Stanford University.