public interface XMLComparatorFilter
extends org.xml.sax.XMLReader
XMLFilter
pipeline'. When a child (or 'downstream') component of
the pipeline requests SAX events to process, this element of the pipeline will request SAX events from it's 2 input branches,
and after comparison processing, pass the resulting SAX events downstream. In this respect it is analogous to an
XMLFilter
, but has 2 parents providing the inputs to the comparison process and produces a single stream of
SAX events as output. Otherwise like an XMLReader
, but with events coming from a pair of XMLReaders instead
of a primary source such as an XMLDocument.Modifier and Type | Method and Description |
---|---|
org.xml.sax.InputSource |
getInput1InputSource()
Gets the InputSource that was set with the corresponding setInput1InputSource method.
|
org.xml.sax.XMLReader |
getInput1Parent()
Gets the parent reader (typically an
XMLReader or XMLFilter ) associated with input 1
of the Comparator. |
org.xml.sax.InputSource |
getInput2InputSource()
Gets the InputSource that was set with the corresponding setInput2InputSource method.
|
org.xml.sax.XMLReader |
getInput2Parent()
Gets the parent reader (typically an
XMLReader or XMLFilter ) associated with input 2
of the Comparator. |
void |
setErrorListener(ErrorListener listener)
Specifies an
ErrorListener to use with the Comparator. |
void |
setInput1InputSource(org.xml.sax.InputSource input1)
Specifies the source of SAX events for input 1 of the Comparator.
|
void |
setInput1Parent(org.xml.sax.XMLReader parent)
Sets the parent XMLReader or XMLFilter associated with input 1 to the Synchronizer.
|
void |
setInput2InputSource(org.xml.sax.InputSource input2)
Specifies the source of SAX events for input 2 of the Comparator.
|
void |
setInput2Parent(org.xml.sax.XMLReader parent)
Sets the parent XMLReader or XMLFilter associated with input 2 to the Synchronizer.
|
org.xml.sax.XMLReader getInput1Parent()
XMLReader
or XMLFilter
) associated with input 1
of the Comparator. It is usually a bad idea to perform any operation on the parent reader directly, they should be invoked on
this filter or indirectly by a (downstream) child of this filter.void setInput1Parent(org.xml.sax.XMLReader parent)
Sets the parent XMLReader or XMLFilter associated with input 1 to the Synchronizer. The parent XMLReader or XMLFilter supplies SAX events, possibly through a filter pipeline.
If this method is not used and no parent is specified then the SAXParserFactory is used to instantiate a suitable XMLReader and that is used to provide SAX events.
Note that setting a parent does not in any way specify any file or other Source
which will be
parsed or otherwise processed, this association is made using the XMLComparatorFilter.setInput1InputSource(InputSource)
method on this
stage in the filter pipeline.
In some ways this methods can be considered analagous to the XMLFilter.setParent(XMLReader)
method of the
XMLFilter
class.
parent
- The parent XMLReaderXMLComparatorFilter.getInput1Parent()
,
XMLFilter.setParent(XMLReader)
org.xml.sax.InputSource getInput1InputSource()
XMLComparatorFilter.setInput1InputSource(InputSource)
void setInput1InputSource(org.xml.sax.InputSource input1)
input1
- The InputSource which provides SAX events for input 1XMLComparatorFilter.setInput2InputSource(InputSource)
,
XMLComparatorFilter.getInput1InputSource()
org.xml.sax.XMLReader getInput2Parent()
XMLReader
or XMLFilter
) associated with input 2
of the Comparator. It is usually a bad idea to perform any operation on the parent reader directly, they should be invoked on
this filter or indirectly by a (downstream) child of this filter.void setInput2Parent(org.xml.sax.XMLReader parent)
Sets the parent XMLReader or XMLFilter associated with input 2 to the Synchronizer. The parent XMLReader or XMLFilter supplies SAX events, possibly through a filter pipeline.
If this method is not used and no parent is specified then the SAXParserFactory is used to instantiate a suitable XMLReader and that is used to provide SAX events.
Note that setting a parent does not in any way specify any file or other Source
which will be
parsed or otherwise processed, this association is made either using the XMLComparatorFilter.setInput1InputSource(InputSource)
method on
this stage in the filter pipeline.
In some ways this methods can be considered analagous to the XMLFilter.setParent(XMLReader)
method of the
XMLFilter
class.
parent
- The parent XMLReaderXMLComparatorFilter.getInput2Parent()
,
XMLFilter.setParent(XMLReader)
org.xml.sax.InputSource getInput2InputSource()
XMLComparatorFilter.setInput2InputSource(InputSource)
void setInput2InputSource(org.xml.sax.InputSource input2)
input2
- The InputSource which provides SAX events for input 2XMLComparatorFilter.setInput1InputSource(InputSource)
,
XMLComparatorFilter.getInput2InputSource()
void setErrorListener(ErrorListener listener)
ErrorListener
to use with the Comparator.listener
- the ErrorListener to use for this XMLComparatorFilterCopyright © 2001-2018 DeltaXML Ltd. All Rights Reserved.