Examples of XBayaRuntimeException


Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

   * @param query
   */
  private String extractDataType(String query) {
    int index = query.indexOf(':');
    if (index == -1) {
      throw new XBayaRuntimeException(
          "Invalid query no : delimeter found " + query);
    }
    String[] split = query.substring(index+1).trim().split("/");
    if (split.length == 0) {
      throw new XBayaRuntimeException("Unknown Xpath "
          + query.substring(index));
    }
    return split[split.length -1];
  }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

          inputNode.setDefaultValue(input.getValue());
          break;
        }
      }
      if (inputNode.getDefaultValue() == null) {
        throw new XBayaRuntimeException(
            "Could not find a input value for component with name :"
                + inputNode.getName());
      }

    }
    System.err.println("Input all set");

    XBayaConfiguration conf = null;
    try {
      conf = getConfiguration(configurations);
    } catch (URISyntaxException e1) {
        throw new XBayaRuntimeException(e1);
    }
    WorkflowInterpretorEventListener listener = new WorkflowInterpretorEventListener(workflow, conf);
    try {
      listener.start();
    } catch (MonitorException e1) {
      // TODO Auto-generated catch block
      e1.printStackTrace();
    }
    WorkflowInterpreter interpreter = new WorkflowInterpreter(conf, topic,
        workflow, username, password);
    System.err.println("Created the interpreter");
    try {
      interpreter.scheduleDynamically();
      System.err.println("Called the interpreter");
     
    } catch (XBayaException e) {
      throw new XBayaRuntimeException(e);
    }
    try {
      listener.stop();
    } catch (MonitorException e) {
      // TODO Auto-generated catch block
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

                if (!(fromType == null || fromType
                        .equals(WSConstants.XSD_ANY_TYPE))) {
                    toDataPort.copyType(fromDataPort);
                }
            } else {
                throw new XBayaRuntimeException();
            }
        }
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

        if (kind == Kind.DATA_IN) {
            index = inputPorts.indexOf(port);
        } else if (kind == Kind.DATA_OUT) {
            index = outputPorts.indexOf(port);
        } else {
            throw new XBayaRuntimeException();
        }

        SystemDataPort inputPort = (SystemDataPort) inputPorts.get(index);
        SystemDataPort outputPort = (SystemDataPort) outputPorts.get(index);

        QName inputType = inputPort.getType();
        QName outputType = outputPort.getType();

        QName portType = port.getType();
        if (portType == null || portType.equals(WSConstants.XSD_ANY_TYPE)) {
            // Do nothing
            return;
        }

        if (port == inputPort) {
            // input -> output
            if (outputType.equals(WSConstants.XSD_ANY_TYPE)) {
                outputPort.copyType(port, 1);
            } else if (outputType.equals(portType)) {
                // Do nothing.
            } else {
                // XXX cannot parse array from WSDL.
                // String message = "The type of input " + index + " ("
                // + inputType + ") of " + getID()
                // + " must be same as the type of output " + index + " ("
                // + outputType + ").";
                // throw new GraphException(message);
            }

        } else if (port == outputPort) {
            // output -> input1
            if (inputType.equals(WSConstants.XSD_ANY_TYPE)) {
                inputPort.copyType(port, -1);
            } else if (inputType.equals(portType)) {
                // Do nothing.
            } else {
                // XXX cannot parse array from WSDL.
                // String message = "The type of input " + index + " ("
                // + inputType + ") of " + getID()
                // + " must be same as the type of output " + index + " ("
                // + outputType + ").";
                // throw new GraphException(message);
            }
        } else {
            throw new XBayaRuntimeException();
        }
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

                // XXX The algorithm used here is not efficient. It introduces
                // unnessary barriers.
                addFlow(nextNodes, block, sequence);
            } else {
                // Should not happen.
                throw new XBayaRuntimeException("nextNodes.size(): "
                        + nextNodes.size());
            }
            nextNodes = getNextExecutableNodes(block);
        }
    }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

    for (DataPort port : this.outputPorts) {
      if (port.getID().equals(fromPortID)) {
        return port;
      }
    }
    throw new XBayaRuntimeException("Port with id not found :" + fromPortID);
  }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

    for (DataPort port : this.inputPorts) {
      if (port.getID().equals(id)) {
        return port;
      }
    }
    throw new XBayaRuntimeException("Port with id not found :" + id);
  }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

        if (fromPort == wsPort) {
          toPort.copyType(wsPort);
        } else if (toPort == wsPort) {
          fromPort.copyType(wsPort);
        } else {
          throw new XBayaRuntimeException();
        }
      }
    }

  }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

   * @param node
   * @return null if not the same
   */
  public static String isSameLabeledInput(Node node) {
    if (!isAllInputsConnected(node)) {
      throw new XBayaRuntimeException("Node inputs not connected" + node);
    }
    if (!isAllInputsLabeled(node)) {
      throw new XBayaRuntimeException(
          "Some or all of the node inputs not labeled" + node);
    }
    List<DataPort> inputPorts = node.getInputPorts();
    String label = inputPorts.get(0).getEdge(0).getLabel();
    for (DataPort dataPort : inputPorts) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException

   * @param processingNode
   * @return
   */
  public static String getEncodedInputLabels(Node node) {
    if (!isAllInputsConnected(node)) {
      throw new XBayaRuntimeException("Node inputs not connected" + node);
    }
    if (!isAllInputsLabeled(node)) {
      throw new XBayaRuntimeException(
          "Some or all of the node inputs not labeled" + node);
    }
    List<DataPort> inputPorts = node.getInputPorts();
    String label = "";
    for (DataPort dataPort : inputPorts) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.