Package org.apache.airavata.workflow.model.graph

Examples of org.apache.airavata.workflow.model.graph.Port


    protected void edgeWasAdded(Edge edge) throws GraphException {
        // XXX cannot detect if the type is array or not from WSDL at this
        // point. so no check here.
        // super.edgeWasAdded(edge);

        Port fromPort = edge.getFromPort();
        Port toPort = edge.getToPort();
        if (edge instanceof DataEdge) {
            if (fromPort instanceof EPRPort) {
                // TODO
                return;
            }
View Full Code Here


    @Override
    protected void edgeWasAdded(Edge edge) throws GraphException {
        super.edgeWasAdded(edge);
        GraphUtil.validateConnection(edge);

        Port fromPort = edge.getFromPort();
        Port toPort = edge.getToPort();
        if (edge instanceof DataEdge) {
            if (fromPort instanceof EPRPort) {
                // TODO
                return;
            }
View Full Code Here

     */
    @Override
    protected void edgeWasAdded(Edge edge) throws GraphException {
        super.edgeWasAdded(edge);
        // TODO this method can be removed.
        Port toPort = edge.getToPort();

        if (edge instanceof DataEdge) {
            DataPort toDataPort = (DataPort) toPort;
            QName toType = toDataPort.getType();

View Full Code Here

                setMetadata(null);
            }

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

            if (!isConfigured()) {
View Full Code Here

  /**
   * @param edge
   * @throws GraphException
   */
  public static void validateConnection(Edge edge) throws GraphException {
    Port fromPort = edge.getFromPort();
    Port toPort = edge.getToPort();
    if (edge instanceof ControlEdge) {
      if (!(fromPort instanceof ControlPort && toPort instanceof ControlPort)) {
        throw new GraphException(MessageConstants.UNEXPECTED_ERROR);
      }
    } else if (edge instanceof DataEdge) {
View Full Code Here

    @Override
    protected void edgeWasAdded(Edge edge) throws GraphException {
        super.edgeWasAdded(edge);

        if (edge instanceof ControlEdge) {
            Port toPort = edge.getToPort();
            Node toNode = toPort.getNode();
            /*
             * check if there is already more than instance node connecting to destination node
             */
            if (!(toNode instanceof InstanceNode)) {
                for (Node node : toNode.getControlInPort().getFromNodes()) {
View Full Code Here

    /**
     * @see org.apache.airavata.workflow.model.graph.Port#getFromNode()
     */
    public Node getFromNode() {
        Port fromPort = getFromPort();
        if (fromPort == null) {
            return null;
        } else {
            return fromPort.getNode();
        }
    }
View Full Code Here

    protected void edgeWasAdded(Edge edge) throws GraphException {
        // XXX cannot detect if the type is array or not from WSDL at this
        // point. so no check here.
        // super.edgeWasAdded(edge);

        Port fromPort = edge.getFromPort();
        Port toPort = edge.getToPort();
        if (edge instanceof DataEdge) {
            if (fromPort instanceof EPRPort) {
                // TODO
                return;
            }
View Full Code Here

     * @param node
     */
    private void finishPredecessorNodes(Node node) {
        for (Port inputPort : node.getInputPorts()) {
            for (Edge edge : inputPort.getEdges()) {
                Port fromPort = edge.getFromPort();
                if (!(fromPort instanceof EPRPort)) {
                    Node fromNode = fromPort.getNode();
                    finishNode(fromNode);
                    finishPredecessorNodes(fromNode);
                }
            }
        }
        Port controlInPort = node.getControlInPort();
        if (controlInPort != null) {
            for (Node fromNode : controlInPort.getFromNodes()) {
                finishNode(fromNode);
                finishPredecessorNodes(fromNode);
            }
        }
    }
View Full Code Here

     * @param node
     */
    private void finishPredecessorNodes(Node node) {
        for (Port inputPort : node.getInputPorts()) {
            for (Edge edge : inputPort.getEdges()) {
                Port fromPort = edge.getFromPort();
                if (!(fromPort instanceof EPRPort)) {
                    Node fromNode = fromPort.getNode();
                    finishNode(fromNode);
                    finishPredecessorNodes(fromNode);
                }
            }
        }
        Port controlInPort = node.getControlInPort();
        if (controlInPort != null) {
            for (Node fromNode : controlInPort.getFromNodes()) {
                finishNode(fromNode);
                finishPredecessorNodes(fromNode);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.graph.Port

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.