jess.xml
Class JessSAXHandler

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended byjess.xml.JessSAXHandler
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class JessSAXHandler
extends org.xml.sax.helpers.DefaultHandler

A SAX parser event handler. SAX events are translated into Jess constructs in a Rete engine.

(C) 2006 Sandia National Laboratories


Field Summary
static java.lang.String FACTLIST
          The top-level element of a JessML fact file.
static java.lang.String RULEBASE
          The top-level element of a regular JessML file.
 
Constructor Summary
JessSAXHandler(Rete sink, java.lang.String topLevelElement)
          Construct a JessSAXHandler that will execute parsed code in the context of the given Rete object.
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
           
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RULEBASE

public static final java.lang.String RULEBASE
The top-level element of a regular JessML file.

See Also:
Constant Field Values

FACTLIST

public static final java.lang.String FACTLIST
The top-level element of a JessML fact file.

See Also:
Constant Field Values
Constructor Detail

JessSAXHandler

public JessSAXHandler(Rete sink,
                      java.lang.String topLevelElement)
Construct a JessSAXHandler that will execute parsed code in the context of the given Rete object.

Parameters:
sink - the Rete object that will serve as an execution context
Method Detail

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
                  throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Throws:
org.xml.sax.SAXException

© 2007 Sandia Corporation