Package org.teiid.client.plan

Examples of org.teiid.client.plan.PlanNode


    target.elementMap = source.elementMap;
    target.projectionIndexes = source.projectionIndexes;
  }
   
    public PlanNode getDescriptionProperties() {  
      PlanNode props = super.getDescriptionProperties();
      AnalysisRecord.addLanaguageObjects(props, PROP_CRITERIA, Arrays.asList(this.criteria));
        return props;
    }
View Full Code Here


    public String toString() {
        return "IF BLOCK:"; //$NON-NLS-1$
    }
   
    public PlanNode getDescriptionProperties() {
        PlanNode props = new PlanNode("CHOICE"); //$NON-NLS-1$

        for (int i = 0; i < this.thenBlocks.size(); i++) {
            Condition condition = (Condition) thenBlocks.get(i);
            PlanNode node = null;
            if(condition instanceof RecurseProgramCondition) {
                node = new PlanNode("RECURSIVE"); //$NON-NLS-1$
                node.addProperty(PROP_CONDITION, condition.toString());
            } else {
                node = condition.getThenProgram().getDescriptionProperties();
                node.addProperty(PROP_CONDITION, ((CriteriaCondition)condition).criteria.toString());
            }
            props.addProperty("Condition " + i, node); //$NON-NLS-1$
        }
       
        if (defaultCondition != null && defaultCondition.getThenProgram() != null){
View Full Code Here

    public String toString() {
        return "LOOP INSTRUCTION: " + this.rsName; //$NON-NLS-1$
    }
   
    public PlanNode getDescriptionProperties() {
        PlanNode props = new PlanNode("LOOP"); //$NON-NLS-1$
        props.addProperty(PROP_SQL, this.plan.getDescriptionProperties());
        props.addProperty(PROP_RESULT_SET, this.rsName);
        props.addProperty(PROP_PROGRAM, this.loopProgram.getDescriptionProperties());
        return props;
    }
View Full Code Here

    public String toString(){
        return ("PROGRAM size " + getProcessorInstructions().size()); //$NON-NLS-1$
    }

    public PlanNode getDescriptionProperties() {
      PlanNode props = new PlanNode("XML Program"); //$NON-NLS-1$
       
        if(this.processorInstructions != null) {
          for (int i = 0; i < processorInstructions.size(); i++) {
                ProcessorInstruction inst = processorInstructions.get(i);
                PlanNode childProps = inst.getDescriptionProperties();
                props.addProperty("Instruction " + i, childProps); //$NON-NLS-1$
            }
        }
        return props;
    }
View Full Code Here

    public String toString() {
        return "WHILE INSTRUCTION:"; //$NON-NLS-1$
    }
   
    public PlanNode getDescriptionProperties() {
        PlanNode props = new PlanNode("WHILE"); //$NON-NLS-1$
        props.addProperty(PROP_CRITERIA, this.condition.toString());
        props.addProperty(PROP_PROGRAM, this.whileProgram.getDescriptionProperties());
        return props;
    }
View Full Code Here

   
        return str.toString();
    }
   
    public PlanNode getDescriptionProperties() {
        PlanNode props = null;
        if(descriptor.isElement()) {
            props = new PlanNode("ADD ELEMENT"); //$NON-NLS-1$                   
        } else {
          props = new PlanNode("ADD ATTRIBUTE"); //$NON-NLS-1$                   
        }

        props.addProperty(PROP_TAG, this.descriptor.getName());
       
        if(descriptor.isOptional()) {
            props.addProperty(PROP_OPTIONAL, ""+descriptor.isOptional()); //$NON-NLS-1$           
        }
       
        if(this.symbol != null) {
            props.addProperty(PROP_DATA_COL, this.symbol.toString());
        }

        if(descriptor.getNamespacePrefix() != null) {
            props.addProperty(PROP_NAMESPACE, descriptor.getNamespacePrefix());
        }

        Properties namespaceDeclarations = descriptor.getNamespaceURIs();
        if(namespaceDeclarations != null) {
            List<String> nsDecl = new ArrayList<String>(namespaceDeclarations.size());
            Enumeration e = namespaceDeclarations.propertyNames();
            while (e.hasMoreElements()){
                String prefix = (String)e.nextElement();
                String ns = namespaceDeclarations.getProperty(prefix);
                nsDecl.add(prefix + "=\"" + ns + "\""); //$NON-NLS-1$ //$NON-NLS-2$
            }
            props.addProperty(PROP_NAMESPACE_DECL, nsDecl);
        }

        if(descriptor.getDefaultValue() != null) {
            props.addProperty(PROP_DEFAULT, descriptor.getDefaultValue());
        }

        return props;
    }
View Full Code Here

     * @see org.teiid.query.processor.relational.RelationalNode#getDescriptionProperties()
     * @since 4.2
     */
    public PlanNode getDescriptionProperties() {
        // Default implementation - should be overridden    
      PlanNode props = super.getDescriptionProperties();
       
        if(isDependent()) {
          props.addProperty(PROP_DEPENDENT, Boolean.TRUE.toString());
        }
        props.addProperty(PROP_JOIN_STRATEGY, this.joinStrategy.toString());
        props.addProperty(PROP_JOIN_TYPE, this.joinType.toString());
        List<String> critList = getCriteriaList();
        props.addProperty(PROP_JOIN_CRITERIA, critList);
        return props;
    }
View Full Code Here

    public String toString() {
        return "STAGING:"+resultSetName; //$NON-NLS-1$
    }

    public PlanNode getDescriptionProperties() {
      PlanNode props = new PlanNode("Staging Table"); //$NON-NLS-1$
        props.addProperty(PROP_RESULT_SET, this.resultSetName);
        props.addProperty(PROP_IS_STAGING, "true"); //$NON-NLS-1$   
        props.addProperty(PROP_SQL, this.info.getPlan().getDescriptionProperties());
        return props;
    }   
View Full Code Here

    public String toString() {
        return "END DOC"; //$NON-NLS-1$
    }

    public PlanNode getDescriptionProperties() {
        return new PlanNode("END DOCUMENT"); //$NON-NLS-1$
    }
View Full Code Here

                            new Object[] {this.toString() + " The variable " //$NON-NLS-1$
                                          + getVariable() + " in the variablecontext is updated with the value :", value}); //$NON-NLS-1$
    }
   
    public PlanNode getDescriptionProperties() {
        PlanNode props = new PlanNode("ASSIGNMENT"); //$NON-NLS-1$
        props.addProperty(PROP_VARIABLE, this.variable.toString());
        if (this.expression != null) {
          AnalysisRecord.addLanaguageObjects(props, PROP_EXPRESSION, Arrays.asList(this.expression));
        }
        return props;
    }
View Full Code Here

TOP

Related Classes of org.teiid.client.plan.PlanNode

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.