Package com.deltaxml.pipe
Class XMLPushFilterAdapter
java.lang.Object
com.deltaxml.pipe.XMLPushFilterAdapter
- All Implemented Interfaces:
XMLPushFilter,ContentHandler,DTDHandler,DeclHandler,LexicalHandler
Used to convert an XMLFilter object into an XMLPushFilter object. This enables it to be used logically 'after' the triggered
element in a JAXP pipeline. In the PipelinedComparator, any Java filters to be used as output filters must be compatible with
XMLPushFilter. This class is used for that purpose.
- Author:
- Nigel Whitaker
-
Constructor Summary
ConstructorsConstructorDescriptionXMLPushFilterAdapter(XMLFilterImpl filter) Cannot support LexicalHandler events such as comments. -
Method Summary
Modifier and TypeMethodDescriptionvoidAn implementation of the DeclHandler attributeDecl method.final voidcharacters(char[] ch, int start, int length) An implementation of the ContentHandler characters method.voidcomment(char[] ch, int start, int length) An implementation of the LexicalHandler comment method.voidelementDecl(String name, String model) An implementation of the DeclHandler elementDecl method.voidendCDATA()An implementation of the LexicalHandler endCDATA method.final voidAn implementation of the ContentHandler endDocument method.voidendDTD()An implementation of the LexicalHandler endDTD method.final voidendElement(String uri, String localName, String qName) An implementation of the ContentHandler endElement method.voidAn implementation of the LexicalHandler endEntity method.final voidendPrefixMapping(String prefix) An implementation of the ContentHandler endPrefixMapping method.voidexternalEntityDecl(String name, String publicId, String systemId) An implementation of the DeclHandler externalEntityDecl method.Returns the underlying filter that was used to create this instance.final voidignorableWhitespace(char[] ch, int start, int length) An implementation of the ContentHandler ignorableWhitespace method.voidinternalEntityDecl(String name, String value) An implementation of the DeclHandler internalEntityDecl method.final voidnotationDecl(String name, String publicId, String systemId) An implementation of the DTDHandler notationDecl method.final voidprocessingInstruction(String target, String data) An implementation of the ContentHandler processingInstruction method.final voidsetDocumentLocator(Locator locator) An implementation of the ContentHandler setDocumentLocator method.voidEnables the user to set the Result of the transformation.final voidskippedEntity(String name) An implementation of the ContentHandler skippedEntity method.voidAn implementation of the LexicalHandler startCDATA method.final voidAn implementation of the ContentHandler startDocument method.voidAn implementation of the LexicalHandler startDTD method.final voidstartElement(String uri, String localName, String qName, Attributes atts) An implementation of the ContentHandler startElement method.voidstartEntity(String name) An implementation of the LexicalHandler startEntity method.final voidstartPrefixMapping(String prefix, String uri) An implementation of the ContentHandler startPrefixMapping method.final voidunparsedEntityDecl(String name, String publicId, String systemId, String notationName) An implementation of the DTDHandler unparsedEntityDecl method.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
XMLPushFilterAdapter
Cannot support LexicalHandler events such as comments.- Parameters:
filter- the XMLFilterImpl to use as an XMLPushFilter
-
-
Method Details
-
getUnderlyingFilter
Returns the underlying filter that was used to create this instance.- Returns:
- the underlying XMLFilter implementation
-
setResult
Enables the user to set the Result of the transformation.- Specified by:
setResultin interfaceXMLPushFilter- Parameters:
result- the Result instance to which the output from this filter should be sent- Throws:
IllegalArgumentException- if result is null- See Also:
-
setDocumentLocator
An implementation of the ContentHandler setDocumentLocator method.- Specified by:
setDocumentLocatorin interfaceContentHandler- Parameters:
locator- to pass through to the underlying filter- See Also:
-
startDocument
An implementation of the ContentHandler startDocument method.- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endDocument
An implementation of the ContentHandler endDocument method.- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
startPrefixMapping
An implementation of the ContentHandler startPrefixMapping method.- Specified by:
startPrefixMappingin interfaceContentHandler- Parameters:
prefix- to pass through to the underlying filteruri- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endPrefixMapping
An implementation of the ContentHandler endPrefixMapping method.- Specified by:
endPrefixMappingin interfaceContentHandler- Parameters:
prefix- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
startElement
public final void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException An implementation of the ContentHandler startElement method.- Specified by:
startElementin interfaceContentHandler- Parameters:
uri- to pass through to the underlying filterlocalName- to pass through to the underlying filterqName- to pass through to the underlying filteratts- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endElement
An implementation of the ContentHandler endElement method.- Specified by:
endElementin interfaceContentHandler- Parameters:
uri- to pass through to the underlying filterlocalName- to pass through to the underlying filterqName- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
characters
An implementation of the ContentHandler characters method.- Specified by:
charactersin interfaceContentHandler- Parameters:
ch- to pass through to the underlying filterstart- to pass through to the underlying filterlength- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
ignorableWhitespace
An implementation of the ContentHandler ignorableWhitespace method.- Specified by:
ignorableWhitespacein interfaceContentHandler- Parameters:
ch- to pass through to the underlying filterstart- to pass through to the underlying filterlength- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
processingInstruction
An implementation of the ContentHandler processingInstruction method.- Specified by:
processingInstructionin interfaceContentHandler- Parameters:
target- to pass through to the underlying filterdata- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
skippedEntity
An implementation of the ContentHandler skippedEntity method.- Specified by:
skippedEntityin interfaceContentHandler- Parameters:
name- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
comment
An implementation of the LexicalHandler comment method.- Specified by:
commentin interfaceLexicalHandler- Parameters:
ch- to pass through to the underlying filterstart- to pass through to the underlying filterlength- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
startDTD
An implementation of the LexicalHandler startDTD method.- Specified by:
startDTDin interfaceLexicalHandler- Parameters:
name- to pass through to the underlying filterpublicId- to pass through to the underlying filtersystemId- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endDTD
An implementation of the LexicalHandler endDTD method.- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
startEntity
An implementation of the LexicalHandler startEntity method.- Specified by:
startEntityin interfaceLexicalHandler- Parameters:
name- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endEntity
An implementation of the LexicalHandler endEntity method.- Specified by:
endEntityin interfaceLexicalHandler- Parameters:
name- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
startCDATA
An implementation of the LexicalHandler startCDATA method.- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
endCDATA
An implementation of the LexicalHandler endCDATA method.- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
notationDecl
An implementation of the DTDHandler notationDecl method.- Specified by:
notationDeclin interfaceDTDHandler- Parameters:
name- to pass through to the underlying filterpublicId- to pass through to the underlying filtersystemId- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
unparsedEntityDecl
public final void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException An implementation of the DTDHandler unparsedEntityDecl method.- Specified by:
unparsedEntityDeclin interfaceDTDHandler- Parameters:
name- to pass through to the underlying filterpublicId- to pass through to the underlying filtersystemId- to pass through to the underlying filternotationName- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
attributeDecl
public void attributeDecl(String eName, String aName, String type, String mode, String value) throws SAXException An implementation of the DeclHandler attributeDecl method.- Specified by:
attributeDeclin interfaceDeclHandler- Parameters:
eName- to pass through to the underlying filteraName- to pass through to the underlying filtertype- to pass through to the underlying filtermode- to pass through to the underlying filtervalue- to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
elementDecl
An implementation of the DeclHandler elementDecl method.- Specified by:
elementDeclin interfaceDeclHandler- Parameters:
name- the name to pass through to the underlying filtermodel- the model to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
externalEntityDecl
An implementation of the DeclHandler externalEntityDecl method.- Specified by:
externalEntityDeclin interfaceDeclHandler- Parameters:
name- the name to pass through to the underlying filterpublicId- the publicId to pass through to the underlying filtersystemId- the systemId to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-
internalEntityDecl
An implementation of the DeclHandler internalEntityDecl method.- Specified by:
internalEntityDeclin interfaceDeclHandler- Parameters:
name- the name to pass through to the underlying filtervalue- the value to pass through to the underlying filter- Throws:
SAXException- if the underlying filter throws a SAXException- See Also:
-