Package edu.indiana.extreme.xbaya.graph

Examples of edu.indiana.extreme.xbaya.graph.ControlPort


        } else if(GraphSchema.PORT_TYPE_CEP.equals(type)){
          port = new CepPort(portElement);
        }else if (GraphSchema.PORT_TYPE_SYSTEM_DATA.equals(type)) {
            port = new SystemDataPort(portElement);
        } else if (GraphSchema.PORT_TYPE_CONTROL.equals(type)) {
            port = new ControlPort(portElement);
        } else if (GraphSchema.PORT_TYPE_EPR.equals(type)) {
            port = new EPRPort(portElement);
        } else if (GraphSchema.PORT_TYPE_INSTANCE.equals(type)) {
            port = new InstanceDataPort(portElement);           
        } else {
View Full Code Here


    /**
     * @see edu.indiana.extreme.xbaya.component.ComponentPort#createPort()
     */
    @Override
    public ControlPort createPort() {
        ControlPort port = new ControlPort();
        port.setName(this.name);
        port.setComponentPort(this);
        return port;
    }
View Full Code Here

            DataPort port = output.createPort();
            node.addOutputPort(port);
        }

        if (this.controlInPort != null) {
            ControlPort port = this.controlInPort.createPort();
            node.setControlInPort(port);
        }

        for (ComponentControlPort componentPort : this.controlOutPorts) {
            ControlPort port = componentPort.createPort();
            node.addControlOutPort(port);
        }

        if (this.eprPort != null) {
            EPRPort port = this.eprPort.createPort();
View Full Code Here

          || component instanceof InstanceComponent) {

        /*
         * Check for control ports from other node
         */
        ControlPort control = node.getControlInPort();
        boolean controlDone = true;
        if (control != null) {
          for (EdgeImpl edge : control.getEdges()) {
            controlDone = controlDone && ((ControlPort)edge.getFromPort()).isConditionMet();
          }
        }

        /*
         * Check for input ports
         */
        List<DataPort> inputPorts = node.getInputPorts();
        boolean inputsDone = true;
        for (DataPort dataPort : inputPorts) {
          inputsDone = inputsDone && finishedNodes.contains(dataPort.getFromNode());
        }
        if (inputsDone && controlDone) {
          list.add(node);
        }       
      } else if (component instanceof EndifComponent) {
        /*
         * EndIfComponent can run if number of input equals to number of
         * output that it expects
         */
        int expectedOutput = node.getOutputPorts().size();
        int actualInput = 0;
        List<DataPort> inputPorts = node.getInputPorts();
        for (DataPort dataPort : inputPorts) {
          if (finishedNodes.contains(dataPort.getFromNode()))
            actualInput++;
        }

        if (expectedOutput == actualInput) {
          list.add(node);
        }
      } else if (component instanceof TerminateInstanceComponent) {
        /*
         * All node connected to controlIn port must be done
         */
        ControlPort control = node.getControlInPort();
        boolean controlDone = true;
        if (control != null) {
          for (EdgeImpl edge : control.getEdges()) {
            controlDone = controlDone && finishedNodes.contains(edge.getFromPort().getFromNode());
          }
        }

        /*
 
View Full Code Here

    if(type == EventType.RESOURCE_MAPPING && event.getMessage().contains("i-")){
      String nodeID = event.getNodeID();
      for (GraphCanvas graphCanvas : graphCanvases) {
        Node node = graphCanvas.getWorkflow().getGraph().getNode(nodeID);
        if(node!=null){
          ControlPort control = node.getControlInPort();
          if(control != null){
            Node fromNode = control.getFromNode();
            if(fromNode instanceof InstanceNode){
              InstanceNode ec2Node = (InstanceNode)fromNode;
             
              /*
               * parse message and set output to InstanceNode
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.graph.ControlPort

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.