Examples of InputNode


Examples of org.apache.airavata.workflow.model.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 org.apache.airavata.workflow.model.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());
      }

    }

    try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.graph.system.InputNode

        // TODO error check for user inputs

        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 org.apache.airavata.workflow.model.graph.system.InputNode

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

//        final String workflowInterpreterUrl = this.workflowInterpreterTextField.getText();
//        if (null != workflowInterpreterUrl && !"".equals(workflowInterpreterUrl)) {
//            try {
View Full Code Here

Examples of org.apache.airavata.workflow.model.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 org.apache.airavata.workflow.model.graph.system.InputNode

        }

        // Create input fields
        List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        for (Iterator<InputNode> iterator = inputNodes.iterator(); iterator.hasNext();) {
            InputNode node = iterator.next();
            String id = node.getID();
            QName parameterType = node.getParameterType();

            /*
             * If input node has no connection, skip it
             */
            if (parameterType == null) {
                iterator.remove();
                continue;
            }

            JLabel nameLabel = new JLabel(id);
            JLabel typeField = new JLabel(parameterType.getLocalPart());
            XBayaTextField paramField = new XBayaTextField();
            Object value = node.getDefaultValue();

            String valueString;
            if (value == null) {
                valueString = "";
            } else {
                if (value instanceof XmlElement) {
                    XmlElement valueElement = (XmlElement) value;
                    valueString = XMLUtil.xmlElementToString(valueElement);
                } else {
                    // Only string comes here for now.
                    valueString = value.toString();
                }
            }

            if (!node.isVisibility()) {
                paramField.setEditable(false);
            }
            paramField.setText(valueString);
            this.parameterPanel.add(nameLabel);
            this.parameterPanel.add(typeField);
View Full Code Here

Examples of org.apache.airavata.xbaya.graph.system.InputNode

                // This should not happen.
                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 org.simpleframework.xml.stream.InputNode

        log.debug(msg);
      } else {
        throw new Exception(msg);
      }
    } else {
      InputNode root = NodeBuilder.read(new FileInputStream(xml));
      InputNode listNode = root.getNext();
      if (listNodeName.equals(listNode.getName())) {
        InputNode item = listNode.getNext();
        while (item != null) {
          T o = ser.read(clazz, item, false);
          list.add(o);
          item = listNode.getNext();
        }
View Full Code Here

Examples of unbbayes.prs.mebn.InputNode

      for (TempTableHeaderParent leaf : parentsList) {
        if (!leaf.isKnownValue()) {
          // if leaf is not set to be a constant value, then we should set it to
          // evaluate a combination of entities
          if (leaf.parent instanceof InputNode) {
            InputNode inputNode = (InputNode) leaf.parent;
            leaf.setEvaluationList(valuesOnCPTColumn.get(inputNode.getResidentNodePointer().getResidentNode().getName()));
          } else {
            leaf.setEvaluationList(valuesOnCPTColumn.get(leaf.parent.getName()));
          }
        }
      }
View Full Code Here

Examples of unbbayes.prs.mebn.InputNode

    super.addParent(parent);
    if (parent instanceof ResidentNode) {
      ResidentNode residentNode = (ResidentNode) parent;
      residentNode.addResidentNodeChild(this); // this will automatically add parent to this.getResidentNodeFatherList()
    } else if (parent instanceof InputNode) {
      InputNode inputNode = (InputNode) parent;
      inputNode.addResidentNodeChild(this);
    } else {
      try {
        Debug.println(getClass(), parent + " is not a " + ResidentNode.class.getName() + " or " + InputNode.class.getName());
      } catch (Throwable t) {
        t.printStackTrace();
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.