Package org.apache.airavata.xbaya.graph.ws

Examples of org.apache.airavata.xbaya.graph.ws.WSPort


            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
                // Copy
                copyDefaultConfiguration(toWsPort);
View Full Code Here


    /**
     * @return The port created.
     */
    @Override
    public WSPort createPort() {
        WSPort port = new WSPort();
        port.setName(this.name);
        // port.setTypeQName(this.type);
        port.setComponentPort(this);
        return port;
    }
View Full Code Here

    public void copyType(DataPort port, int arrayIncrement) throws GraphException {
        QName newType = port.getType();
        if (this.type != newType) {
            this.type = newType;
            if (port instanceof WSPort) {
                WSPort wsPort = (WSPort) port;
                this.wsComponentPort = wsPort.getComponentPort();
                this.arrayDimension = 0;
            } else if (port instanceof SystemDataPort) {
                SystemDataPort systemPort = (SystemDataPort) port;
                this.wsComponentPort = systemPort.getWSComponentPort();
                this.arrayDimension = systemPort.getArrayDimension() + arrayIncrement;
View Full Code Here

        if (toNodes.size() == 0) {
            function += SPACE + "void";
        } else {

            if (toNodes.size() == 1 && toNodes.get(0) instanceof WSPort) {
                WSPort outPort = (WSPort) toNodes.get(0);
                returnElement = outPort.getComponentPort().getElement();
                returnType = outPort.getType();
            } else {
                throw new XBayaRuntimeException("Unhandled  port type for Dynamic component or to many outputs");
            }
            for (Port port : toNodes) {
                if (toNodes.get(0) instanceof DataPort) {
                    if (!returnType.equals(((DataPort) toNodes.get(0)).getType())) {
                        throw new XBayaRuntimeException(
                                "Dynamic output port connected to input ports of different types.");
                    }
                } else {
                    throw new XBayaRuntimeException("Unhandled  port type for Dynamic component");
                }
            }
            int index = BasicTypeMapping.getSimpleTypeIndex(returnElement);
            if (-1 != index) {
                function += SPACE + BasicTypeMapping.getTypeName(index);
            } else {
                throw new XBayaRuntimeException("WIll be fixed with complex type mappign");
            }
        }

        function += SPACE + "operationName(";
        List<DataPort> inputPorts = this.node.getInputPorts();
        boolean first = true;

        // variable list in function prototype
        for (DataPort inPort : inputPorts) {
            Port fromPort = inPort.getFromPort();
            if (fromPort instanceof WSPort) {
                WSPort wsPort = (WSPort) fromPort;
                XmlElement element = wsPort.getComponentPort().getElement();

                // QName inType = ((DataPort) fromPort).getType();
                int typeIndex = BasicTypeMapping.getSimpleTypeIndex(element);
                if (-1 != typeIndex) {
                    if (first) {
View Full Code Here

            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
                // Copy
                copyDefaultConfiguration(toWsPort);
View Full Code Here

    public QName getParameterType() {
        List<DataEdge> edges = getEdges();
        QName parameterType = super.getParameterType();
        if (parameterType == null && getEdges().size() > 0) {
            Edge edge = edges.get(0);
            WSPort fromPort = (WSPort) edge.getFromPort();
            setParameterType(fromPort.getType());
        }
        return parameterType;
    }
View Full Code Here

            }

        } else {
            Edge edge = edges.get(0);
            Port toPort = edge.getToPort();
            WSPort toWsPort = (WSPort) toPort;
            QName toType = toWsPort.getType();
            setParameterType(toType);

            if (!isConfigured()) {
                // Copy
                copyDefaultConfiguration(toWsPort);
View Full Code Here

TOP

Related Classes of org.apache.airavata.xbaya.graph.ws.WSPort

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.