jess.xml
Class XMLVisitor

java.lang.Object
  extended byjess.xml.XMLVisitor
All Implemented Interfaces:
Visitor

public class XMLVisitor
extends java.lang.Object
implements Visitor

Renders Jess constructs as JessML code. You should construct an XMLVisitor with a Jess object as a constructor argument, then call toString() to get the JessML version. Any Jess object that implements Visitable can be rendered this way.

The class XMLPrinter is a convenient wrapper around this class that can be used to translate an entire file of Jess code into XML.

(C) 2006 Sandia National Laboratories

See Also:
Visitable

Constructor Summary
XMLVisitor(Visitable v)
          Create an XMLVisitor to render the given Visitable.
 
Method Summary
 java.lang.String toString()
           
 java.lang.Object visitAccumulate(Accumulate accumulate)
           
 java.lang.Object visitDeffacts(Deffacts d)
           
 java.lang.Object visitDeffunction(Deffunction d)
           
 java.lang.Object visitDefglobal(Defglobal d)
           
 java.lang.Object visitDefmodule(Defmodule defmodule)
           
 java.lang.Object visitDefquery(Defquery d)
           
 java.lang.Object visitDefrule(Defrule d)
           
 java.lang.Object visitDeftemplate(Deftemplate d)
           
 java.lang.Object visitFact(Fact fact)
           
 java.lang.Object visitFuncall(Funcall funcall)
           
 java.lang.Object visitGroup(Group p)
           
 java.lang.Object visitPattern(Pattern p)
           
 java.lang.Object visitTest1(Test1 t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XMLVisitor

public XMLVisitor(Visitable v)
Create an XMLVisitor to render the given Visitable. When toString() is called on this object, it will return an XML version of the argument.

Parameters:
v - a construct or other Visitable to render
See Also:
Visitor
Method Detail

visitDeffacts

public java.lang.Object visitDeffacts(Deffacts d)
Specified by:
visitDeffacts in interface Visitor

visitDeftemplate

public java.lang.Object visitDeftemplate(Deftemplate d)
Specified by:
visitDeftemplate in interface Visitor

visitDeffunction

public java.lang.Object visitDeffunction(Deffunction d)
Specified by:
visitDeffunction in interface Visitor

visitDefglobal

public java.lang.Object visitDefglobal(Defglobal d)
Specified by:
visitDefglobal in interface Visitor

visitDefrule

public java.lang.Object visitDefrule(Defrule d)
Specified by:
visitDefrule in interface Visitor

visitDefquery

public java.lang.Object visitDefquery(Defquery d)
Specified by:
visitDefquery in interface Visitor

visitPattern

public java.lang.Object visitPattern(Pattern p)
Specified by:
visitPattern in interface Visitor

visitGroup

public java.lang.Object visitGroup(Group p)
Specified by:
visitGroup in interface Visitor

visitTest1

public java.lang.Object visitTest1(Test1 t)
Specified by:
visitTest1 in interface Visitor

visitFact

public java.lang.Object visitFact(Fact fact)
Specified by:
visitFact in interface Visitor

visitFuncall

public java.lang.Object visitFuncall(Funcall funcall)
Specified by:
visitFuncall in interface Visitor

visitAccumulate

public java.lang.Object visitAccumulate(Accumulate accumulate)
Specified by:
visitAccumulate in interface Visitor

visitDefmodule

public java.lang.Object visitDefmodule(Defmodule defmodule)
Specified by:
visitDefmodule in interface Visitor

toString

public java.lang.String toString()

© 2007 Sandia Corporation