Class DefaultTransformer

  • All Implemented Interfaces:
    Transformer, org.xml.sax.ContentHandler

    public class DefaultTransformer
    extends java.lang.Object
    implements Transformer
    A generic base transformer which simply delegates all ContentHandler method invocations to the next ContentHandler.
    • Constructor Detail

      • DefaultTransformer

        public DefaultTransformer()
    • Method Detail

      • characters

        public void characters​(char[] ac,
                               int i,
                               int j)
                        throws org.xml.sax.SAXException
        Specified by:
        characters in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • dispose

        public void dispose()
        Description copied from interface: Transformer
        Dispose the transformer. This method is always invoked by the rewriter in order to allow the transformer to release any resources etc. After this method has been called the instance is considered unusable.
        Specified by:
        dispose in interface Transformer
      • endDocument

        public void endDocument()
                         throws org.xml.sax.SAXException
        Specified by:
        endDocument in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • endElement

        public void endElement​(java.lang.String s,
                               java.lang.String s1,
                               java.lang.String s2)
                        throws org.xml.sax.SAXException
        Specified by:
        endElement in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • endPrefixMapping

        public void endPrefixMapping​(java.lang.String s)
                              throws org.xml.sax.SAXException
        Specified by:
        endPrefixMapping in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • ignorableWhitespace

        public void ignorableWhitespace​(char[] ac,
                                        int i,
                                        int j)
                                 throws org.xml.sax.SAXException
        Specified by:
        ignorableWhitespace in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • processingInstruction

        public void processingInstruction​(java.lang.String s,
                                          java.lang.String s1)
                                   throws org.xml.sax.SAXException
        Specified by:
        processingInstruction in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • setContentHandler

        public final void setContentHandler​(org.xml.sax.ContentHandler handler)
        Description copied from interface: Transformer
        Set the content handler the transformer should stream to.
        Specified by:
        setContentHandler in interface Transformer
        Parameters:
        handler - Another transformer or a serializer.
      • setDocumentLocator

        public void setDocumentLocator​(org.xml.sax.Locator locator)
        Specified by:
        setDocumentLocator in interface org.xml.sax.ContentHandler
      • skippedEntity

        public void skippedEntity​(java.lang.String s)
                           throws org.xml.sax.SAXException
        Specified by:
        skippedEntity in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • startDocument

        public void startDocument()
                           throws org.xml.sax.SAXException
        Specified by:
        startDocument in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • startElement

        public void startElement​(java.lang.String s,
                                 java.lang.String s1,
                                 java.lang.String s2,
                                 org.xml.sax.Attributes attributes)
                          throws org.xml.sax.SAXException
        Specified by:
        startElement in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException
      • startPrefixMapping

        public void startPrefixMapping​(java.lang.String s,
                                       java.lang.String s1)
                                throws org.xml.sax.SAXException
        Specified by:
        startPrefixMapping in interface org.xml.sax.ContentHandler
        Throws:
        org.xml.sax.SAXException