DIG 1.1 Reasoners API, April 26, 2004 (12:45 PM)

org.kr.dl.dig.reasoner.v1_1.impl
Class FaCTPlusPlusReasoner

java.lang.Object
  extended byorg.kr.dl.dig.reasoner.v1_1.impl.FaCTPlusPlusReasoner
All Implemented Interfaces:
Reasoner

public class FaCTPlusPlusReasoner
extends Object
implements Reasoner

An implementation of Reasoner that passes its requests to a FaCT++ reasoner.

Version:
$Id: FaCTPlusPlusReasoner.java,v 1.2 2004/04/26 08:55:45 dturi Exp $
Author:
Daniele Turi

Field Summary
 
Fields inherited from interface org.kr.dl.dig.reasoner.v1_1.Reasoner
XML_HEADER
 
Constructor Summary
FaCTPlusPlusReasoner()
           
 
Method Summary
 ResponsesDocument asks(AsksDocument asks)
          Returns the ResponsesDocument corresponding to the asks.
 IdentifierDocument getIdentifier()
          Returns the IdentifierDocument corresponding to the getIdentifier request.
 URI newKB()
          Obtains the URI for a new knowledge base from the reasoner.
 IdentifierDocument parseIdentifier(String result)
           
 ResponseDocument parseResponse(String responseString)
          Parses the reasoner responseString into a ResponseDocument.
 ResponsesDocument parseResponses(String responsesString)
          Parses the reasoner responsesString into a ResponsesDocument.
 boolean releaseKB(URI kb)
          Instructs the reasoner to release the knowledge base kb.
 ResponseDocument tells(TellsDocument tells)
          Returns the ResponseDocument corresponding to the tells.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FaCTPlusPlusReasoner

public FaCTPlusPlusReasoner()
                     throws ReasonerException
Method Detail

newKB

public URI newKB()
          throws ReasonerException
Obtains the URI for a new knowledge base from the reasoner.

Specified by:
newKB in interface Reasoner
Returns:
the URI for a new knowledge base from the reasoner.
Throws:
ReasonerException - with code:
  • 602 if the reasoner responses do not parse or, if logger is finest, validate;
  • 104 if an IOException occurs;
  • 202 if the reasoner returns a malformed URI.

releaseKB

public boolean releaseKB(URI kb)
                  throws ReasonerException
Instructs the reasoner to release the knowledge base kb.

Specified by:
releaseKB in interface Reasoner
Parameters:
kb - the URI of a knowledge base.
Returns:
true if the operation succeeds.
Throws:
ReasonerException - with code:
  • 602 if the reasoner response does not parse or, if logger is finest, validate;
  • 104 if an IOException occurs;

getIdentifier

public IdentifierDocument getIdentifier()
                                 throws ReasonerException
Returns the IdentifierDocument corresponding to the getIdentifier request.

Specified by:
getIdentifier in interface Reasoner
Returns:
the IdentifierDocument corresponding to the getIdentifier request.
Throws:
ReasonerException - with code:
  • 602 if the reasoner response does not parse or, if logger is finest, validate;
  • 104 if an IOException occurs;

parseIdentifier

public IdentifierDocument parseIdentifier(String result)
                                   throws ReasonerException
Throws:
ReasonerException

tells

public ResponseDocument tells(TellsDocument tells)
                       throws ReasonerException
Returns the ResponseDocument corresponding to the tells.

Specified by:
tells in interface Reasoner
Parameters:
tells - an TellsDocument.
Returns:
the ResponseDocument corresponding to the tells.
Throws:
ReasonerException - with code:
  • 602 if the reasoner response does not parse or, if logger is finest, validate;
  • 104 if an IOException occurs.

asks

public ResponsesDocument asks(AsksDocument asks)
                       throws ReasonerException
Returns the ResponsesDocument corresponding to the asks.

Specified by:
asks in interface Reasoner
Parameters:
asks - an AsksDocument.
Returns:
the ResponsesDocument corresponding to the asks.
Throws:
ReasonerException - with code:
  • 602 if the reasoner response does not parse or, if logger is finest, validate;
  • 104 if an IOException occurs;

parseResponse

public ResponseDocument parseResponse(String responseString)
                               throws ReasonerException
Parses the reasoner responseString into a ResponseDocument.

Parameters:
responseString - reasoner response to be parsed.
Returns:
the ResponseDocument corresponding to the reasoner response.
Throws:
ReasonerException - with code:
  • 602 if the reasoner response does not parse or, if logger is finest, validate;
  • 104 if an IOException occurs.

parseResponses

public ResponsesDocument parseResponses(String responsesString)
                                 throws ReasonerException
Parses the reasoner responsesString into a ResponsesDocument.

Parameters:
responsesString - reasoner responses to be parsed.
Returns:
the ResponsesDocument corresponding to the reasoner responses.
Throws:
ReasonerException - with code:
  • 602 if the reasoner responses do not parse or, if logger is finest, validate;
  • 104 if an IOException occurs.

DIG 1.1 Reasoners API, April 26, 2004 (12:45 PM)