Package com.volantis.mcs.wbdom.dissection.io

Examples of com.volantis.mcs.wbdom.dissection.io.DissectionWBSAXParser


        StringTable stringTable = new StringTable();
        StringReferenceFactory references =
                new StringReferenceFactory(stringTable, strings);
       
        // Handler to parse WBSAX events into dissection WBDOM nodes.
        DissectionWBSAXParser parser =
                new DissectionWBSAXParser(wbdomFactory, conf);
        // SAX handler to consume SAX events, generating WBSAX events
        DissectionTestSAXConsumer consumer = new DissectionTestSAXConsumer(
                parser, elementNames, attrStarts, stringTable, codec, strings);
        // Wrapper for SAX->WBSAX layer to handle the dissection stuff.
        DissectableDocumentBuilder builder =
View Full Code Here


                new TestDissectionConfiguration();
       
        // Handler to parse WBSAX events into WBDOM nodes.
        DissectableWBDOMFactory wbdomFactory =
                new DissectableWBDOMFactory(conf);
        DissectionWBSAXParser parser =
                new DissectionWBSAXParser(wbdomFactory, conf);

        // Register the codes used in the input file
        ElementNameFactory elementNames = new ElementNameFactory();
        elementNames.registerElement(0, "root");
        elementNames.registerElement(1, "p");
View Full Code Here

        // Factory to create dissection WBDOM nodes.
        DissectableWBDOMFactory dissectionFactory =
            new DissectableWBDOMFactory(wmlConfiguration);
        // Handler to parse WBSAX events into WBDOM nodes.
        WBSAXParser parser = new DissectionWBSAXParser(dissectionFactory,
                                                       wmlConfiguration);
        StringWriter out = null;
        try {
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                handler = new WBSAXDisassembler(parser, out);
            } else {
                handler = parser;
            }

            // Plugin optimiser
            optimiser = new URLOptimiser(handler);
            optimiser.setPageContext(getMarinerPageContext());
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                filter = new WBSAXDisassembler(optimiser, out);
            } else {
                filter = optimiser;
            }

            processorContext.setContentHandler(filter);
            wbsaxOutputter.output(document);
        } finally {
            if (logger.isDebugEnabled()) {
                out.flush();
                logger.debug(out);
            }
        }

        try {
            if (logger.isDebugEnabled()) {
                out = new StringWriter();
                handler = new WBSAXDisassembler(producer, out);
            } else {
                handler = producer;
            }
           
            super.writeViaDissection(
                    new WBDOMDissectableDocument(parser.getDocument()),
                    new WBDOMDissectedContentHandler(handler, wmlConfiguration, urlListener));
           
        } finally {
            if (logger.isDebugEnabled()) {
                out.flush();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.wbdom.dissection.io.DissectionWBSAXParser

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.