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

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


   */
  public static boolean isAllInputsLabeled(Node node) {
    List<DataPort> inputPorts = node.getInputPorts();
    for (DataPort dataPort : inputPorts) {
      // 0 because its got only one
      Edge edge = dataPort.getEdge(0);
      if (edge == null || edge.getLabel() == null) {
        return false;
      }
    }
    return true;
  }
View Full Code Here


   */
  public static boolean isAllInputsConnected(Node node) {
    List<DataPort> inputPorts = node.getInputPorts();
    for (DataPort dataPort : inputPorts) {
      // 0 because its got only one
      Edge edge = dataPort.getEdge(0);
      if (edge == null) {
        return false;
      }
    }
    return true;
View Full Code Here

                setDefaultValue(null);
                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

            }

            this.draggedPort = port;

        } else if (selected instanceof Edge) {
            Edge edge = (Edge) selected;
            selectEdge(edge);
        } else {
            /*
             * If nothing is selected
             */
 
View Full Code Here

     * @param toPort
     */
    private void connect(Port fromPort, Port toPort) {
        try {
            // check the validity of the connection.
            Edge edge = this.graph.addEdge(fromPort, toPort);
            selectEdge(edge);
        } catch (GraphException e) {
            logger.error(e.getMessage(), e);
            this.engine.getGUI().getErrorWindow().warning(e.getMessage());
        } catch (RuntimeException e) {
View Full Code Here

        GraphPiece piece = null;

        // Starts from edge because it is drawn first, which means it's at the
        // bottom.
        double minEdgeDist = Double.MAX_VALUE;
        Edge closestEdge = null;
        for (Edge edge : this.graph.getEdges()) {
            double dist = NodeController.getGUI(edge).getMiddlePosition().distance(point);
            if (dist < minEdgeDist) {
                closestEdge = edge;
                minEdgeDist = dist;
View Full Code Here

            }

            this.draggedPort = port;

        } else if (selected instanceof Edge) {
            Edge edge = (Edge) selected;
            selectEdge(edge);
        } else {
            /*
             * If nothing is selected
             */
 
View Full Code Here

     * @param toPort
     */
    private void connect(Port fromPort, Port toPort) {
        try {
            // check the validity of the connection.
            Edge edge = this.graph.addEdge(fromPort, toPort);
            selectEdge(edge);
        } catch (GraphException e) {
            logger.error(e.getMessage(), e);
            this.engine.getGUI().getErrorWindow().warning(e.getMessage());
        } catch (RuntimeException e) {
View Full Code Here

TOP

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

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.