Examples of InputNode


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

        Node multiNode = workflow.addNode(multiComp);
        multiNode.setPosition(new Point(320, 130));

        // Parameter node 1
        InputNode paramNode1 = (InputNode) workflow
                .addNode(this.inputComponent);
        paramNode1.setPosition(new Point(20, 30));
        String paramValue1 = "2";
        paramNode1.setDefaultValue(paramValue1);

        // Parameter node 2
        InputNode paramNode2 = (InputNode) workflow
                .addNode(this.inputComponent);
        paramNode2.setPosition(new Point(20, 100));
        String paramValue2 = "3";
        paramNode2.setDefaultValue(paramValue2);

        // Parameter node 3
        InputNode paramNode3 = (InputNode) workflow
                .addNode(this.inputComponent);
        paramNode3.setPosition(new Point(20, 170));
        String paramValue3 = "4";
        paramNode3.setDefaultValue(paramValue3);

        // Parameter node 4
        InputNode paramNode4 = (InputNode) workflow
                .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

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

    // TODO error check for user inputs

    List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow
        .getGraph());
    for (int i = 0; i < inputNodes.size(); i++) {
      InputNode inputNode = inputNodes.get(i);
      XBayaTextField parameterTextField = this.parameterTextFields.get(i);
      String id = inputNode.getID();
      String value = parameterTextField.getText();
      arguments.add("-" + id);
      arguments.add(value);
    }
View Full Code Here

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

      if (null == inputVal) {
        throw new WorkFlowInterpreterException("Unable to find inputs for the subworkflow node node:" + node.getID());
      }

      for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
        InputNode inputNode = (InputNode) iterator.next();
        if (inputNode.getName().equals(port.getName())) {
          inputNode.setDefaultValue(inputVal);
        }
      }
    }
    for (Iterator<Node> iterator = subWorkflowInputNodes.iterator(); iterator.hasNext();) {
      InputNode inputNode = (InputNode) iterator.next();
      if (inputNode.getDefaultValue() == null) {
        throw new WorkFlowInterpreterException("Input not set for  :" + inputNode.getID());
      }

    }

    if (this.mode == GUI_MODE) {
View Full Code Here

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

        // Parameters
        Component inputComponent = new InputComponent();
        Component outputComponent = new OutputComponent();

        // Input parameter node
        InputNode confInput = (InputNode) workflow.addNode(inputComponent);
        confInput.setPosition(new Point(0, 100));

        // Input parameter node
        InputNode adasInput = (InputNode) workflow.addNode(inputComponent);
        adasInput.setPosition(new Point(286, 145));

        // 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));
View Full Code Here

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

        .getGraph());
    final org.xmlpull.v1.builder.XmlElement inputs = builder
        .newFragment("inputs");
    ODEClient client = new ODEClient();
    for (int i = 0; i < inputNodes.size(); i++) {
      InputNode inputNode = inputNodes.get(i);
      XBayaTextField parameterTextField = this.parameterTextFields.get(i);
      String id = inputNode.getID();
      String value = parameterTextField.getText();
      inputNode.setDefaultValue(value);
    }
   
    final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
    if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
      try {
        this.engine.getConfiguration().setWorkflowInterpreterURL(
            new URI(workflowInterpreterUrl));
      } catch (URISyntaxException e) {
        this.engine.getErrorWindow().error(e);
      }
    }

    final String xregistryUrl = this.xRegistryTextField.getText();
    if (null != xregistryUrl && !"".equals(xregistryUrl)) {
      try {
        this.engine.getConfiguration().setXRegistryURL(
            new URI(xregistryUrl));
      } catch (URISyntaxException e) {
        this.engine.getErrorWindow().error(e);
      }
    }

    final String gFacUrl = this.gfacTextField.getText();
    if (null != gFacUrl && !"".equals(gFacUrl)) {
      try {
        this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
      } catch (URISyntaxException e) {
        this.engine.getErrorWindow().error(e);
      }
    }
    this.engine.getConfiguration().setTopic(topic);

    final String topicString = topic;
    new Thread() {
      /**
       * @see java.lang.Thread#run()
       */
      @Override
      public void run() {
               
        try {
          WorkflowInterpreterLaunchWindow.this.engine.getMonitor().getConfiguration().setTopic(topicString);
         
          WorkflowInterpreterLaunchWindow.this.engine.getMonitor().start();
        } catch (MonitorException e1) {
          WorkflowInterpreterLaunchWindow.this.engine.getErrorWindow().error(e1);
        }
        try {
                 
          WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
              engine.getConfiguration().getWorkflowInterpreterURL().toString());
          NameValue[] configurations = new NameValue[6];
          configurations[0] = new NameValue();
          configurations[0]
              .setName(HeaderConstants.HEADER_ELEMENT_GFAC);
          configurations[0].setValue(engine.getConfiguration()
              .getGFacURL().toString());
          configurations[1] = new NameValue();
          configurations[1]
              .setName(HeaderConstants.HEADER_ELEMENT_XREGISTRY);
          if (null == engine.getConfiguration().getXRegistryURL()) {
            configurations[1]
                .setValue(XBayaConstants.DEFAULT_XREGISTRY_URL
                    .toString());
          } else {
            configurations[1].setValue(engine
                .getConfiguration().getXRegistryURL()
                .toString());
          }
          configurations[2] = new NameValue();
          configurations[2]
              .setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
          configurations[2].setValue(engine.getConfiguration()
              .getMyProxyServer());

          configurations[3] = new NameValue();
          configurations[3]
              .setName(HeaderConstants.HEADER_ELEMENT_BROKER);
          configurations[3].setValue(engine.getConfiguration()
              .getBrokerURL().toString());

          configurations[4] = new NameValue();
          configurations[4]
              .setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
          configurations[4].setValue(engine.getConfiguration()
              .getMessageBoxURL().toString());

          configurations[5] = new NameValue();
          configurations[5]
              .setName(HeaderConstants.HEADER_ELEMENT_DSC);
          configurations[5].setValue(engine.getConfiguration()
              .getDSCURL().toString());

          NameValue[] inputNameVals = new NameValue[inputNodes
              .size()];
          for (int i = 0; i < inputNodes.size(); i++) {
            inputNameVals[i] = new NameValue();
            InputNode inputNode = inputNodes.get(i);
            String id = inputNode.getID();
            String value = inputNode.getDefaultValue().toString();
            inputNameVals[i].setName(id);
            inputNameVals[i].setValue(value);
          }
         
          String myProxyUsername = engine.getMyProxyClient().getUsername();
View Full Code Here

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

    List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow
        .getGraph());
    final org.xmlpull.v1.builder.XmlElement inputs = builder
        .newFragment("inputs");
    for (int i = 0; i < inputNodes.size(); i++) {
      InputNode inputNode = inputNodes.get(i);
      XBayaTextField parameterTextField = this.parameterTextFields.get(i);
      String id = inputNode.getID();
      String value = parameterTextField.getText();
      org.xmlpull.v1.builder.XmlElement input = inputs.addElement(id);
      input.addChild(value);
    }
View Full Code Here

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

        List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow
                .getGraph());
        final org.xmlpull.v1.builder.XmlElement inputs = builder.newFragment("inputs");
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            String id = inputNode.getID();
            String value = parameterTextField.getText();
            org.xmlpull.v1.builder.XmlElement input = inputs.addElement(id);
            input.addChild(value);
        }
        
View Full Code Here

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

          .getToPorts();
      for (Port streamedInputOutPort : streamedInputOutPorts) {
        for (DataPort dataPort : workflowInPorts) {
          if (dataPort.getName().equals(
              ((DataPort) streamedInputOutPort).getName())) {
            InputNode newNode = (InputNode) canvas.addNode(
                inputComponent, new Point(250 + 5 * count,
                    200 + count * 50));
            graph.addEdge(newNode.getOutputPort(0), dataPort);
            newNode.setDefaultValue(inputNode.getDefaultValue());
            break;
          }
        }

      }
View Full Code Here

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

                throw new XBayaRuntimeException(originalFromNode.getClass()
                        .getName());
            }
            Port originalToPort = originalFromPort.getToPorts().get(0);
            PortImpl toPort = graph.getPort(originalToPort.getID());
            InputNode inputNode = (InputNode) toPort.getFromNode();
            inputNode.setDefaultValue(output);
        }

        return workflow;
    }
View Full Code Here

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

     */
    private void createInputNodes(WSGraph graph, Set<WSPort> originalFromPorts)
            throws GraphException {
        InputComponent inputComponent = new InputComponent();
        for (WSPort originalFromPort : originalFromPorts) {
            InputNode inputNode = inputComponent.createNode(graph);
            List<Port> originalToPorts = originalFromPort.getToPorts();
            boolean first = true;
            for (Port originalToPort : originalToPorts) {
                String toPortID = originalToPort.getID();
                Port toPort = graph.getPort(toPortID);
                graph.addEdge(inputNode.getPort(), toPort);
                if (first) {
                    first = false;
                    Point position = originalToPort.getGUI().getPosition();
                    Point inputNodePosition = new Point(0, position.y);
                    inputNode.setPosition(inputNodePosition);
                }
            }
        }
    }
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.