Class QasmTextUI

java.lang.Object
  |
  +--QasmTextUI

public class QasmTextUI
extends java.lang.Object

This class was extracted (rewriten) from another package to server as a test program for daml4jess package. It supports the following commands:


Nested Class Summary
protected static class QasmTextUI.QasmCmdReader
          Read & parse command line input into commands.
static class QasmTextUI.QasmCommand
          QASM command object class.
 
Field Summary
protected  Daml4Jess d4j_
           
static java.lang.String QASM_CONFIG_KEY
           
 
Constructor Summary
QasmTextUI(Daml4Jess d4j)
          Constructor.
 
Method Summary
protected  void batch(java.lang.String batchFile)
          Process batch command, that is, to execute a list of commands in the given file.
protected  void doWork()
          Get input user and take appropriate actions.
protected  void dump(java.lang.String dumpFile)
          Dump the knowledge base (rules & facts) to the given file.
protected  void handleCmd(QasmTextUI.QasmCommand cmd)
          Handle the given qasm command.
static void main(java.lang.String[] args)
          Usage: java -DQasmConfig= QasmTextUI []
protected  void processInput(QasmTextUI.QasmCmdReader cmdReader)
          Get input from user and take appropriate actions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

QASM_CONFIG_KEY

public static java.lang.String QASM_CONFIG_KEY

d4j_

protected Daml4Jess d4j_
Constructor Detail

QasmTextUI

public QasmTextUI(Daml4Jess d4j)
Constructor.

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Usage: java -DQasmConfig= QasmTextUI []

java.lang.Exception

doWork

protected void doWork()
               throws java.io.IOException
Get input user and take appropriate actions.

java.io.IOException

processInput

protected void processInput(QasmTextUI.QasmCmdReader cmdReader)
Get input from user and take appropriate actions.


handleCmd

protected void handleCmd(QasmTextUI.QasmCommand cmd)
Handle the given qasm command.


batch

protected void batch(java.lang.String batchFile)
              throws java.io.IOException
Process batch command, that is, to execute a list of commands in the given file.

java.io.IOException

dump

protected void dump(java.lang.String dumpFile)
             throws java.io.IOException
Dump the knowledge base (rules & facts) to the given file.

java.io.IOException