Package edu.indiana.extreme.xbaya.graph

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


                || type == null ||
                type.equals(WSConstants.XSD_ANY_TYPE) ||newType.equals(type))) {
            String message = "The type (" + newType
                    + ")  must be same as the type  " + " (" + type + ") of "
                    + getID() + ".";
            throw new GraphException(message);
        }
    }
View Full Code Here


    public static WSGraph createGraph(String graphString) throws GraphException {
        XmlElement graphElement;
        try {
            graphElement = XMLUtil.stringToXmlElement(graphString);
        } catch (RuntimeException e) {
            throw new GraphException(ErrorMessages.XML_ERROR, e);
        }
        return createGraph(graphElement);
    }
View Full Code Here

        try {
            WSGraph graph = createWSGraph();
            graph.parse(graphElement);
            return graph;
        } catch (RuntimeException e) {
            throw new GraphException(ErrorMessages.XML_ERROR, e);
        }
    }
View Full Code Here

      }
    }
    if (edgeSet.isEmpty()) {
      return sortedOrder;
    } else {
      throw new GraphException(
          "Graph Topological sorting failed, Graph has at least one cycle");
    }
  }
View Full Code Here

    try {
      XmlElement workflowElement = XMLUtil
          .stringToXmlElement(workflowString);
      parse(workflowElement);
    } catch (RuntimeException e) {
      throw new GraphException(e);
    }
  }
View Full Code Here

        GpelConstants.GPEL_NS = gpelNS;
        this.gpelProcess = new GpelProcess(
            XMLUtil.stringToXmlElement(bpelString));
      } catch (RuntimeException e) {
        String error = "Failed to parse the BPEL document.";
        throw new GraphException(error, e);
      }
    }

    XmlElement workflowWSDLElement = workflowElement
        .element(WORKFLOW_WSDL_TAG);
    if (workflowWSDLElement != null) {
      try {
        String wsdlText = workflowWSDLElement.requiredText();
        this.workflowWSDL = new WsdlDefinitions(
            XMLUtil.stringToXmlElement(wsdlText));
      } catch (RuntimeException e) {
        String error = "Failed to parse the workflow WSDL.";
        throw new GraphException(error, e);
      }
    }
  }
View Full Code Here

    protected void edgeWasAdded(Edge edge) throws GraphException {
        super.edgeWasAdded(edge);
         if (edge instanceof ControlEdge) {
            List<ControlEdge> edges = getEdges();
            if (edges.size() > 1) {
                 throw new GraphException(
                        "Cannot connect more than one Control Ports to the Exit node.");
            }
        }
    }
View Full Code Here

            String componentString = componentElement.requiredText();
            WSComponent wsdlComponent = WSComponentFactory
                    .createComponent(componentString);
            setComponent(wsdlComponent);
        } catch (ComponentException e) {
            throw new GraphException(ErrorMessages.COMPONENT_FORMAT_ERROR, e);
        }
    }
View Full Code Here

            } else {
                String message = "The type of input " + index + " ("
                        + inputType1 + ") of " + getID()
                        + " must be same as the type of input "
                        + (index + size) + " (" + inputType2 + ").";
                throw new GraphException(message);
            }
            // input1 -> output
            if (outputType.equals(WSConstants.XSD_ANY_TYPE)) {
                outputPort.copyType(port);
            } else if (outputType.equals(portType)) {
                // Do nothing.
            } else {
                String message = "The type of input " + index + " ("
                        + inputType1 + ") of " + getID()
                        + " must be same as the type of output " + index + " ("
                        + outputType + ").";
                throw new GraphException(message);
            }

        } else if (port == inputPort2) {
            // input2 -> input1
            if (inputType1.equals(WSConstants.XSD_ANY_TYPE)) {
                inputPort1.copyType(port);
            } else if (inputType1.equals(portType)) {
                // Do nothing.
            } else {
                String message = "The type of input " + index + " ("
                        + inputType1 + ") of " + getID()
                        + " must be same as the type of input "
                        + (index + size) + " (" + inputType2 + ").";
                throw new GraphException(message);
            }
            // input2 -> output
            if (outputType.equals(WSConstants.XSD_ANY_TYPE)) {
                outputPort.copyType(port);
            } else if (outputType.equals(portType)) {
                // Do nothing.
            } else {
                String message = "The type of input " + (index + size) + " ("
                        + inputType2 + ") of " + getID()
                        + " must be same as the type of output " + index + " ("
                        + outputType + ").";
                throw new GraphException(message);
            }
        } else if (port == outputPort) {
            // output -> input1
            if (inputType1.equals(WSConstants.XSD_ANY_TYPE)) {
                inputPort1.copyType(port);
            } else if (inputType1.equals(portType)) {
                // Do nothing.
            } else {
                String message = "The type of input " + index + " ("
                        + inputType1 + ") of " + getID()
                        + " must be same as the type of output " + index + " ("
                        + outputType + ").";
                throw new GraphException(message);
            }
            // output -> input2
            if (inputType2.equals(WSConstants.XSD_ANY_TYPE)) {
                inputPort2.copyType(port);
            } else if (inputType2.equals(portType)) {
                // Do nothing.
            } else {
                String message = "The type of input " + (index + size) + " ("
                        + inputType2 + ") of " + getID()
                        + " must be same as the type of input " + index + " ("
                        + outputType + ").";
                throw new GraphException(message);
            }
        } else {
            throw new XBayaRuntimeException();
        }
    }
View Full Code Here

        String id = node.getID();
        Port port = node.getPort();

        Node fromNode = port.getFromNode();
        if (fromNode == null) {
            throw new GraphException(
                    "Output parameter has to be connected to some node.");
        }
        Port fromPort = port.getFromPort();
        if (fromNode instanceof InputNode) {
            // The OutputNode is directly connected to an InputNode.
View Full Code Here

TOP

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

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.