|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--JIPPrologEngine
A wrapper for the prolog engine-- this allows us to switch the implementation if need be. Designed around JIProlog.
Constructor Summary | |
JIPPrologEngine()
Create a prolog engine. |
Method Summary | |
java.util.LinkedList |
multilineQuery(java.lang.String multiline)
Query prolog with a bunch of lines, then get back the solution set for the last line. |
java.util.LinkedList |
query(java.lang.String prologCode)
Query prolog and get back its replies. |
java.util.LinkedList |
query(java.lang.String prologCode,
java.lang.String[] variableNames)
Queries and returns the values of variables in the answer. |
void |
readFile(java.lang.String fileName)
Read a file into the engine. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JIPPrologEngine()
Method Detail |
public void readFile(java.lang.String fileName)
readFile
in interface PrologEngine
java.lang.RuntimeException
- if the load fails.public java.util.LinkedList query(java.lang.String prologCode)
query
in interface PrologEngine
prologCode
- the prolog code that forms the query.
java.lang.RuntimeException
- for the inevitable screwup.public java.util.LinkedList multilineQuery(java.lang.String multiline)
multilineQuery
in interface PrologEngine
multiline
- the multiline code, delimited by periods, that forms the query.
java.lang.RuntimeException
- when things go wrong.public java.util.LinkedList query(java.lang.String prologCode, java.lang.String[] variableNames)
query
in interface PrologEngine
prologCode
- the query.
java.lang.RuntimeException
- for the usual bloody stupid mistakes you always make.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |