de.unidu.is.hyspirit
Class HySpiritAbstractClient

java.lang.Object
  extended byde.unidu.is.hyspirit.HySpiritAbstractClient
All Implemented Interfaces:
HySpirit
Direct Known Subclasses:
HySpiritInvokerClient, HySpiritSocketClient

public abstract class HySpiritAbstractClient
extends java.lang.Object
implements HySpirit

An abtract implementation of the interface for connecting to the HySpirit inference engine for pDatalog built by our group (the version implemented in the Beta object-oriented programming language).

Sub-classes have to set up the reader and the writer.

Version:
$Revision: 1.8 $, $Date: 2005/03/14 17:33:13 $
Author:
Henrik Nottelmann

Field Summary
protected  java.io.BufferedReader in
          Reader from HySpirit, has to be initialised in a sub-class.
protected  java.io.PrintWriter out
          Writer to HySpirit, has to be initialised in a sub-class.
 
Constructor Summary
HySpiritAbstractClient()
           
 
Method Summary
 void close()
          Closes tje client.
protected  java.lang.String getLine()
          Reads in a line, and returns it.
 java.lang.String send(java.lang.String text)
          Sends text (facts, rules, queries etc.) to HySpirit, and receives the result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

in

protected java.io.BufferedReader in
Reader from HySpirit, has to be initialised in a sub-class.


out

protected java.io.PrintWriter out
Writer to HySpirit, has to be initialised in a sub-class.

Constructor Detail

HySpiritAbstractClient

public HySpiritAbstractClient()
Method Detail

send

public java.lang.String send(java.lang.String text)
Sends text (facts, rules, queries etc.) to HySpirit, and receives the result.

Specified by:
send in interface HySpirit
Parameters:
text - text to be sent to HySpirit
Returns:
HySpirit answer

getLine

protected java.lang.String getLine()
Reads in a line, and returns it.

Returns:
line from HySpirit

close

public void close()
Closes tje client.

Specified by:
close in interface HySpirit