Package edu.indiana.extreme.xbaya.graph.system

Examples of edu.indiana.extreme.xbaya.graph.system.OutputNode


        Node subWorkflow = workflow.addNode(subWorkflowComponent);
        subWorkflow.setPosition(new Point(350, 150));

        // Output
        OutputComponent outputComponent = new OutputComponent();
        OutputNode outParamNode = (OutputNode) workflow
                .addNode(outputComponent);
        outParamNode.setPosition(new Point(800, 150));

        // Connect ports
        graph.addEdge(input1.getOutputPort(0), adder.getInputPort(0));
        graph.addEdge(input2.getOutputPort(0), adder.getInputPort(1));
        graph.addEdge(adder.getOutputPort(0), subWorkflow.getInputPort(0));
        graph.addEdge(input3.getOutputPort(0), subWorkflow.getInputPort(1));
        graph.addEdge(subWorkflow.getOutputPort(0), outParamNode
                .getInputPort(0));

        // Set the default values
        // This needs to be after connection.
        input1.setDefaultValue("2");
View Full Code Here


        }else if (GraphSchema.NODE_TYPE_WORKFLOW.equals(type)) {
            node = new WorkflowNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_INPUT.equals(type)) {
            node = new InputNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_OUTPUT.equals(type)) {
            node = new OutputNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_CONSTANT.equals(type)) {
            node = new ConstantNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_SPLIT.equals(type)) {
            node = new ForEachNode(nodeElement);
        } else if (GraphSchema.NODE_TYPE_MERGE.equals(type)) {
View Full Code Here

    /**
     * @see edu.indiana.extreme.xbaya.component.Component#createNode(edu.indiana.extreme.xbaya.graph.Graph)
     */
    @Override
    public Node createNode(Graph graph) {
        OutputNode node = new OutputNode(graph);

        node.setName(NAME);
        node.setComponent(this);

        // Creates a unique ID for the node. This has to be after setName().
        node.createID();

        // Creates an input port
        createPorts(node);

        return node;
View Full Code Here

        for (int i = 0; i < this.inputNodes.size(); i++) {
            InputNode inputNode = this.inputNodes.get(i);
            Collections.swap(this.nodes, i, this.nodes.indexOf(inputNode));
        }
        for (int i = 0; i < this.outputNodes.size(); i++) {
            OutputNode outputNode = this.outputNodes.get(i);
            Collections.swap(this.nodes, this.inputNodes.size() + i, this.nodes
                    .indexOf(outputNode));
        }
        hide();
    }
View Full Code Here

        inputNode.addOutputPort(new CepPort(dataPort.toXML()));
      }
      ((NodeImpl)inputNode).setGraph(wsGraph);
      return inputNode;
    }else if(node instanceof OutputNode){
      OutputNode outputNode = new OutputNode(((OutputNode) node).toXML());
     
     
      List<DataPort> inputPorts = node.getInputPorts();
      for (DataPort dataPort : inputPorts) {
        outputNode.addInputPort(new CepPort(dataPort.toXML()));
      }
     
      ((NodeImpl)outputNode).setGraph(wsGraph);
      return outputNode;
    }
View Full Code Here

                .addNode(this.inputComponent);
        paramNode4.setPosition(new Point(20, 240));
        String paramValue4 = "5";
        paramNode4.setDefaultValue(paramValue4);

        OutputNode outParamNode = (OutputNode) workflow
                .addNode(this.outputComponent);
        outParamNode.setPosition(new Point(370, 240));

        // Connect ports
        graph.addEdge(paramNode1.getOutputPort(0), adderNode1.getInputPort(0));
        graph.addEdge(paramNode2.getOutputPort(0), adderNode1.getInputPort(1));
        graph.addEdge(paramNode3.getOutputPort(0), adderNode2.getInputPort(0));
        graph.addEdge(paramNode4.getOutputPort(0), adderNode2.getInputPort(1));
        graph.addEdge(adderNode1.getOutputPort(0), multiNode.getInputPort(0));
        graph.addEdge(adderNode2.getOutputPort(0), multiNode.getInputPort(1));
        graph.addEdge(multiNode.getOutputPort(0), outParamNode.getInputPort(0));

        return workflow;
    }
View Full Code Here

        // Input parameter node
        InputNode namInput = (InputNode) workflow.addNode(inputComponent);
        namInput.setPosition(new Point(179, 438));

        // Output parameter
        OutputNode outParamNode = (OutputNode) workflow
                .addNode(outputComponent);
        outParamNode.setPosition(new Point(863, 169));

        // Connect ports
        graph.addEdge(confInput.getOutputPort(0), wrfPreNode.getInputPort(0));
        graph.addEdge(confInput.getOutputPort(0), arp2wrfNode.getInputPort(0));
        graph.addEdge(confInput.getOutputPort(0), adasIntNode.getInputPort(1));
        graph.addEdge(confInput.getOutputPort(0), lateralIntNode
                .getInputPort(1));
        graph.addEdge(confInput.getOutputPort(0), terrainPreNode
                .getInputPort(0));
        graph.addEdge(terrainPreNode.getOutputPort(0), adasIntNode
                .getInputPort(2));
        graph.addEdge(terrainPreNode.getOutputPort(0), lateralIntNode
                .getInputPort(0));
        graph.addEdge(adasInput.getOutputPort(0), adasIntNode.getInputPort(0));
        graph
                .addEdge(namInput.getOutputPort(0), lateralIntNode
                        .getInputPort(2));
        graph.addEdge(wrfPreNode.getOutputPort(0), arp2wrfNode.getInputPort(1));
        graph
                .addEdge(adasIntNode.getOutputPort(0), arp2wrfNode
                        .getInputPort(2));
        graph.addEdge(lateralIntNode.getOutputPort(0), arp2wrfNode
                .getInputPort(3));
        graph.addEdge(arp2wrfNode.getOutputPort(0), wrfNode.getInputPort(0));
        graph.addEdge(wrfNode.getOutputPort(0), outParamNode.getInputPort(0));

        // Add metadata
        String inputMetadata = "<appinfo "
                + "xmlns:lsm=\"http://www.extreme.indiana.edu/namespaces/2006/lead-service-metadata\">"
                + "<lsm:constraints>"
View Full Code Here

      }
    }
    LinkedList<Object> outputValues = new LinkedList<Object>();
    LinkedList<String> outputKeywords = new LinkedList<String>();
    for (Node outputNode : outoutNodes) {
      OutputNode node = (OutputNode) outputNode;
      List<DataPort> inputPorts = node.getInputPorts();
      for (DataPort dataPort : inputPorts) {
        Object val = findInputFromPort(dataPort);

        if (null == val) {
          throw new WorkFlowInterpreterException("Unable to find output for the node:" + node.getID());
        }
        // Some node not yet updated
        if (node.getGUI().getBodyColor() != NodeState.FINISHED.color) {
          node.setDescription(val.toString());
          node.getGUI().setBodyColor(NodeState.FINISHED.color);
        }
      }

    }
    this.notifier.sendingPartialResults(outputValues.toArray(), outputKeywords.toArray(new String[outputKeywords.size()]));
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.graph.system.OutputNode

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.