Package org.apache.airavata.workflow.model.component.ws

Examples of org.apache.airavata.workflow.model.component.ws.WSComponentPort


                this.componentPort = (WSComponentPort) port;
            }
            if (port instanceof SystemComponentDataPort) {
                // XXX to handle the xwf created by version 2.6.2_XX or earlier.
                SystemComponentDataPort systemPort = (SystemComponentDataPort) port;
                this.componentPort = new WSComponentPort(systemPort.getName(), systemPort.getType(), null);
            }
        }
        return this.componentPort;
    }
View Full Code Here


  private String runExperimentGeneral(Workflow workflowObj, List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException {
    try {
      String workflowString = XMLUtil.xmlElementToString(workflowObj.toXML());
      List<WSComponentPort> ports = getWSComponentPortInputs(workflowObj);
      for (WorkflowInput input : inputs) {
        WSComponentPort port = getWSComponentPort(input.getName(),
            ports);
        if (port != null) {
          port.setValue(input.getValue());
        }
      }
      List<NameValue> inputValues = new ArrayList<NameValue>();
      for (WSComponentPort port : ports) {
        NameValue nameValue = new NameValue();
        nameValue.setName(port.getName());
        if (port.getValue() == null) {
          nameValue.setValue(port.getDefaultValue());
        } else {
          nameValue.setValue(port.getValue().toString());
        }
        inputValues.add(nameValue);
      }
      String experimentID=options.getCustomExperimentId();
      String workflowTemplateName = workflowObj.getName();
View Full Code Here

  private String runExperimentGeneral(Workflow workflowObj, List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener listener) throws AiravataAPIInvocationException {
    try {
      String workflowString = XMLUtil.xmlElementToString(workflowObj.toXML());
      List<WSComponentPort> ports = getWSComponentPortInputs(workflowObj);
      for (WorkflowInput input : inputs) {
        WSComponentPort port = getWSComponentPort(input.getName(),
            ports);
        if (port != null) {
          port.setValue(input.getValue());
        }
      }
      List<NameValue> inputValues = new ArrayList<NameValue>();
      for (WSComponentPort port : ports) {
        NameValue nameValue = new NameValue();
        nameValue.setName(port.getName());
        if (port.getValue() == null) {
          nameValue.setValue(port.getDefaultValue());
        } else {
          nameValue.setValue(port.getValue().toString());
        }
        inputValues.add(nameValue);
      }
      String experimentID=options.getCustomExperimentId();
      String workflowTemplateName = workflowObj.getName();
View Full Code Here

     */
    private void copyDefaultConfiguration(WSPort toWSPort) {
        // TODO support recursive search for WSPort in case the input is
        // connected to special nodes.
        setName(toWSPort.getName());
        WSComponentPort componentPort = toWSPort.getComponentPort();
        setDescription(componentPort.getDescription());
        setDefaultValue(componentPort.getDefaultValue());
        setMetadata(componentPort.getAppinfo());
    }
View Full Code Here

      throws GraphException, ComponentException, Exception {
    try {
      String workflowString=XMLUtil.xmlElementToString(workflowObj.toXML());
      List<WSComponentPort> ports = getWSComponentPortInputs(workflowObj);
      for (WorkflowInput input : inputs) {
        WSComponentPort port = getWSComponentPort(input.getName(), ports);
        if (port!=null){
          port.setValue(input.getValue());
        }
      }
      List<NameValue> inputValues=new ArrayList<NameValue>();
      for (WSComponentPort port : ports) {
        NameValue nameValue = new NameValue();
        nameValue.setName(port.getName());
        if (port.getValue()==null){
          nameValue.setValue(port.getDefaultValue());
        }else{
          nameValue.setValue(port.getValue().toString());
        }
        inputValues.add(nameValue);
      }
      workflow=workflowString;
      String topic=workflowObj.getName()+"_"+UUID.randomUUID();
View Full Code Here

            List<WSComponentPort> inputs = getWSComponentPortInputs(workflowTemplate);
          List<InputNode> inputNodes = getInputNodes(workflowTemplate);
      List<WorkflowInput> results=new ArrayList<WorkflowInput>();
      for (InputNode port : inputNodes) {
        Object value=null;
        WSComponentPort wsComponentPort = getWSComponentPort(port.getName(), inputs);
        if (wsComponentPort!=null){
          value=wsComponentPort.getValue();
        }
        results.add(new WorkflowInput(port.getName(), port.getParameterType().getLocalPart(), port.getDefaultValue(), value, !port.isVisibility()));
      }
      return results;
    } catch (RegistryException e) {
View Full Code Here

      throws GraphException, ComponentException, Exception {
    try {
      String workflowString=XMLUtil.xmlElementToString(workflowObj.toXML());
      List<WSComponentPort> ports = getWSComponentPortInputs(workflowObj);
      for (WorkflowInput input : inputs) {
        WSComponentPort port = getWSComponentPort(input.getName(), ports);
        if (port!=null){
          port.setValue(input.getValue());
        }
      }
      List<NameValue> inputValues=new ArrayList<NameValue>();
      for (WSComponentPort port : ports) {
        NameValue nameValue = new NameValue();
        nameValue.setName(port.getName());
        if (port.getValue()==null){
          nameValue.setValue(port.getDefaultValue());
        }else{
          nameValue.setValue(port.getValue().toString());
        }
        inputValues.add(nameValue);
      }
      workflow=workflowString;
      String topic=workflowObj.getName()+"_"+UUID.randomUUID();
View Full Code Here

            List<WSComponentPort> inputs = getWSComponentPortInputs(workflowTemplate);
          List<InputNode> inputNodes = getInputNodes(workflowTemplate);
      List<WorkflowInput> results=new ArrayList<WorkflowInput>();
      for (InputNode port : inputNodes) {
        Object value=null;
        WSComponentPort wsComponentPort = getWSComponentPort(port.getName(), inputs);
        if (wsComponentPort!=null){
          value=wsComponentPort.getValue();
        }
        results.add(new WorkflowInput(port.getName(), port.getParameterType().getLocalPart(), port.getDefaultValue(), value, !port.isVisibility()));
      }
      return results;
    } catch (RegistryException e) {
View Full Code Here

     */
    private void copyDefaultConfiguration(WSPort toWSPort) {
        // TODO support recursive search for WSPort in case the input is
        // connected to special nodes.
        setName(toWSPort.getName());
        WSComponentPort componentPort = toWSPort.getComponentPort();
        setDescription(componentPort.getDescription());
        setDefaultValue(componentPort.getDefaultValue());
        setMetadata(componentPort.getAppinfo());
    }
View Full Code Here

        }

        int index = 0;
        for (XBayaTextComponent parameterTextField : this.parameterTextFields) {
            String valueString = parameterTextField.getText();
            WSComponentPort port = inputs.get(index++);
            // parse the value. parseValue pops up error if valueString is not
            // valid and return null.
            Object value = parseValue(port, valueString);
            if (value == null) {
                return;
            }
            port.setValue(value);
        }

        // Topic
        String topic = this.topicTextField.getText();
        if (topic.length() == 0) {
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.component.ws.WSComponentPort

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.