sigmlstream.xml

## Class XMLUnitReader

- java.lang.Object
- - sigmlstream.xml.XMLUnitReader

- All Implemented Interfaces:
    org.xml.sax.XMLReader

      public class XMLUnitReader
      extends java.lang.Object
      implements org.xml.sax.XMLReader

  A non-standard SAX XML reader implementation that uses a suitable sequence of `XMLUnitEvent`s as its source, rather than using a conventional SAX `InputSource`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLUnitReader(org.xml.sax.InputSource fixsrc, java.util.ArrayList<XMLUnitEvent> events)` Constructs a new XML unit reader, using the given sequence of events as its source, and using the given dummy input source to validate the reader's client on subsequent `parse(InputSource)` calls.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.xml.sax.ContentHandler` | `getContentHandler()` Returns this parser's content handler.
    `org.xml.sax.DTDHandler` | `getDTDHandler()` Returns this parser's DTD handler.
    `org.xml.sax.EntityResolver` | `getEntityResolver()` Returns this parser's entity resolver.
    `org.xml.sax.ErrorHandler` | `getErrorHandler()` Returns this parser's error handler.
    `boolean` | `getFeature(java.lang.String name)` Returns `false` indicating that this parser does not implement the given feature.
    `java.lang.Object` | `getProperty(java.lang.String name)` Returns a `null` value for the given property.
    `void` | `parse(org.xml.sax.InputSource input)` Generates the sequence of parse events for this parser's source, providing the given dummy source argument matches that supplied when this parser was constructed.
    `void` | `parse(java.lang.String systemid)` Throws a SAX exception, since this non-standard parser does not process a conventional SAX source indentified by System ID.
    `void` | `setContentHandler(org.xml.sax.ContentHandler chdlr)` Sets this parser's content handler to that given.
    `void` | `setDTDHandler(org.xml.sax.DTDHandler dhdlr)` Null DTD handler setter for this parser.
    `void` | `setEntityResolver(org.xml.sax.EntityResolver erslvr)` Null entity resolver setter for this parser.
    `void` | `setErrorHandler(org.xml.sax.ErrorHandler ehdlr)` Sets this parser's error handler to that given.
    `void` | `setFeature(java.lang.String name, boolean feature)` Null feature setter for this parser.
    `void` | `setProperty(java.lang.String name, java.lang.Object property)` Null property setter for this parser.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XMLUnitReader

          public XMLUnitReader(org.xml.sax.InputSource fixsrc,
                               java.util.ArrayList<XMLUnitEvent> events)

      Constructs a new XML unit reader, using the given sequence of events as its source, and using the given dummy input source to validate the reader's client on subsequent `parse(InputSource)` calls.

  - ### Method Detail

    - #### parse

          public void parse(org.xml.sax.InputSource input)
                     throws org.xml.sax.SAXException

      Generates the sequence of parse events for this parser's source, providing the given dummy source argument matches that supplied when this parser was constructed.
      Specified by:
        `parse` in interface `org.xml.sax.XMLReader`
      Throws:
        `org.xml.sax.SAXException`

    - #### parse

          public void parse(java.lang.String systemid)
                     throws org.xml.sax.SAXException

      Throws a SAX exception, since this non-standard parser does not process a conventional SAX source indentified by System ID.
      Specified by:
        `parse` in interface `org.xml.sax.XMLReader`
      Throws:
        `org.xml.sax.SAXException`

    - #### getContentHandler

          public org.xml.sax.ContentHandler getContentHandler()

      Returns this parser's content handler.
      Specified by:
        `getContentHandler` in interface `org.xml.sax.XMLReader`

    - #### getDTDHandler

          public org.xml.sax.DTDHandler getDTDHandler()

      Returns this parser's DTD handler.
      Specified by:
        `getDTDHandler` in interface `org.xml.sax.XMLReader`

    - #### getEntityResolver

          public org.xml.sax.EntityResolver getEntityResolver()

      Returns this parser's entity resolver.
      Specified by:
        `getEntityResolver` in interface `org.xml.sax.XMLReader`

    - #### getErrorHandler

          public org.xml.sax.ErrorHandler getErrorHandler()

      Returns this parser's error handler.
      Specified by:
        `getErrorHandler` in interface `org.xml.sax.XMLReader`

    - #### getFeature

          public boolean getFeature(java.lang.String name)

      Returns `false` indicating that this parser does not implement the given feature.
      Specified by:
        `getFeature` in interface `org.xml.sax.XMLReader`

    - #### getProperty

          public java.lang.Object getProperty(java.lang.String name)

      Returns a `null` value for the given property.
      Specified by:
        `getProperty` in interface `org.xml.sax.XMLReader`

    - #### setContentHandler

          public void setContentHandler(org.xml.sax.ContentHandler chdlr)

      Sets this parser's content handler to that given.
      Specified by:
        `setContentHandler` in interface `org.xml.sax.XMLReader`

    - #### setDTDHandler

          public void setDTDHandler(org.xml.sax.DTDHandler dhdlr)

      Null DTD handler setter for this parser.
      Specified by:
        `setDTDHandler` in interface `org.xml.sax.XMLReader`

    - #### setEntityResolver

          public void setEntityResolver(org.xml.sax.EntityResolver erslvr)

      Null entity resolver setter for this parser.
      Specified by:
        `setEntityResolver` in interface `org.xml.sax.XMLReader`

    - #### setErrorHandler

          public void setErrorHandler(org.xml.sax.ErrorHandler ehdlr)

      Sets this parser's error handler to that given.
      Specified by:
        `setErrorHandler` in interface `org.xml.sax.XMLReader`

    - #### setFeature

          public void setFeature(java.lang.String name,
                                 boolean feature)

      Null feature setter for this parser.
      Specified by:
        `setFeature` in interface `org.xml.sax.XMLReader`

    - #### setProperty

          public void setProperty(java.lang.String name,
                                  java.lang.Object property)

      Null property setter for this parser.
      Specified by:
        `setProperty` in interface `org.xml.sax.XMLReader`