Package org.teiid.query.processor.xml

Examples of org.teiid.query.processor.xml.Program


        String sql = "SELECT itemNum, itemName, itemQuantity FROM xmltest.rs";         //$NON-NLS-1$
        QueryCommand command = (QueryCommand) helpGetCommand(sql, metadata);              
       
        Criteria crit = helpGetCriteria("xmltest.rs.itemName = 'Screwdriver'", metadata)//$NON-NLS-1$
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        Program program = exampleProgram2(crit, metadata, env);
               
        BufferManager bufferMgr = BufferManagerFactory.getStandaloneBufferManager();
        XMLPlan temp = new XMLPlan(env);
        CommandContext context = new CommandContext("pid", null, null, null, 1); //$NON-NLS-1$
        temp.initialize(context,null,bufferMgr);
View Full Code Here


    public TestProcessorEnvironment(String name) {
        super(name);
    }
   
    public void testProgramRecursionCount() {
        Program program = new Program();
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();

        env.pushProgram(program);
       
        assertTrue(env.getProgramRecursionCount(program) == 0);
View Full Code Here

       
        assertTrue(env.getProgramRecursionCount(program) == 0);
    }

    public void testProgramRecursionCount2() {
        Program program = new Program();
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();

        env.pushProgram(program);
        env.pushProgram(program, true);
       
View Full Code Here

       
        assertTrue(env.getProgramRecursionCount(program) == 1);
    }
   
    public void testProgramRecursionCount3() {
        Program program = new Program();
        Program program2 = new Program();
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();

        env.pushProgram(program);
        env.pushProgram(program2);
        env.pushProgram(program, true);
View Full Code Here

        assertTrue(env.getProgramRecursionCount(program) == 1);
        assertTrue(env.getProgramRecursionCount(program2) == 0);
    }   

    public void testProgramRecursionCount4() {
        Program program = new Program();
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        assertTrue(env.getProgramRecursionCount(program) == 0);
    }
View Full Code Here

     * Test that sub programs pushed on top of a
     * a recursive program "inherit" the recursive
     * program's recursion count.
     */
    public void testProgramRecursionCount5() {
        Program program = new Program();
        Program program2 = new Program();
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();

        env.pushProgram(program);
        env.pushProgram(program, true);
        env.pushProgram(program2);
View Full Code Here

        XMLContext context = new XMLContext();
        NoOpInstruction i1 = new NoOpInstruction();
        NoOpInstruction i2 = new NoOpInstruction();
        NoOpInstruction i3 = new NoOpInstruction();
        NoOpInstruction i4 = new NoOpInstruction();
        Program p1 = new Program();
        p1.addInstruction(i1);
        p1.addInstruction(i2);
        Program p2 = new Program();
        p2.addInstruction(i3);
        p2.addInstruction(i4);
       
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        env.pushProgram(p1);
        env.pushProgram(p2);
        env.pushProgram(p1, true); //simulate recursion
View Full Code Here

        XMLContext context = new XMLContext();
        NoOpInstruction i1 = new NoOpInstruction();
        NoOpInstruction i2 = new NoOpInstruction();
        NoOpInstruction i3 = new NoOpInstruction();
        NoOpInstruction i4 = new NoOpInstruction();
        Program p1 = new Program();
        p1.addInstruction(i1);
        p1.addInstruction(i2);
        Program p2 = new Program();
        p2.addInstruction(i3);
        p2.addInstruction(i4);
       
        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        env.pushProgram(p1);
        env.pushProgram(p1, true); //simulate recursion
        env.pushProgram(p2);
View Full Code Here

     * Test that doc instructions don't do anything while
     * recursion is going on.
     */
    public void testInitializeDocInstruction() throws Exception {
        XMLContext context = new XMLContext();
        Program p0 = new Program();
        InitializeDocumentInstruction i1 = new InitializeDocumentInstruction();
        Program p1 = new Program();
        p1.addInstruction(i1);

        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        env.pushProgram(p0);
        env.pushProgram(p1);
        i1.process(env, context); // Should create new document
View Full Code Here

     * Test that doc instructions don't do anything while
     * recursion is going on.
     */
    public void testInitializeDocInstruction2() throws Exception {
        XMLContext context = new XMLContext();
        Program p0 = new Program();
        InitializeDocumentInstruction i1 = new InitializeDocumentInstruction();
        Program p1 = new Program();
        p1.addInstruction(i1);

        FakeXMLProcessorEnvironment env = new FakeXMLProcessorEnvironment();
        env.pushProgram(p0);
        env.pushProgram(p1);
        env.pushProgram(p0, true); //simulate recursion
View Full Code Here

TOP

Related Classes of org.teiid.query.processor.xml.Program

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.