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

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


     * @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


                NodeController.getGUI(node).setDraggedFlag(true);
                this.panel.setCursor(SwingUtil.MOVE_CURSOR);
            }

        } else if (selected instanceof Port) {
            Port port = (Port) selected;
            NodeController.getGUI(port).setSelectedFlag(true);
            switch (port.getKind()) {
            case DATA_IN:
            case CONTROL_IN:
                selectInputPort(port);
                break;
            case CONTROL_OUT:
View Full Code Here

                    connect(this.draggedPort, freePort);
                    this.dynamicNodeWithFreePort = null;
                }

            } else if (graphPiece instanceof Port) {
                Port port = (Port) graphPiece;
                if (this.draggedPort.getKind() == Kind.DATA_OUT && port.getKind() == Kind.DATA_IN) {
                    connect(this.draggedPort, port);
                } else if (port.getKind() == Kind.DATA_OUT && this.draggedPort.getKind() == Kind.DATA_IN) {
                    connect(port, this.draggedPort);
                } else if (this.draggedPort.getKind() == Kind.CONTROL_OUT && port.getKind() == Kind.CONTROL_IN) {
                    connect(this.draggedPort, port);
                } else if (this.draggedPort.getKind() == Kind.CONTROL_IN && port.getKind() == Kind.CONTROL_OUT) {
                    connect(port, this.draggedPort);
                } else if (this.draggedPort.getKind() == Kind.EPR && port.getKind() == Kind.DATA_IN) {
                    connect(this.draggedPort, port);
                } else if (this.draggedPort.getKind() == Kind.DATA_IN && port.getKind() == Kind.EPR) {
                    connect(port, this.draggedPort);
                }
            }
            this.draggedPort = null;
        }
View Full Code Here

        event.consume();
      }
      if (this.draggedPort != null) {
        GraphPiece piece = NodeController.getGUI(this.graph).getGraphPieceAt(point);
        if (piece instanceof Port) {
          Port port = (Port) piece;
          // Display the information of port that is close to the mouse
          // pointer.
          if (this.draggedPort.getKind() == Kind.DATA_IN
              && port.getKind() == Kind.DATA_OUT) {
            this.panel.setCursor(SwingUtil.CROSSHAIR_CURSOR);
            selectOutputPort(port);
          } else if (this.draggedPort.getKind() == Kind.DATA_OUT
              && port.getKind() == Kind.DATA_IN) {
            this.panel.setCursor(SwingUtil.CROSSHAIR_CURSOR);
            selectInputPort(port);
          } else if (this.draggedPort.getKind() == Kind.DATA_IN
              && port.getKind() == Kind.EPR) {
            this.panel.setCursor(SwingUtil.CROSSHAIR_CURSOR);
            selectOutputPort(port);
          } else if (this.draggedPort.getKind() == Kind.EPR
              && port.getKind() == Kind.DATA_IN) {
            this.panel.setCursor(SwingUtil.CROSSHAIR_CURSOR);
            selectInputPort(port);
          } else {
            this.panel.setCursor(SwingUtil.DEFAULT_CURSOR);
          }
View Full Code Here

    private void activeTabChanged() {
        GraphCanvas graphPanel = getGraphCanvas();

        if (graphPanel!=null) {
      // Reset the port viewers.
      Port inputPort = graphPanel.getSelectedInputPort();
      Port outputPort = graphPanel.getSelectedOutputPort();
      this.portViewer.setInputPort(inputPort);
      this.portViewer.setOutputPort(outputPort);
      // Reset component viewer.
      Node node = graphPanel.getSelectedNode();
      Component component;
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

                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

    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);
        // TODO organize
        Port fromPort = edge.getFromPort();

        if (edge instanceof DataEdge) {
            DataPort fromDataPort = (DataPort) fromPort;
            QName fromType = fromDataPort.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

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.