コード例 #1
0
  /**
   * @see
   *     edu.indiana.dsi.karma.KarmaServiceSkeletonInterface#serviceTerminated(org.dataandsearch.www.karma._2010._08.ServiceTerminatedDocument)
   */
  public void serviceTerminated(
      org.dataandsearch.www.karma._2010._08.ServiceTerminatedDocument serviceTerminated6) {
    log.info(serviceTerminated6);

    try {
      ingester.ingestServiceTerminated(serviceTerminated6);
    } catch (IngestException ie) {
      log.error("Failed to ingest ServiceTerminated", ie);
    }
  }
コード例 #2
0
  public static void storeNotification(
      NotificationIngester ingester,
      NotificationSummary.NotificationTypeEnum notificationType,
      String notification) {

    try {
      switch (notificationType) {
        case RECEIVED_RESPONSE:
          ingester.ingestReceivedResponse(ReceivedResponseDocument.Factory.parse(notification));
          return;
        case RECEIVED_FAULT:
          ingester.ingestReceivedFault(ReceivedFaultDocument.Factory.parse(notification));
          return;
        case INVOKING_WORKFLOW:
          ingester.ingestInvokingWorkflow(InvokingWorkflowDocument.Factory.parse(notification));
          return;
        case INVOKING_SERVICE:
          ingester.ingestInvokingService(InvokingServiceDocument.Factory.parse(notification));
          return;
        case INVOKING_WORKFLOW_STATUS:
          ingester.ingestInvokingWorkflowStatus(
              InvokingWorkflowStatusDocument.Factory.parse(notification));
          return;
        case INVOKING_SERVICE_STATUS:
          ingester.ingestInvokingServiceStatus(
              InvokingServiceStatusDocument.Factory.parse(notification));
          return;
        case WORKFLOW_INITIALIZED:
          ingester.ingestWorkflowInitialized(
              WorkflowInitializedDocument.Factory.parse(notification));
          return;
        case SERVICE_INITIALIZED:
          ingester.ingestServiceInitialized(ServiceInitializedDocument.Factory.parse(notification));
          return;
        case WORKFLOW_TERMINATED:
          ingester.ingestWorkflowTerminated(WorkflowTerminatedDocument.Factory.parse(notification));
          return;
        case SERVICE_TERMINATED:
          ingester.ingestServiceTerminated(ServiceTerminatedDocument.Factory.parse(notification));
          return;
        case SERVICE_INVOKED:
          ingester.ingestServiceInvoked(ServiceInvokedDocument.Factory.parse(notification));
          return;
        case WORKFLOW_INVOKED:
          ingester.ingestWorkflowInvoked(WorkflowInvokedDocument.Factory.parse(notification));
          return;
        case DATA_CONSUMED:
          ingester.ingestDataConsumed(DataConsumedDocument.Factory.parse(notification));
          return;
        case DATA_PRODUCED:
          ingester.ingestDataProduced(DataProducedDocument.Factory.parse(notification));
          return;
        case DATA_UPDATED:
          ingester.ingestDataUpdated(DataUpdatedDocument.Factory.parse(notification));
          return;
        case WORKFLOW_FAILED:
          ingester.ingestWorkflowFailed(WorkflowFailedDocument.Factory.parse(notification));
          return;
        case DATA_DELETED:
          ingester.ingestDataDeleted(DataDeletedDocument.Factory.parse(notification));
          return;
        case SENDING_RESPONSE:
          ingester.ingestSendingResponse(SendingResponseDocument.Factory.parse(notification));
          return;
        case SENDING_RESPONSE_STATUS:
          ingester.ingestSendingResponseStatus(
              SendingResponseStatusDocument.Factory.parse(notification));
          return;
        case DATA_SEND_STARTED:
          ingester.ingestDataSendStarted(DataSendStartedDocument.Factory.parse(notification));
          return;
        case DATA_SEND_FINISHED:
          ingester.ingestDataSendFinished(DataSendFinishedDocument.Factory.parse(notification));
          return;
        case DATA_RECEIVED_STARTED:
          ingester.ingestDataReceivedStarted(
              DataReceivedStartedDocument.Factory.parse(notification));
          return;
        case DATA_RECEIVED_FINISHED:
          ingester.ingestDataReceivedFinished(
              DataReceivedFinishedDocument.Factory.parse(notification));
          return;
        case SENDING_FAULT:
          ingester.ingestSendingFault(SendingFaultDocument.Factory.parse(notification));
          return;
        case ADD_ANNOTATION:
          ingester.addAnnotation(AddAnnotationDocument.Factory.parse(notification));
          return;
        case ADD_ANNOTATION_BY_ID:
          ingester.addAnnotationById(AddAnnotationByIdDocument.Factory.parse(notification));
          return;
        case ADD_MULTIPLE_OBJECT_ANNOTATION:
          ingester.addMultipleObjectAnnotation(
              AddMultipleObjectAnnotationDocument.Factory.parse(notification));
          return;
        case ADD_RELATIONSHIP_ANNOTATION_BY_ID:
          ingester.addRelationshipAnnotationById(
              AddRelationshipAnnotationByIdDocument.Factory.parse(notification));
          return;
        case UNKNOWN_TYPES:
          ingester.ingestUnknownNotification(UnknownDocument.Factory.parse(notification));
          return;
        default:
          return;
      }
    } catch (IngestException e1) {
      e1.printStackTrace();
      l.error("Ingest Exception.");
      l.error(e1.getStackTrace());
    } catch (XmlException e) {
      l.error("XML Exception.");
      l.error(e.getStackTrace());
    }
  }