Package com.volantis.xml.pipeline.sax

Examples of com.volantis.xml.pipeline.sax.XMLPipeline


     * not at the head of the pipeline
     * @throws Exception if an error occurs
     */    
    public void testEndElementWithWrongProcess() throws Exception {
        // retrieve the pipeline
        XMLPipeline pipeline = dynamicProcess.getPipeline();
        // add the process to the head of the pipeline       
        pipeline.addHeadProcess(adapterProcess);       
       
        // create an expanded name       
        ExpandedName eName = new ImmutableExpandedName("testNamespace",
                                                       "testLocalName");
       
View Full Code Here


     * the stack, but cache with those attributes does not exist.
     */
    public void testAttributesOK() throws Exception {

        DynamicElementRule rule = new CacheBodyRule();
        XMLPipeline pipeline = new XMLPipelineProcessImpl(contextMock);

        final String cacheName = "cache406";
        final String cacheKeyValue = "cacheKey406";

        //Create and set attributes for CacheProperties instance
View Full Code Here

        IncludeSrvResRequest request = new IncludeSrvResRequest();
        request.setExpectedURI("/testcase?param1=value1");
        context.setProperty(ServletRequest.class, request, false);
        context.setProperty(ServletResponse.class,
                new HttpServletResponseStub(), false);
        XMLPipeline pipeline = factory.createPipeline(context);
        process.setPipeline(pipeline);
        process.doIncludeServerResource();
       
    }
View Full Code Here

        IncludeSrvResRequest request = new IncludeSrvResRequest();
        request.setExpectedURI("/testcase?param1=value1");
        context.setProperty(ServletRequest.class, request, false);
        context.setProperty(ServletResponse.class,
                new HttpServletResponseStub(), false);
        XMLPipeline pipeline = factory.createPipeline(context);       
        process.setPipeline(pipeline);
        process.doIncludeServerResource();
   
    }
View Full Code Here

        request.setAttribute("javax.servlet.include.request_uri","/parent");
        request.setExpectedURI("/parent/../testcase?param1=value1");
        context.setProperty(ServletRequest.class, request, false);
        context.setProperty(ServletResponse.class,
                new HttpServletResponseStub(), false);
        XMLPipeline pipeline = factory.createPipeline(context);       
        process.setPipeline(pipeline);
        process.doIncludeServerResource();
    }
View Full Code Here

        // to ensure that the parsed document enters a pipeline so that
        // it is processed correctly.
        XMLPipelineFactory factory = context.getPipelineFactory();

        // create a new pipeline.
        XMLPipeline pipeline = factory.createDynamicPipeline(context);

        XMLProcess cup = factory.createContextUpdatingProcess();
        cup.setPipeline(target.getPipeline());
        XMLProcess pipelineProcess = pipeline.getPipelineProcess();
        cup.setNextProcess(pipelineProcess);

        // set up the XMLReader so that the inclusion can be read.
        XMLReader reader = createXMLReader();
        reader.setErrorHandler(cup);
View Full Code Here

        XMLPipelineContext context = factory.createPipelineContext(
                pipelineConfiguration,
                interaction);

        // create a pipeline
        XMLPipeline pipeline = factory.createDynamicPipeline(context);
       
        // create a dynamic process
        dynamicProcess = factory.createDynamicProcess(
                new SimpleDynamicProcessConfiguration());
               
View Full Code Here

        ExpandedName eName = new ImmutableExpandedName("testNamespace",
                                                       "testLocalName");

        Attributes atts = createStartElementAttributes();

        XMLPipeline pipeline = dynamicProcess.getPipeline();                      
           
        // invoke startElement on the rule
        Object returned = rule.startElement(dynamicProcess, eName, atts);

        // ask the rule to create a process
        XMLProcess process = rule.createProcess(dynamicProcess,
                                                eName,
                                                createStartElementAttributes());

        // ensure the process was added to the pipeline is the same type as
        // the one that the rule creates
        assertSame("Process was not added to the pipeline",
                   process.getClass(),
                   pipeline.getHeadProcess().getClass());

    }
View Full Code Here

     * Tests the {@link AbstractAddProcessRule#endElement} method
     * @throws Exception if an error occurs
     */
    public void testEndElement() throws Exception {
        // retrieve the pipeline
        XMLPipeline pipeline = dynamicProcess.getPipeline();

        // create an expanded name
        ExpandedName eName = new ImmutableExpandedName("testNamespace",
                                                       "testLocalName");

        // ask the rule to create a process
        XMLProcess process = rule.createProcess(dynamicProcess,
                                                eName,
                                                createStartElementAttributes());

        // add a process to the head of the pipeline
        pipeline.addHeadProcess(process);

        // call end element on the rule
        rule.endElement(dynamicProcess, eName, process);
       
        // ensure that the process was removed from the pipeline
        assertNotSame("endElement did not remove the process from " +
                      "the pipeline",
                      process,
                      pipeline.getHeadProcess());

    }
View Full Code Here

     * not at the head of the pipeline
     * @throws Exception if an error occurs
     */
    public void testEndElementWithWrongProcess() throws Exception {
        // retrieve the pipeline
        XMLPipeline pipeline = dynamicProcess.getPipeline();
        // add the process to the head of the pipeline       
        pipeline.addHeadProcess(new XMLProcessTestable());
       
        // create an expanded name       
        ExpandedName eName = new ImmutableExpandedName("testNamespace",
                                                       "testLocalName");

View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.XMLPipeline

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.