|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjess.Batch
public class Batch
This class implements the "batch" command, and several static methods are available that you can call to load Jess code.
(C) 2007 Sandia National Laboratories
Rete.batch(java.lang.String)
,
Serialized FormConstructor Summary | |
---|---|
Batch()
|
Method Summary | |
---|---|
static Value |
batch(java.io.Reader reader,
Rete engine,
Context context,
ErrorHandler handler)
|
static Value |
batch(java.lang.String filename,
Rete engine)
Execute a file of Jess code, either in the Jess rule language or in JessML. |
static Value |
batch(java.lang.String filename,
Rete engine,
Context context)
Execute a file of Jess code, either in the Jess rule language or in JessML. |
static Value |
batch(java.lang.String filename,
Rete engine,
Context context,
ErrorHandler handler)
Execute a file of Jess code, either in the Jess rule language or in JessML. |
static Value |
batch(java.lang.String filename,
java.lang.String charset,
Rete engine)
Execute a file of Jess code, either in the Jess rule language or in JessML. |
static Value |
batch(java.lang.String filename,
java.lang.String charset,
Rete engine,
Context context)
Execute a file of Jess code, either in the Jess rule language or in JessML. |
static Value |
batch(java.lang.String filename,
java.lang.String charset,
Rete engine,
Context context,
ErrorHandler handler)
|
Value |
call(ValueVector vv,
Context context)
The implementation of the Jess language "batch" command, which just calls batch(java.lang.String, jess.Rete) . |
static java.io.PushbackReader |
findDocument(Rete engine,
java.lang.String filename)
Searches for the named file of Jess code, opens it if found and returns a Reader for the data. |
static java.io.PushbackReader |
findDocument(Rete engine,
java.lang.String filename,
java.lang.String charset)
Searches for the named file of Jess code, opens it if found and returns a Reader for the data. |
java.lang.String |
getName()
Return the name of this function. |
static boolean |
isXMLDocument(java.io.PushbackReader fis)
Returns true if the first character of the file is a "<", so that it's possible the file contains XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Batch()
Method Detail |
---|
public java.lang.String getName()
Userfunction
getName
in interface Userfunction
public static Value batch(java.lang.String filename, Rete engine) throws JessException
filename
- the name of a file, or a relative or absolute pathengine
- the Rete object to load with the constructs from the file
JessException
- if anything goes wrongpublic static Value batch(java.lang.String filename, java.lang.String charset, Rete engine) throws JessException
filename
- the name of a file, or a relative or absolute pathcharset
- the name of the character set to use in interpreting the fileengine
- the Rete object to load with the constructs from the file
JessException
- if anything goes wrongpublic static Value batch(java.lang.String filename, Rete engine, Context context) throws JessException
filename
- the name of a file, or a relative or absolute pathengine
- the Rete object to load with the constructs from the filecontext
- the execution context to use
JessException
- if anything goes wrongpublic static Value batch(java.lang.String filename, java.lang.String charset, Rete engine, Context context) throws JessException
filename
- the name of a file, or a relative or absolute pathcharset
- the name of the character set to use in interpreting the fileengine
- the Rete object to load with the constructs from the filecontext
- the execution context to use
JessException
- if anything goes wrongpublic static Value batch(java.lang.String filename, Rete engine, Context context, ErrorHandler handler) throws JessException
filename
- the name of a file, or a relative or absolute pathengine
- the Rete object to load with the constructs from the filecontext
- the execution context to usehandler
- notified in case of exceptions
JessException
- if anything goes wrongErrorHandler
public static Value batch(java.lang.String filename, java.lang.String charset, Rete engine, Context context, ErrorHandler handler) throws JessException
JessException
public static Value batch(java.io.Reader reader, Rete engine, Context context, ErrorHandler handler) throws JessException
JessException
public static java.io.PushbackReader findDocument(Rete engine, java.lang.String filename) throws JessException, java.io.IOException
Main
to find
named source code files.If Jess is running in an applet, this method will look for the named file at the applet's document base.
If not in an applet, the method will first assume the argument is a relative path on the local file system.
If the file does not exist, Jess will attempt to use Rete.getResource(String)
to find the file.
Failing that, the method will throw an exception. Uses the platform default character set.
engine
- the active rule enginefilename
- the path to a file of Jess code
JessException
- if all attempts to find the file fail
java.io.IOException
- if the file is found but an error occurs on opening itpublic static java.io.PushbackReader findDocument(Rete engine, java.lang.String filename, java.lang.String charset) throws JessException, java.io.IOException
Main
to find
named source code files.If Jess is running in an applet, this method will look for the named file at the applet's document base.
If not in an applet, the method will first assume the argument is a relative path on the local file system.
If the file does not exist, Jess will attempt to use Rete.getResource(String)
to find the file.
Failing that, the method will throw an exception.
engine
- the active rule enginefilename
- the path to a file of Jess codecharset
- the name of the character set used in the file
JessException
- if all attempts to find the file fail
java.io.IOException
- if the file is found but an error occurs on opening itpublic static boolean isXMLDocument(java.io.PushbackReader fis) throws java.io.IOException
fis
- the open file
java.io.IOException
- if anything goes wrongpublic Value call(ValueVector vv, Context context) throws JessException
batch(java.lang.String, jess.Rete)
.
call
in interface Userfunction
vv
- the function callcontext
- the execution context
JessException
- if anything goes wrongValue.resolveValue(jess.Context)
|
© 2013 Sandia Corporation | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |