org.opennms.bb.dp.events
Class XMLEventsParser

java.lang.Object
  |
  +--org.opennms.bb.dp.events.XMLEventsParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler
Direct Known Subclasses:
XMLEventsOverrideParser

public class XMLEventsParser
extends Object
implements org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler

The XMLEventsParser is a SAX based parser used to decompose an event stream into the corresponding event classes. The class provides realitivly strong structure checking, but does not require and/or parse an DTD that may proceed the data. This allows the parser to be used with a SAX based SOAP parser, since SOAP prohibits the used of DTDs.

Version:
$Revision: 1.7 $
Author:
Sowmya Kumaraswamy, Brian Weaver, OpenNMS.org

Field Summary
private  org.xml.sax.Attributes m_attributes
          The last attributes elements passed to the startElement() method.
private  StringBuffer m_data
          The buffer where subsequent textual information from the character() method are appendedd.
private  int m_depth
          The current depth of the elements in the document and the TOS for the m_save member.
private  Event m_event
          The event being currently processes
private  List m_events
          The list of events from the stream
private  EventHeader m_header
          The header recovered from the event stream
private  EventParameter m_parm
          An event parameter, valid between <parm>...</parm>
private  int[] m_save
          The save buffer stack.
private  EventSnmpInfo m_snmpInfo
          An snmp information block.
private static int SAVE_AUTOACTION
           
private static int SAVE_DESCR
           
private static int SAVE_EVENT
           
private static int SAVE_EVENTS
           
private static int SAVE_FORWARD
           
private static int SAVE_HDR_CREATED
           
private static int SAVE_HDR_DPNAME
           
private static int SAVE_HDR_MSTATION
           
private static int SAVE_HDR_VERSION
           
private static int SAVE_HEADER
           
private static int SAVE_HOST
           
private static int SAVE_IGNORE
           
private static int SAVE_INTERFACE
           
private static int SAVE_LOG
           
private static int SAVE_LOGGROUP
           
private static int SAVE_LOGMSG
           
private static int SAVE_MOUSEOVERTEXT
           
private static int SAVE_NODEID
           
private static int SAVE_NOTIFICATION
           
private static int SAVE_OPERACTION
           
private static int SAVE_OPERINSTRUCT
           
private static int SAVE_PARM
           
private static int SAVE_PARM_NAME
           
private static int SAVE_PARM_VALUE
           
private static int SAVE_PARMS
           
private static int SAVE_SERVICE
           
private static int SAVE_SEVERITY
           
private static int SAVE_SNMP
           
private static int SAVE_SNMP_EID
           
private static int SAVE_SNMP_EIDTEXT
           
private static int SAVE_SNMP_GENERIC
           
private static int SAVE_SNMP_SPECIFIC
           
private static int SAVE_SNMPHOST
           
private static int SAVE_SOURCE
           
private static int SAVE_TIME
           
private static int SAVE_TTICKET
           
private static int SAVE_UEI
           
(package private) static String TAG_AUTOACTION
           
(package private) static String TAG_CREATED
           
(package private) static String TAG_DESCR
           
(package private) static String TAG_DPNAME
           
(package private) static String TAG_EID
           
(package private) static String TAG_EIDTEXT
           
(package private) static String TAG_ENCODING
           
(package private) static String TAG_ENCODING_ATTR_BASE64
           
(package private) static String TAG_ENCODING_ATTR_TEXT
           
(package private) static String TAG_EVENT
           
(package private) static String TAG_EVENTS
           
(package private) static String TAG_FORWARD
           
(package private) static String TAG_GENERIC
           
(package private) static String TAG_HEADER
           
(package private) static String TAG_HOST
           
(package private) static String TAG_INTERFACE
           
(package private) static String TAG_LOG
           
(package private) static String TAG_LOGGROUP
           
(package private) static String TAG_LOGMSG
           
(package private) static String TAG_LOGMSGDEST
           
(package private) static String TAG_LOGMSGDEST_ATTR_LOGNDISPLAY
           
(package private) static String TAG_LOGMSGDEST_ATTR_LOGONLY
           
(package private) static String TAG_LOGMSGDEST_ATTR_SUPPRESS
           
(package private) static String TAG_MECHANISM
           
(package private) static String TAG_MECHANISM_ATTR_SNMPTCP
           
(package private) static String TAG_MECHANISM_ATTR_SNMPUDP
           
(package private) static String TAG_MECHANISM_ATTR_XMLTCP
           
(package private) static String TAG_MECHANISM_ATTR_XMLUDP
           
(package private) static String TAG_MOUSEOVERTEXT
           
(package private) static String TAG_MSTATION
           
(package private) static String TAG_NODEID
           
(package private) static String TAG_NOTIFICATION
           
(package private) static String TAG_OPERACTION
           
(package private) static String TAG_OPERACTIONMENU
           
(package private) static String TAG_OPERINSTR
           
(package private) static String TAG_PARM
           
(package private) static String TAG_PARM_NAME
           
(package private) static String TAG_PARM_VALUE
           
(package private) static String TAG_PARMS
           
(package private) static String TAG_SERVICE
           
(package private) static String TAG_SEVERITY
           
(package private) static String TAG_SNMP
           
(package private) static String TAG_SNMPHOST
           
(package private) static String TAG_SOURCE
           
(package private) static String TAG_SPECIFIC
           
(package private) static String TAG_STATE
           
(package private) static String TAG_STATE_ATTR_OFF
           
(package private) static String TAG_STATE_ATTR_ON
           
(package private) static String TAG_TIME
           
(package private) static String TAG_TIME_ATTR_DAY
           
(package private) static String TAG_TIME_ATTR_HOUR
           
(package private) static String TAG_TIME_ATTR_MIN
           
(package private) static String TAG_TIME_ATTR_MONTH
           
(package private) static String TAG_TIME_ATTR_SEC
           
(package private) static String TAG_TIME_ATTR_YEAR
           
(package private) static String TAG_TTICKET
           
(package private) static String TAG_TYPE
           
(package private) static String TAG_TYPE_ATTR_INT
           
(package private) static String TAG_TYPE_ATTR_SNMP_COUNTER32
           
(package private) static String TAG_TYPE_ATTR_SNMP_COUNTER64
           
(package private) static String TAG_TYPE_ATTR_SNMP_GAUGE32
           
(package private) static String TAG_TYPE_ATTR_SNMP_INT32
           
(package private) static String TAG_TYPE_ATTR_SNMP_IPADDR
           
(package private) static String TAG_TYPE_ATTR_SNMP_NULL
           
(package private) static String TAG_TYPE_ATTR_SNMP_OBJECTID
           
(package private) static String TAG_TYPE_ATTR_SNMP_OCTETSTR
           
(package private) static String TAG_TYPE_ATTR_SNMP_OPAQUE
           
(package private) static String TAG_TYPE_ATTR_SNMP_TIMETICKS
           
(package private) static String TAG_TYPE_ATTR_STRING
           
(package private) static String TAG_UEI
           
(package private) static String TAG_VER
           
 
Constructor Summary
XMLEventsParser()
          Constructs a new default instance of the parser that can be registered with a SAXParser.
 
Method Summary
 void characters(char[] data, int offset, int length)
          Store the characters of the current element in the current element value buffer
(package private) static void dataElement(PrintStream ps, String tag, org.xml.sax.Attributes attrs, String value)
          Prints out a data element into the print stream.
private  int depthOf(int token)
          Returns the depth of a particular SAVE_??? tag.
 void endDocument()
          Called when the end of the document is reached.
(package private) static void endElement(PrintStream ps, String tag)
          Prints out the closing element.
 void endElement(String uri, String localName, String qName)
          At the end of the element store the current element buffer value to the appropriate buffer.
 void endPrefixMapping(String prefix)
          Ends a prefix to URI mapping.
 void error(org.xml.sax.SAXParseException ex)
          Throw an exception if there is an error during parse
 void fatalError(org.xml.sax.SAXParseException ex)
          Throw an exception if there is a fatal error during parse
 List getEvents()
          Return the events in the stream
 EventHeader getHeader()
          Returns the header from the event stream
 void ignorableWhitespace(char[] data, int offset, int length)
          Ignore the whitespaces
static void main(String[] args)
          used for debugging
 void processingInstruction(String target, String data)
          Receives processing instructions
static void serializeToXML(OutputStream out, EventHeader hdr, List events)
          Generates a document confomant to this parser from the passed events.
static void serializeToXML(OutputStream out, List events)
          Generates a document confomant to this parser from the passed events.
static void serializeToXML(PrintStream out, EventHeader hdr, List events)
          Generates a document confomant to this parser from the passed events.
static void serializeToXML(PrintStream out, List events)
          Generates a document confomant to this parser from the passed events.
 void setDocumentLocator(org.xml.sax.Locator loc)
          Sets the document locator.
 void skippedEntity(String name)
          Recieves notification of a skipped entity.
 void startDocument()
          Called when the document parsing is beginning.
(package private) static void startElement(PrintStream ps, String tag, org.xml.sax.Attributes attrs)
          Prints out a start xml tag with the passed attributes
 void startElement(String uri, String localName, String qName, org.xml.sax.Attributes attrs)
          Called when a new element is encountered in the document.
 void startPrefixMapping(String prefix, String uri)
          Starts a prefix to URI mapping.
protected  boolean validate(Event e)
          Used to validate the event before it is placed onto the actual list of events.
 void warning(org.xml.sax.SAXParseException ex)
          Throw an exception if there is a warning during parse
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

TAG_LOG

static final String TAG_LOG

TAG_HEADER

static final String TAG_HEADER

TAG_VER

static final String TAG_VER

TAG_DPNAME

static final String TAG_DPNAME

TAG_CREATED

static final String TAG_CREATED

TAG_MSTATION

static final String TAG_MSTATION

TAG_EVENTS

static final String TAG_EVENTS

TAG_EVENT

static final String TAG_EVENT

TAG_UEI

static final String TAG_UEI

TAG_SOURCE

static final String TAG_SOURCE

TAG_TIME

static final String TAG_TIME

TAG_TIME_ATTR_YEAR

static final String TAG_TIME_ATTR_YEAR

TAG_TIME_ATTR_MONTH

static final String TAG_TIME_ATTR_MONTH

TAG_TIME_ATTR_DAY

static final String TAG_TIME_ATTR_DAY

TAG_TIME_ATTR_HOUR

static final String TAG_TIME_ATTR_HOUR

TAG_TIME_ATTR_MIN

static final String TAG_TIME_ATTR_MIN

TAG_TIME_ATTR_SEC

static final String TAG_TIME_ATTR_SEC

TAG_TYPE

static final String TAG_TYPE

TAG_TYPE_ATTR_INT

static final String TAG_TYPE_ATTR_INT

TAG_TYPE_ATTR_STRING

static final String TAG_TYPE_ATTR_STRING

TAG_TYPE_ATTR_SNMP_INT32

static final String TAG_TYPE_ATTR_SNMP_INT32

TAG_TYPE_ATTR_SNMP_OCTETSTR

static final String TAG_TYPE_ATTR_SNMP_OCTETSTR

TAG_TYPE_ATTR_SNMP_NULL

static final String TAG_TYPE_ATTR_SNMP_NULL

TAG_TYPE_ATTR_SNMP_OBJECTID

static final String TAG_TYPE_ATTR_SNMP_OBJECTID

TAG_TYPE_ATTR_SNMP_IPADDR

static final String TAG_TYPE_ATTR_SNMP_IPADDR

TAG_TYPE_ATTR_SNMP_COUNTER32

static final String TAG_TYPE_ATTR_SNMP_COUNTER32

TAG_TYPE_ATTR_SNMP_GAUGE32

static final String TAG_TYPE_ATTR_SNMP_GAUGE32

TAG_TYPE_ATTR_SNMP_TIMETICKS

static final String TAG_TYPE_ATTR_SNMP_TIMETICKS

TAG_TYPE_ATTR_SNMP_OPAQUE

static final String TAG_TYPE_ATTR_SNMP_OPAQUE

TAG_TYPE_ATTR_SNMP_COUNTER64

static final String TAG_TYPE_ATTR_SNMP_COUNTER64

TAG_HOST

static final String TAG_HOST

TAG_SNMPHOST

static final String TAG_SNMPHOST

TAG_NODEID

static final String TAG_NODEID

TAG_SERVICE

static final String TAG_SERVICE

TAG_INTERFACE

static final String TAG_INTERFACE

TAG_SNMP

static final String TAG_SNMP

TAG_EID

static final String TAG_EID

TAG_EIDTEXT

static final String TAG_EIDTEXT

TAG_SPECIFIC

static final String TAG_SPECIFIC

TAG_GENERIC

static final String TAG_GENERIC

TAG_PARMS

static final String TAG_PARMS

TAG_PARM

static final String TAG_PARM

TAG_PARM_NAME

static final String TAG_PARM_NAME

TAG_PARM_VALUE

static final String TAG_PARM_VALUE

TAG_ENCODING

static final String TAG_ENCODING

TAG_ENCODING_ATTR_TEXT

static final String TAG_ENCODING_ATTR_TEXT

TAG_ENCODING_ATTR_BASE64

static final String TAG_ENCODING_ATTR_BASE64

TAG_DESCR

static final String TAG_DESCR

TAG_LOGMSG

static final String TAG_LOGMSG

TAG_LOGMSGDEST

static final String TAG_LOGMSGDEST

TAG_LOGMSGDEST_ATTR_SUPPRESS

static final String TAG_LOGMSGDEST_ATTR_SUPPRESS

TAG_LOGMSGDEST_ATTR_LOGONLY

static final String TAG_LOGMSGDEST_ATTR_LOGONLY

TAG_LOGMSGDEST_ATTR_LOGNDISPLAY

static final String TAG_LOGMSGDEST_ATTR_LOGNDISPLAY

TAG_SEVERITY

static final String TAG_SEVERITY

TAG_OPERINSTR

static final String TAG_OPERINSTR

TAG_AUTOACTION

static final String TAG_AUTOACTION

TAG_OPERACTION

static final String TAG_OPERACTION

TAG_OPERACTIONMENU

static final String TAG_OPERACTIONMENU

TAG_LOGGROUP

static final String TAG_LOGGROUP

TAG_NOTIFICATION

static final String TAG_NOTIFICATION

TAG_TTICKET

static final String TAG_TTICKET

TAG_STATE

static final String TAG_STATE

TAG_STATE_ATTR_ON

static final String TAG_STATE_ATTR_ON

TAG_STATE_ATTR_OFF

static final String TAG_STATE_ATTR_OFF

TAG_FORWARD

static final String TAG_FORWARD

TAG_MECHANISM

static final String TAG_MECHANISM

TAG_MECHANISM_ATTR_SNMPUDP

static final String TAG_MECHANISM_ATTR_SNMPUDP

TAG_MECHANISM_ATTR_SNMPTCP

static final String TAG_MECHANISM_ATTR_SNMPTCP

TAG_MECHANISM_ATTR_XMLUDP

static final String TAG_MECHANISM_ATTR_XMLUDP

TAG_MECHANISM_ATTR_XMLTCP

static final String TAG_MECHANISM_ATTR_XMLTCP

TAG_MOUSEOVERTEXT

static final String TAG_MOUSEOVERTEXT

SAVE_IGNORE

private static final int SAVE_IGNORE

SAVE_LOG

private static final int SAVE_LOG

SAVE_HEADER

private static final int SAVE_HEADER

SAVE_HDR_VERSION

private static final int SAVE_HDR_VERSION

SAVE_HDR_DPNAME

private static final int SAVE_HDR_DPNAME

SAVE_HDR_CREATED

private static final int SAVE_HDR_CREATED

SAVE_HDR_MSTATION

private static final int SAVE_HDR_MSTATION

SAVE_EVENTS

private static final int SAVE_EVENTS

SAVE_EVENT

private static final int SAVE_EVENT

SAVE_UEI

private static final int SAVE_UEI

SAVE_SOURCE

private static final int SAVE_SOURCE

SAVE_TIME

private static final int SAVE_TIME

SAVE_HOST

private static final int SAVE_HOST

SAVE_SNMPHOST

private static final int SAVE_SNMPHOST

SAVE_SNMP

private static final int SAVE_SNMP

SAVE_SNMP_EID

private static final int SAVE_SNMP_EID

SAVE_SNMP_EIDTEXT

private static final int SAVE_SNMP_EIDTEXT

SAVE_SNMP_SPECIFIC

private static final int SAVE_SNMP_SPECIFIC

SAVE_SNMP_GENERIC

private static final int SAVE_SNMP_GENERIC

SAVE_PARMS

private static final int SAVE_PARMS

SAVE_PARM

private static final int SAVE_PARM

SAVE_PARM_NAME

private static final int SAVE_PARM_NAME

SAVE_PARM_VALUE

private static final int SAVE_PARM_VALUE

SAVE_DESCR

private static final int SAVE_DESCR

SAVE_LOGMSG

private static final int SAVE_LOGMSG

SAVE_SEVERITY

private static final int SAVE_SEVERITY

SAVE_OPERINSTRUCT

private static final int SAVE_OPERINSTRUCT

SAVE_AUTOACTION

private static final int SAVE_AUTOACTION

SAVE_OPERACTION

private static final int SAVE_OPERACTION

SAVE_LOGGROUP

private static final int SAVE_LOGGROUP

SAVE_NOTIFICATION

private static final int SAVE_NOTIFICATION

SAVE_TTICKET

private static final int SAVE_TTICKET

SAVE_FORWARD

private static final int SAVE_FORWARD

SAVE_MOUSEOVERTEXT

private static final int SAVE_MOUSEOVERTEXT

SAVE_NODEID

private static final int SAVE_NODEID

SAVE_SERVICE

private static final int SAVE_SERVICE

SAVE_INTERFACE

private static final int SAVE_INTERFACE

m_data

private StringBuffer m_data
The buffer where subsequent textual information from the character() method are appendedd. This is normally cleared after each call to endElement. If an element will contain both textual information and sub-elements then this should be modified to behave like a stack.

m_save

private int[] m_save
The save buffer stack. The m_depth member is used to as the TOS pointer for accesing the save states.

m_depth

private int m_depth
The current depth of the elements in the document and the TOS for the m_save member.

m_header

private EventHeader m_header
The header recovered from the event stream

m_events

private List m_events
The list of events from the stream

m_event

private Event m_event
The event being currently processes

m_parm

private EventParameter m_parm
An event parameter, valid between <parm>...</parm>

m_snmpInfo

private EventSnmpInfo m_snmpInfo
An snmp information block. This is valid between <snmp>...</snmp>

m_attributes

private org.xml.sax.Attributes m_attributes
The last attributes elements passed to the startElement() method. If Attributes are need for post processing, but the element to be post processed has subelements, then a stack based approach MUST be used!
Constructor Detail

XMLEventsParser

public XMLEventsParser()
Constructs a new default instance of the parser that can be registered with a SAXParser.
Method Detail

depthOf

private int depthOf(int token)
Returns the depth of a particular SAVE_??? tag.
Parameters:
token - The tag to return depth information from.
Returns:
The depth of the tag.

validate

protected boolean validate(Event e)

Used to validate the event before it is placed onto the actual list of events. If the method returns true then the event is added to the list. If the method returns false then it is not added to the list.

Additionally, the method is able to modify the values contained in the event if necessary, prior to the event being added to the list of events. Care should be used by all derived classes that implement this behavior.

Parameters:
e - The event to validate
Returns:
True if the event is valid, false if it should be discarded by the parser.

startElement

static void startElement(PrintStream ps,
                         String tag,
                         org.xml.sax.Attributes attrs)
Prints out a start xml tag with the passed attributes
Parameters:
ps - The output stream
tag - The start tag.
attrs - The attributes, if any.

endElement

static void endElement(PrintStream ps,
                       String tag)
Prints out the closing element.
Parameters:
ps - The output stream
tag - The closing tag.

dataElement

static void dataElement(PrintStream ps,
                        String tag,
                        org.xml.sax.Attributes attrs,
                        String value)
Prints out a data element into the print stream.
Parameters:
ps - The output stream
tag - The start tag.
attrs - The attributes, if any.
value - The value string.

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator loc)
Sets the document locator.
Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler
Parameters:
loc - The document locator.

startDocument

public void startDocument()
                   throws org.xml.sax.SAXException
Called when the document parsing is beginning.
Specified by:
startDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - Thrown if an error occurs processing the start of the document.

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Called when the end of the document is reached.
Specified by:
endDocument in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - Thrown if an error occurs validating the document semantics.

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         org.xml.sax.Attributes attrs)
                  throws org.xml.sax.SAXException
Called when a new element is encountered in the document.
Specified by:
startElement in interface org.xml.sax.ContentHandler
Parameters:
uri - The namespace of the element.
localName - The unqualified name of the element.
qName - The qualified name of the element.
attrs - The attributes for the element.
Throws:
org.xml.sax.SAXException - Thrown if an error occurs processing the element.

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
                throws org.xml.sax.SAXException
At the end of the element store the current element buffer value to the appropriate buffer. Reset all the buffers at the end of each event
Specified by:
endElement in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - Thrown if there is an error during parse

characters

public void characters(char[] data,
                       int offset,
                       int length)
                throws org.xml.sax.SAXException
Store the characters of the current element in the current element value buffer
Specified by:
characters in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - if there is an error during parse

ignorableWhitespace

public void ignorableWhitespace(char[] data,
                                int offset,
                                int length)
                         throws org.xml.sax.SAXException
Ignore the whitespaces
Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler
Throws:
org.xml.sax.SAXException - if there is an error during parse

processingInstruction

public void processingInstruction(String target,
                                  String data)
                           throws org.xml.sax.SAXException
Receives processing instructions
Specified by:
processingInstruction in interface org.xml.sax.ContentHandler
Parameters:
target - The target of the processing instruction.
data - The processing data.
Throws:
org.xml.sax.SAXException - Thrown if an an error occurs during processing

skippedEntity

public void skippedEntity(String name)
                   throws org.xml.sax.SAXException
Recieves notification of a skipped entity.
Specified by:
skippedEntity in interface org.xml.sax.ContentHandler
Parameters:
name - The name of the skipped entity.
Throws:
org.xml.sax.SAXException - Thrown if an an error occurs during processing

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws org.xml.sax.SAXException
Starts a prefix to URI mapping.
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - The prefix.
uri - The namespace mapping.
Throws:
org.xml.sax.SAXException - Thrown if an an error occurs during processing

endPrefixMapping

public void endPrefixMapping(String prefix)
                      throws org.xml.sax.SAXException
Ends a prefix to URI mapping.
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler
Parameters:
prefix - The prefix that is ending
Throws:
org.xml.sax.SAXException - Thrown if an an error occurs during processing

warning

public void warning(org.xml.sax.SAXParseException ex)
             throws org.xml.sax.SAXException
Throw an exception if there is a warning during parse
Specified by:
warning in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException - if there is an error during parse

error

public void error(org.xml.sax.SAXParseException ex)
           throws org.xml.sax.SAXException
Throw an exception if there is an error during parse
Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException - if there is an error during parse

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Throw an exception if there is a fatal error during parse
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException - if there is an error during parse

getHeader

public EventHeader getHeader()
Returns the header from the event stream
Returns:
The event header.

getEvents

public List getEvents()
Return the events in the stream
Returns:
the events in the stream

serializeToXML

public static void serializeToXML(OutputStream out,
                                  EventHeader hdr,
                                  List events)
Generates a document confomant to this parser from the passed events.
Parameters:
out - The output stream
hdr - The header for this document
events - The list of events to be written.

serializeToXML

public static void serializeToXML(PrintStream out,
                                  EventHeader hdr,
                                  List events)
Generates a document confomant to this parser from the passed events.
Parameters:
out - The output stream
hdr - The header for the document
events - The list of events to be written.

serializeToXML

public static void serializeToXML(OutputStream out,
                                  List events)
Generates a document confomant to this parser from the passed events.
Parameters:
out - The output stream
events - The list of events to be written.

serializeToXML

public static void serializeToXML(PrintStream out,
                                  List events)
Generates a document confomant to this parser from the passed events.
Parameters:
out - The output stream
events - The list of events to be written.

main

public static void main(String[] args)
used for debugging