Package edu.indiana.extreme.xbaya

Examples of edu.indiana.extreme.xbaya.XBayaRuntimeException


          logger.caught(e);
          // An appropriate message has been set in the exception.
          WorkflowInvokerWrapperForGFacInvoker.this.notifier.invocationFailed(e
              .getMessage(), e);
          WorkflowInvokerWrapperForGFacInvoker.this.failerSent = true;
          throw new XBayaRuntimeException(e);
        } catch (RuntimeException e) {
          logger.caught(e);
          String message = "Error in invoking a service: "
              + WorkflowInvokerWrapperForGFacInvoker.this.serviceInformation;
          WorkflowInvokerWrapperForGFacInvoker.this.notifier.invocationFailed(message,
View Full Code Here


      src = classes;

    // create temp directory
    File tempdir = null;
    if (src == null || classes == null) {
      throw new XBayaRuntimeException("Code gen src directory or classes directory is null");
    }

    File jarfile = null;
    if (outputfilename == null && classes == null && !nojavac)
      outputfilename = "xmltypes.jar";
View Full Code Here

    public EdgeImpl createEdge(Port fromPort, Port toPort) {
        Kind fromKind = fromPort.getKind();
        Kind toKind = toPort.getKind();
        if (!((fromKind == Kind.DATA_OUT && toKind == Kind.DATA_IN)
                || (fromKind == Kind.CONTROL_OUT && toKind == Kind.CONTROL_IN) || (fromKind == Kind.EPR && toKind == Kind.DATA_IN))) {
            throw new XBayaRuntimeException();
        }
        EdgeImpl edge;
        if (toKind == Kind.DATA_IN) {
            edge = new DataEdge();
        } else if (toKind == Kind.CONTROL_IN) {
            edge = new ControlEdge();
        } else {
            // Should not happen.
            throw new XBayaRuntimeException();
        }
        return edge;
    }
View Full Code Here

        if (this.componentPort == null) {
            ComponentPort port = super.getComponentPort();
            if (port instanceof CepComponentPort) {
                this.componentPort = (CepComponentPort) port;
            }else {
              throw new XBayaRuntimeException("UNEXPECTED ERROR: Unable to resolve Port");
            }
           
        }
        return this.componentPort;
    }
View Full Code Here

    case 0:
      return new Integer((String)obj);
    case 1:
      return obj;
    }
    throw new XBayaRuntimeException("type Not Supported yet!!");
  }
View Full Code Here

    Node node = null;
    while (!workQueue.isEmpty()) {
      Node processingNode = workQueue.remove();
      if (!GraphUtil.isAllInputsConnected(processingNode)) {
        throw new XBayaRuntimeException(
            "Disconnedted node inputs during labeling");
      }
      if (GraphUtil.isAllInputsLabeled(processingNode)) {
        String sameLabel = GraphUtil.isSameLabeledInput(processingNode);
        if (null != sameLabel) {
          // same label so its a regular node

          if (GraphUtil.isRegulerNode(processingNode)) {
            processingNode.setLabel(sameLabel);
            String nodeLabel = processingNode.getLabel();

            List<DataPort> outputPorts = processingNode
                .getOutputPorts();
            for (DataPort dataPort : outputPorts) {
              List<DataEdge> edges = dataPort.getEdges();
              for (DataEdge dataEdge : edges) {
                dataEdge.setLabel(nodeLabel);
              }
              workQueue.addAll(dataPort.getToNodes());
            }
          } else {
            processingNode.inventLabel(GraphUtil
                .getEncodedInputLabels(processingNode));
            String nodeOutLabel = processingNode.getLabel()
                + "_out";

            List<DataPort> outputPorts = processingNode
                .getOutputPorts();
            for (DataPort dataPort : outputPorts) {
              List<DataEdge> edges = dataPort.getEdges();
              for (DataEdge dataEdge : edges) {
                dataEdge.setLabel(nodeOutLabel);
              }
              workQueue.addAll(dataPort.getToNodes());
            }
          }

        } else {
          // may need to introduce a join
          // if its CEP node we assume it doesnt require
          // joins
          // Its hard to determine if the CEP node would
          // resolve the joins
          if (!GraphUtil.isCEPNode(processingNode)) {
            processingNode.setRequireJoin(true);

          }
          processingNode.inventLabel(GraphUtil
              .getEncodedInputLabels(processingNode));
          String nodeOutLabel = processingNode.getLabel() + "_out";

          List<DataPort> outputPorts = processingNode
              .getOutputPorts();
          for (DataPort dataPort : outputPorts) {
            List<DataEdge> edges = dataPort.getEdges();
            for (DataEdge dataEdge : edges) {
              dataEdge.setLabel(nodeOutLabel);
            }
            workQueue.addAll(dataPort.getToNodes());
          }

        }
      } else {
        workQueue.add(processingNode);
      }
    }

    // if work queue is empty yet all are not labeled graph is not connected
    // !!
    List<EdgeImpl> edges = this.getEdges();
    for (EdgeImpl edge : edges) {
      if (null == edge.getLabel()) {
        throw new XBayaRuntimeException(
            "Some edges were not labeled after labeling algorithm. Possibly partitioned graph");
      }
      System.out.println(edge.getLabel());
      System.out.println(edge);
    }
View Full Code Here

        }
        if (exception != null) {
            if (exception instanceof RuntimeException) {
                throw (RuntimeException) exception;
            } else {
                throw new XBayaRuntimeException(exception);
            }
        }
    }
View Full Code Here

        }
    }

    private ComponentTreeNode getComponentTree(File dir) {
        if (!dir.isDirectory()) {
            throw new XBayaRuntimeException(dir + "is not a directory.");
        }

        boolean found = false;
        ComponentTreeNode tree = new ComponentTreeNode(dir.getName());
        for (File file : dir.listFiles()) {
View Full Code Here

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

        boolean succeed = ProvenanceActivityReplay.replayActivity(this.kermaURL
                .toString(), this.workflowInstanceID.toString(), this.rate
                .activityRate(), this);
        if (!succeed) {
            String message = "Something went wrong inside of the karma library.";
            throw new XBayaRuntimeException(message);
        }
    }
View Full Code Here

TOP

Related Classes of edu.indiana.extreme.xbaya.XBayaRuntimeException

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.