Package org.teiid.query.processor.xml

Examples of org.teiid.query.processor.xml.Program.addInstruction()


       
        if (info.isJoinedWithParent()) {
            //create a dependent while loop
            JoinedWhileInstruction whileInst = new JoinedWhileInstruction(source, new Integer(info.getMappingClassNumber()),
                                                                          info.getMappingClassSymbol(), node.getResultName());
            currentProgram.addInstruction(whileInst);
           
            Program childProgram = new Program();
            whileInst.setBlockProgram(childProgram);
           
            programStack.push(childProgram);
View Full Code Here


        String source = node.getActualResultSetName()
        ResultSetInfo info= node.getResultSetInfo();
       
        if (!info.isJoinRoot()) {
            // move to next row.
            currentProgram.addInstruction(new MoveCursorInstruction(source));
        }

        // Since each element with a source started a new program;
        // since now we are done with children, we need to pop to current program                                   
        this.programStack.pop();
View Full Code Here

        for (final Iterator i = stagingTables.iterator(); i.hasNext();) {
            final String table = (String)i.next();
            Program currentProgram = (Program)programStack.peek();

            // load staging
            currentProgram.addInstruction(new ExecStagingTableInstruction(table, planEnv.getStagingTableResultsInfo(table)));
           
            // unload sttaging
            String unloadName = planEnv.unLoadResultName(table);
            cleanupProgram.addInstruction(new ExecStagingTableInstruction(unloadName, planEnv.getStagingTableResultsInfo(unloadName)));
        } // for
View Full Code Here

       
        // if we are dealing with multiple documents
        startFragment(currentProgram, element);
       
        ProcessorInstruction tagInst = TagBuilderVisitor.buildTag(element);
        currentProgram.addInstruction(tagInst);
               
        // this is set by root recursive node. Note that the MappingClass on recursive
        // node is same as the source on the root recursive node.
        Program recursiveProgram = (Program)context.get(element.getMappingClass().toUpperCase());
        IfInstruction ifInst = new IfInstruction();
View Full Code Here

       
    public void start(MappingAttribute attribute, Map context){
        Program currentProgram = (Program)this.programStack.peek();
        ProcessorInstruction tagInst = TagBuilderVisitor.buildTag(attribute);
        if (tagInst != null) {
            currentProgram.addInstruction(tagInst);
        }       
    }

    public void end(MappingAttribute attribute, Map context){
    }
View Full Code Here

   
    public void start(MappingCommentNode comment, Map context){
        Program currentProgram = (Program)this.programStack.peek();
        ProcessorInstruction tagInst = TagBuilderVisitor.buildTag(comment);
        if (tagInst != null) {
            currentProgram.addInstruction(tagInst);
        }
    }
   
    public void end(MappingCommentNode comment, Map context){
        // nothing to do
View Full Code Here

    public void start(MappingChoiceNode choice, Map context){       
        IfInstruction ifInst = new IfInstruction();       
        // if an exception should be thrown as the default choice, then add a sub program to that
        if (choice.throwExceptionOnDefault()) {
            Program subProgram = new Program();
            subProgram.addInstruction(new AbortProcessingInstruction());
            DefaultCondition defCondition = new DefaultCondition(subProgram);
            ifInst.setDefaultCondition(defCondition);           
        }
       
        // to be used by the criteria nodes.
View Full Code Here

        // process the node as others (if see we have not done anything for this node yet..)
        commonStart(choice, context);

        Program currentProgram = (Program)this.programStack.peek();       
        currentProgram.addInstruction(ifInst);       
    }
   
    public void end(MappingChoiceNode choice, Map context){
        commonEnd(choice, context);
View Full Code Here

       
        // if we are dealing with multiple documents
        startFragment(currentProgram, element);
       
        ProcessorInstruction tagInst = TagBuilderVisitor.buildTag(element);
        currentProgram.addInstruction(tagInst);
       
        commonStart(element, context);
       
        // If there are more children under this node move the cursor down
        if (!element.getChildren().isEmpty()) {
View Full Code Here

       
        // If there are more children under this node move the cursor down
        if (!element.getChildren().isEmpty()) {
            // update the program pointer
            currentProgram = (Program)programStack.peek();
            currentProgram.addInstruction(new MoveDocInstruction(MoveDocInstruction.DOWN));
        }
    }

    public void end(MappingElement element, Map context){
        Program currentProgram = (Program)this.programStack.peek();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.