|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jess.xml.XMLPrinter
This class can translate a whole file of Jess code into JessML. You can construct an XMLPrinter that will send its output to a given Writer objects, then use the other methods of the class to write an XML prelude and trailer surrounding an arbitrary amount of JessML code translated directly from Jess code.
This class includes a main() method that reads from a file and emits a complete JessML document on standard output.
(C) 2006 Sandia National Laboratories
Constructor Summary | |
XMLPrinter(java.io.Writer writer)
Constructor. |
Method Summary | |
void |
close()
Closes the underlying Writer. |
static void |
main(java.lang.String[] args)
Reads a file of Jess code and emits equivalent XML on standard output, as a complete, well-formed JessML document. |
void |
printBackMatter()
Prints a closing "rulebase" tag to the underlying writer. |
void |
printFrontMatter()
Prints an XML prelude, JessML version instruction, and opening "rulebase" tag to the underlying writer. |
void |
translateToXML(java.io.Reader reader)
Reads Jess code from the Reader, and sends JessML equivalents to the underlying Writer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XMLPrinter(java.io.Writer writer)
writer
- the writer to send output toMethod Detail |
public void close() throws java.io.IOException
java.io.IOException
- if calling close() on the Writer throws itpublic static void main(java.lang.String[] args) throws java.io.IOException, JessException
args
- first argument is the path to a file of Jess code
java.io.IOException
- if the file doesn't exist
JessException
- if anything goes wrongpublic void translateToXML(java.io.Reader reader) throws JessException
reader
- a source of Jess code
JessException
- if anything goes wrongpublic void printBackMatter() throws java.io.IOException
java.io.IOException
- if anything goes wrongpublic void printFrontMatter() throws java.io.IOException
java.io.IOException
- if anything goes wrong
|
© 2007 Sandia Corporation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |