| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttools.jinnide.JinniEngine
public class JinniEngine
Implements basic JinniEngine interface methods that are common to all the various engine flavours such as JinniPureEngine and JinniPrologEngine
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from interface tools.jinnide.IJinniEngine | 
|---|
IJinniEngine.EngineState | 
| Constructor Summary | |
|---|---|
JinniEngine(boolean inPrologMode,
            java.lang.String libPath,
            java.lang.String initFile)
 | 
|
| Method Summary | |
|---|---|
 java.lang.String | 
consult(java.lang.String filePath)
consults a file  | 
 java.lang.String | 
getInitializationFile()
find out the name of the initialization file used to start up the Jinni engine  | 
 java.lang.String | 
getJinniOutput()
this one is implemented by all the specialization classes because it includes getting the output (but not the direct feedback)  | 
 java.lang.String | 
getLibraryPath()
find out the path of the current Jinni engine's system library  | 
 JinniEngineAnswer | 
getQuery(java.lang.String validator,
         java.lang.String value)
asks a question to Jinni and returns a Jinni solution, which is only the first solution in foreground mode returned as a JinniEngineAnswer so focussed on true/false validation  | 
 JinniEngineAnswer | 
getSimpleQuery(java.lang.String validator,
               java.lang.String value)
asks a question to Jinni and returns a Jinni solution, which is only the first solution in foreground mode returned as a JinniEngineAnswer so focussed on true/false validation  | 
 java.lang.String | 
getStartupFeedback()
Returns and sets engine feedback as a by result of a query, usually the first consulting query to load the lib  | 
 IJinniEngine.EngineState | 
getState()
Informs the client of this engine's state  | 
 java.lang.String | 
getVersion()
 | 
 void | 
halt()
this is one of a couple of reset methods for the Jinni server process (only halt affects the RMI server process ) such as reset which does an internal reset of the Jinni engine, should be used with care  | 
 boolean | 
isAllModeUsed()
find out if the all mode is active  | 
 boolean | 
isBackgroundModeUsed()
find out if the background mode is active  | 
 boolean | 
isPrologModeUsed()
find out if the prolog mode is active  | 
 boolean | 
isTraceModeUsed()
find out if the usual prolog trace mode is active  | 
 java.lang.String | 
jinnidoc(java.lang.String directoryPath)
generates a documentation for a whole directory  | 
 java.lang.String | 
jinnidoc(java.lang.String filePath,
         java.lang.String filename)
generates a documentation for a file  | 
 void | 
kill()
kill the entire server process by force despite pending client requests  | 
 java.lang.String | 
listing()
lists the current clauses in the current Jinni engine instance  | 
 java.lang.String | 
loadEngine()
loads the engine with classpaths, consults etc.; is implicitly done in startupEngine  | 
 java.lang.String | 
more()
returns the next solution if available otherwise no  | 
 JinniEngineAnswer | 
moreAsAnswer()
returns the next solution as a JinniEngineAnswer if available otherwise no  | 
 java.lang.String | 
query(java.lang.String goal)
asks a question to Jinni and returns a Jinni solution, which is either all solutions in case of using the all mode, or otherwise just the first solution  | 
 java.lang.String | 
reconsult(java.lang.String filePath)
reconsult a file  | 
 java.lang.String | 
renew(java.lang.String objectName)
renew a Jinni object  | 
 java.lang.String | 
renewLoq4Jinni()
renews Loq4Jinni's state to update to another logging level which is set otherwise  | 
 java.lang.String | 
reset()
does an internal restart of the current Jinni engine  | 
 java.lang.String | 
restart()
restarts the Jinni server process without affecting the RMI server process  | 
 void | 
restartWrapper(boolean isNTservice)
 | 
 void | 
setAllMode(boolean isAllModeUsed)
allows switching between the usual prolog solution by solution mode and getting all solutions at once which is when isAllModeUsed must be true  | 
 void | 
setBackgroundMode()
allows switching on and off the background mode which allows running a query on the server in a separate thread while other queries may be answered in sort-of the same time while the other query is still running; There is no server-side usage because a JinniProlog server is actually a rather different alternative with its own advantages (and drwabacks ;), thus it would not implement this method (actually we could move this declaration to an abstract method somewhere below this interface).  | 
 void | 
setInitializationFile(java.lang.String filename)
sets the name of the file that is supposed to lie in the library set by setLibraryPath, if not set "init.pro" is assumed  | 
 void | 
setJinniOutput(javax.swing.JTextArea area)
sets the current JTextArea used to keep Jinni's output  | 
 void | 
setLibraryPath(java.lang.String path)
set developer library path where on the first level an initialization file resides that is consulted by loadEngine which is all loadEngine actually does; if not set, the directory relative to this class library is assumed  | 
 void | 
setPrologMode(boolean isProlog)
choose between a prolog mode which is the JinniPrologEngine and the pure mode which is the JinniPureEngine  | 
 void | 
setStartupFeedback(java.lang.String feedback)
 | 
 void | 
setTraceMode(boolean isTraceModeUsed)
allows switching on the usual prolog trace mode  | 
 java.lang.String | 
startupEngine()
starts up the default engine (without providing setup parameters)  | 
 java.lang.String | 
startupEngine(java.lang.String[] params)
starts up the engine  | 
 java.lang.String | 
stopEngine()
stops the engine and thus sets the system back to its initial state including a possibly running thread that is also stopped  | 
 java.lang.String | 
stopThread()
this one is implemented by all the specialization classes because it includes stopping the specific machine  | 
 void | 
stopWrapper(boolean isNTservice,
            boolean isStoppedAtExit)
 | 
 void | 
terminate()
kill the entire server process gently waiting for pending client requests to complete  | 
| Methods inherited from class java.lang.Object | 
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public JinniEngine(boolean inPrologMode,
                   java.lang.String libPath,
                   java.lang.String initFile)
            throws JinniEngineException
JinniEngineException| Method Detail | 
|---|
public IJinniEngine.EngineState getState()
IJinniEngine
getState in interface IJinniEnginepublic java.lang.String getVersion()
getVersion in interface IJinniEngine
public java.lang.String query(java.lang.String goal)
                       throws JinniEngineException,
                              java.rmi.RemoteException
IJinniEngine
query in interface IJinniEnginegoal - the query to be asked
JinniEngineException
java.rmi.RemoteException
public JinniEngineAnswer getSimpleQuery(java.lang.String validator,
                                        java.lang.String value)
                                 throws JinniEngineException
IJinniEngine
getSimpleQuery in interface IJinniEnginevalidator - the validator to be used which is an indication of the desired
 validation predicate e.g. "validate" or "askItSomething"value - the value to be validated e.g. a number (passed as a String)
JinniEngineException
public JinniEngineAnswer getQuery(java.lang.String validator,
                                  java.lang.String value)
                           throws JinniEngineException
IJinniEngine
getQuery in interface IJinniEnginevalidator - the validator to be used which is an indication of the validation module and the
 desired validation predicate e.g. "validator:validate" or "validator:askMeSomething"; its syntax is idential
 with Jinni's module predicate call syntax so always uses a colon to separate the module from the 
 predicatevalue - the value to be validated
JinniEngineException
public void setStartupFeedback(java.lang.String feedback)
                        throws JinniEngineException
setStartupFeedback in interface IJinniEngineJinniEngineException
public java.lang.String getStartupFeedback()
                                    throws JinniEngineException
IJinniEngine
getStartupFeedback in interface IJinniEngineJinniEngineException
public JinniEngineAnswer moreAsAnswer()
                               throws JinniEngineException
IJinniEngine
moreAsAnswer in interface IJinniEngineJinniEngineException
public java.lang.String listing()
                         throws JinniEngineException,
                                java.rmi.RemoteException
IJinniEngine
listing in interface IJinniEngineJinniEngineException
java.rmi.RemoteExceptionpublic void setTraceMode(boolean isTraceModeUsed)
IJinniEngine
setTraceMode in interface IJinniEngineisTraceModeUsed - actual switch value to be setpublic boolean isTraceModeUsed()
IJinniEngine
isTraceModeUsed in interface IJinniEnginepublic void setAllMode(boolean isAllModeUsed)
IJinniEngine
setAllMode in interface IJinniEngineisAllModeUsed - actual switch value to be setpublic boolean isBackgroundModeUsed()
IJinniEngine
isBackgroundModeUsed in interface IJinniEnginepublic boolean isAllModeUsed()
IJinniEngine
isAllModeUsed in interface IJinniEnginepublic boolean isPrologModeUsed()
IJinniEngine
isPrologModeUsed in interface IJinniEnginepublic void setPrologMode(boolean isProlog)
IJinniEngine
setPrologMode in interface IJinniEngineisProlog - actual switch value to be set
public java.lang.String more()
                      throws JinniEngineException
IJinniEngine
more in interface IJinniEngineJinniEngineException
public java.lang.String startupEngine()
                               throws JinniEngineException,
                                      java.rmi.RemoteException
IJinniEngine
startupEngine in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String startupEngine(java.lang.String[] params)
                               throws JinniEngineException,
                                      java.rmi.RemoteException
IJinniEngine
startupEngine in interface IJinniEngineparams - Jinni initialization parameters that may be set here
JinniEngineException
java.rmi.RemoteExceptionpublic java.lang.String getJinniOutput()
IJinniEngine
getJinniOutput in interface IJinniEnginepublic void setJinniOutput(javax.swing.JTextArea area)
setJinniOutput in interface IJinniEnginearea - TextArea to be setpublic java.lang.String getLibraryPath()
IJinniEngine
getLibraryPath in interface IJinniEngine
public java.lang.String loadEngine()
                            throws JinniEngineException,
                                   java.rmi.RemoteException
IJinniEngine
loadEngine in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String renew(java.lang.String objectName)
                       throws JinniEngineException
IJinniEngine
renew in interface IJinniEngineobjectName - name of the object to be renewed
JinniEngineException
public java.lang.String renewLoq4Jinni()
                                throws JinniEngineException,
                                       java.rmi.RemoteException
IJinniEngine
renewLoq4Jinni in interface IJinniEngineJinniEngineException
java.rmi.RemoteExceptionpublic void setInitializationFile(java.lang.String filename)
IJinniEngine
setInitializationFile in interface IJinniEnginefilename - name of the initialization file
public void setLibraryPath(java.lang.String path)
                    throws JinniEngineException
IJinniEngine
setLibraryPath in interface IJinniEnginepath - path to the JinnIde sytem library
JinniEngineExceptionpublic java.lang.String getInitializationFile()
IJinniEngine
getInitializationFile in interface IJinniEngine
public java.lang.String consult(java.lang.String filePath)
                         throws JinniEngineException,
                                java.rmi.RemoteException
IJinniEngine
consult in interface IJinniEnginefilePath - path to the file/directory to be consulted
JinniEngineException
java.rmi.RemoteException
public java.lang.String reconsult(java.lang.String filePath)
                           throws JinniEngineException,
                                  java.rmi.RemoteException
IJinniEngine
reconsult in interface IJinniEnginefilePath - path to the file/directory to be reconsulted
JinniEngineException
java.rmi.RemoteException
public java.lang.String reset()
                       throws JinniEngineException
IJinniEngine
reset in interface IJinniEngineJinniEngineException
public java.lang.String restart()
                         throws JinniEngineException,
                                java.rmi.RemoteException
IJinniEngine
restart in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public java.lang.String stopThread()
                            throws JinniEngineException
IJinniEngine
stopThread in interface IJinniEngineJinniEngineException
public java.lang.String stopEngine()
                            throws JinniEngineException
IJinniEngine
stopEngine in interface IJinniEngineJinniEngineException
public void halt()
          throws JinniEngineException
IJinniEngine
halt in interface IJinniEngineJinniEngineException
public java.lang.String jinnidoc(java.lang.String filePath,
                                 java.lang.String filename)
                          throws JinniEngineException,
                                 java.rmi.RemoteException
IJinniEngine
jinnidoc in interface IJinniEnginefilePath - path to the file to be documentedfilename - name of the file to be documented
JinniEngineException
java.rmi.RemoteException
public java.lang.String jinnidoc(java.lang.String directoryPath)
                          throws JinniEngineException,
                                 java.rmi.RemoteException
IJinniEngine
jinnidoc in interface IJinniEnginedirectoryPath - path to the directory to be documented
JinniEngineException
java.rmi.RemoteException
public void setBackgroundMode()
                       throws JinniEngineException,
                              java.rmi.RemoteException
IJinniEngine
setBackgroundMode in interface IJinniEngineJinniEngineException
java.rmi.RemoteException
public void kill()
          throws java.rmi.RemoteException,
                 java.rmi.NoSuchObjectException,
                 JinniEngineException
IJinniEngine
kill in interface IJinniEnginejava.rmi.RemoteException
java.rmi.NoSuchObjectException
JinniEngineException
public void terminate()
               throws java.rmi.RemoteException,
                      java.rmi.NoSuchObjectException,
                      JinniEngineException
IJinniEngine
terminate in interface IJinniEnginejava.rmi.RemoteException
java.rmi.NoSuchObjectException
JinniEngineException
public void stopWrapper(boolean isNTservice,
                        boolean isStoppedAtExit)
                 throws java.rmi.RemoteException,
                        java.rmi.NoSuchObjectException,
                        JinniEngineException
java.rmi.RemoteException
java.rmi.NoSuchObjectException
JinniEngineException
public void restartWrapper(boolean isNTservice)
                    throws java.rmi.RemoteException
java.rmi.RemoteException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||