Package edu.indiana.extreme.xbaya.component.ws

Examples of edu.indiana.extreme.xbaya.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


        Collection<Port> inputPorts = GraphUtil.getPorts(this.graph,
                Port.Kind.DATA_IN);
        for (Port inputPort : inputPorts) {
            ComponentPort componentPort = inputPort.getComponentPort();
            if (componentPort instanceof WSComponentPort) {
                WSComponentPort wsComponentPort = (WSComponentPort) componentPort;
                if (wsComponentPort.isOptional()) {
                    // optional input.
                    continue;
                }
            }
            Collection<Port> fromPorts = inputPort.getFromPorts();
View Full Code Here

        } else if (fromNode instanceof WSNode) {
            String fromID = fromNode.getID();
            WSComponent fromWsdlComponent = (WSComponent) fromNode
                    .getComponent();

            WSComponentPort fromWsdlPort = (WSComponentPort) fromPort
                    .getComponentPort();

            from.setVariable(fromID + OUTPUT_SUFFIX);
            from.setPart(fromWsdlComponent.getOutputPartName());

            if (fromWsdlPort.isSchemaUsed()) {
                String typesTargetNamespace = fromWsdlPort.getTargetNamespace();
                XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(
                        fromID.toLowerCase() + TYPENS_SUFFIX,
                        typesTargetNamespace, false, this.process.xml());

                from.setQuery("/" + namespace.getPrefix() + ":"
                        + fromWsdlComponent.getOutputTypeName() + "/"
                        + fromWsdlPort.getName());
            } else {
                // No query needed?
            }
        } else if (fromNode instanceof ForEachNode) {
            from.setVariable(fromNode.getID() + FOREACH_VALUE_SUFFIX);
View Full Code Here

            to.setPart(WorkflowWSDL.OUTPUT_PART_NAME);
            to.setQuery("/" + this.typesNamespace.getPrefix() + ":"
                    + this.workflowWSDL.getWorkflowOutputMessageElementName() + "/"
                    + toNode.getID());
        } else {
            WSComponentPort toComponentPort = (WSComponentPort) toPort
                    .getComponentPort();

            String toID = toNode.getID();
            WSComponent toWSComponent = (WSComponent) toNode.getComponent();
            to.setVariable(toID + INPUT_SUFFIX);
            to.setPart(toWSComponent.getInputPartName());

            if (toComponentPort.isSchemaUsed()) {
                // Normal case.
                // e.g. <part name="name" type="typens:fooType">
                String typesTargetNamespace = toComponentPort
                        .getTargetNamespace();
                XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(
                        toID.toLowerCase() + TYPENS_SUFFIX,
                        typesTargetNamespace, false, this.process.xml());

                String typeName = input ? toWSComponent.getInputTypeName()
                        : toWSComponent.getOutputTypeName();
                to.setQuery("/" + namespace.getPrefix() + ":" + typeName + "/"
                        + toComponentPort.getName());
            } else {
                // e.g. <part name="name" type="xsd:string">
                // No query is needed?
            }
        }
View Full Code Here

            if (edges.size() == 1) {
                setParameterType(fromType);

                if (!isConfigured() && fromDataPort instanceof WSPort) {
                    setName(fromDataPort.getName());
                    WSComponentPort componentPort = ((WSPort) fromDataPort)
                            .getComponentPort();
                    setDescription(componentPort.getDescription());
                    setMetadata(componentPort.getAppinfo());
                }
            } else {
                throw new GraphException(
                        "Cannot connect more than one output ports to the output parameter.");
            }
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

        //
        // type
        //
        QName type = port.getType();
        WSComponentPort componentPort = port.getWSComponentPort();
        WsdlDefinitions wsdl = null;
        if (componentPort != null) {
            wsdl = componentPort.getComponent().getWSDL();
            type = declareTypeIfNecessary(wsdl, type);
        }
        int arrayDimension = port.getArrayDimension();
        if (arrayDimension == 1) {
            String typeName = declareArrayType(schema, type, wsdl);
            type = new QName(this.typesNamespace.getName(), typeName);
        } else if (arrayDimension > 1) {
            // TODO
            throw new XBayaRuntimeException(
                    "multi-dimentional arrays are not supported yet.");
        }

        if (WSConstants.XSD_ANY_TYPE.equals(type) && componentPort != null) {
            XmlElement elementElement = componentPort.getElement();
            if (elementElement == null) {
                // Types are not defined anywhare. Leave it as xsd:any.
                setTypeAttribute(element, type);
            } else {
                // Copy the embedded type defition.
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

        }

        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

    List<WSComponentPort> wfInputs = new ODEClient()
    .getInputs(this.workflow);

    for (Iterator<WSComponentPort> iterator = wfInputs.iterator(); iterator
        .hasNext();) {
      WSComponentPort componentPort = iterator.next();

      String value = getWorkflowInputValue(inputs, componentPort
          .getName());

      if (value == null) {
        logger.severe("EXCEPTION: Value for input component is not set");
        throw new RuntimeException("Value for input component is not set" +componentPort
            .getName());
      } else {
        componentPort.setDefaultValue(value);
      }

      logger.info("$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"
          + componentPort.getName());
      logger.info(componentPort.getDefaultValue());
    }

   

    for (Iterator<WSComponentPort> iterator = wfInputs.iterator(); iterator
        .hasNext();) {
      WSComponentPort componentPort = iterator.next();
      Object value = parseValue(componentPort, componentPort
          .getDefaultValue());
      if (value == null) {
        return null;
      }
      componentPort.setValue(value);
    }


    LEADWorkflowInvoker invoker = null;
    try {
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.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.