test_class.declarator: workflowReportJson = new WorkflowReportJSON()
test_class.modifier: private final
test_class.original_string: private final WorkflowReportJSON workflowReportJson = new WorkflowReportJSON();
test_class.type: WorkflowReportJSON
test_class.var_name: workflowReportJson
test_class.file: taverna-run-impl/src/test/java/org/apache/taverna/platform/run/impl/WorkflowReportJSONTest.java
test_class.identifier: WorkflowReportJSONTest
test_class.superclass: extends DummyWorkflowReport
test_case.body: @Test
      public void load() throws Exception {
          URI bundleUri = getClass().getResource("/workflowrun.bundle.zip").toURI();
          Path bundlePath = Paths.get(bundleUri);
          try (Bundle bundle = DataBundles.openBundle(bundlePath)) {
              WorkflowReport wfReport = workflowReportJson.load(bundle);
              assertEquals(State.COMPLETED, wfReport.getState());
              assertNull(wfReport.getParentReport());
              
              assertEquals(wfBundle.getMainWorkflow().getName(), wfReport.getSubject().getName());
              URI mainWf = new URITools().uriForBean(wfBundle.getMainWorkflow());
              assertEquals(mainWf, wfReport.getSubjectURI());
              
              assertEquals(date(2013,1,2,13,37), wfReport.getCreatedDate());
              assertEquals(date(2013,1,2,14,50), wfReport.getStartedDate());
              assertEquals(date(2013,12,31,0,0), wfReport.getCompletedDate());
              assertNull(wfReport.getCancelledDate());
              assertNull(wfReport.getResumedDate());
              assertNull(wfReport.getPausedDate());
              assertTrue(wfReport.getResumedDates().isEmpty());
              assertTrue(wfReport.getPausedDates().isEmpty());
              
              // wf invocation
              assertEquals(1, wfReport.getInvocations().size());
              Invocation wfInvov = wfReport.getInvocations().first();
              assertEquals("wf0", wfInvov.getName());
              assertEquals("wf0", wfInvov.getId());
              assertNull(wfInvov.getParentId());
              assertNull(wfInvov.getParent());
              assertEquals(0, wfInvov.getIndex().length);
              assertSame(wfReport, wfInvov.getReport());
              assertEquals(State.COMPLETED, wfInvov.getState());
  
              assertEquals(date(2013,1,2,14,51), wfInvov.getStartedDate());
              assertEquals(date(2013,12,30,23,50), wfInvov.getCompletedDate());
  
              // wf invocation in/out
              assertEquals(1, wfInvov.getInputs().size());
              assertEquals(1, wfInvov.getOutputs().size());
              
              Path name = wfInvov.getInputs().get("name");
              assertEquals("/inputs/name", name.toString());
              assertEquals("John Doe", DataBundles.getStringValue(name));
              
              Path greeting = wfInvov.getOutputs().get("greeting");
              assertEquals("/outputs/greeting", greeting.toString());
              assertEquals("Hello, John Doe", DataBundles.getStringValue(greeting));
              
              
              // processor reports
              assertEquals(2, wfReport.getProcessorReports().size());
              for (ProcessorReport procRepo : wfReport.getProcessorReports()) {
                  Processor processor = procRepo.getSubject();
                  assertTrue(wfBundle.getMainWorkflow().getProcessors().containsName(processor.getName()));
                  assertEquals(1, procRepo.getJobsQueued());
                  assertEquals(2, procRepo.getJobsCompletedWithErrors());
                  assertEquals(3, procRepo.getJobsCompleted());
                  assertEquals(5, procRepo.getJobsStarted());
                  
  
                  assertEquals(date(2013,2,1,00,00), procRepo.getCreatedDate());
                  assertEquals(date(2013,2,2,00,00), procRepo.getStartedDate());
                  assertEquals(date(2013,7,28,12,0), procRepo.getCompletedDate());
                  assertEquals(date(2013,2,5,0,0), procRepo.getPausedDate());
                  assertEquals(Arrays.asList(date(2013,2,3,0,0), date(2013,2,5,0,0)),
                          procRepo.getPausedDates());
                  assertEquals(date(2013,2,6,0,0), procRepo.getResumedDate());
                  assertEquals(Arrays.asList(date(2013,2,4,0,0), date(2013,2,6,0,0)),
                          procRepo.getResumedDates());
  
                  assertEquals(date(2013,7,28,12,0), procRepo.getCompletedDate());
                  
                  assertEquals(1, procRepo.getInvocations().size());
                  Invocation pInvoc = procRepo.getInvocations().first();
                  assertEquals(date(2013,2,2,11,00), pInvoc.getStartedDate());
                  assertEquals(date(2013,2,2,13,00), pInvoc.getCompletedDate());
                  assertEquals(State.COMPLETED, pInvoc.getState());
                  assertEquals(wfInvov, pInvoc.getParent());
                  assertEquals("wf0", pInvoc.getParentId());                
                  if (processor.getName().equals("hello")) {
                      assertEquals("proc-hello0", pInvoc.getName());
                      assertEquals("wf0/proc-hello0", pInvoc.getId());
                      assertEquals(0, pInvoc.getInputs().size());
                      assertEquals(1, pInvoc.getOutputs().size());
                      assertEquals("Hello, ", DataBundles.getStringValue(pInvoc.getOutputs().get("value")));
                  } else if (processor.getName().equals("Concatenate_two_strings")) {
                      assertEquals("proc-Concatenate_two_strings0", pInvoc.getName());
                      assertEquals("wf0/proc-Concatenate_two_strings0", pInvoc.getId());
                      assertEquals(2, pInvoc.getInputs().size());
                      assertEquals("Hello, ", DataBundles.getStringValue(pInvoc.getInputs().get("string1")));
                      assertEquals("John Doe", DataBundles.getStringValue(pInvoc.getInputs().get("string2")));
  
                      assertEquals(1, pInvoc.getOutputs().size());
                      assertEquals("Hello, John Doe", DataBundles.getStringValue(pInvoc.getOutputs().get("output")));                    
                  } else {
                      fail("Unknown processor: " + processor.getName());
                  }
                  
                  assertEquals(1, procRepo.getActivityReports().size());
                  for (ActivityReport actRepo : procRepo.getActivityReports()) {
                      assertEquals(procRepo, actRepo.getParentReport());
                      assertEquals(State.CANCELLED, actRepo.getState());
                      assertEquals(date(2013,2,20,00,00), actRepo.getCreatedDate());
                      assertEquals(date(2013,2,20,11,00), actRepo.getStartedDate());
                      assertEquals(date(2013,2,21,11,30), actRepo.getCancelledDate());                   
                      // TODO: Test nested workflow
                  }
              }
          }
          
      }
test_case.class_method_signature: WorkflowReportJSONTest.load()
test_case.full_signature: @Test public void load()
test_case.identifier: load
test_case.invocations: toURI getResource getClass get openBundle load assertEquals getState assertNull getParentReport assertEquals getName getMainWorkflow getName getSubject uriForBean getMainWorkflow assertEquals getSubjectURI assertEquals date getCreatedDate assertEquals date getStartedDate assertEquals date getCompletedDate assertNull getCancelledDate assertNull getResumedDate assertNull getPausedDate assertTrue isEmpty getResumedDates assertTrue isEmpty getPausedDates assertEquals size getInvocations first getInvocations assertEquals getName assertEquals getId assertNull getParentId assertNull getParent assertEquals getIndex assertSame getReport assertEquals getState assertEquals date getStartedDate assertEquals date getCompletedDate assertEquals size getInputs assertEquals size getOutputs get getInputs assertEquals toString assertEquals getStringValue get getOutputs assertEquals toString assertEquals getStringValue assertEquals size getProcessorReports getProcessorReports getSubject assertTrue containsName getProcessors getMainWorkflow getName assertEquals getJobsQueued assertEquals getJobsCompletedWithErrors assertEquals getJobsCompleted assertEquals getJobsStarted assertEquals date getCreatedDate assertEquals date getStartedDate assertEquals date getCompletedDate assertEquals date getPausedDate assertEquals asList date date getPausedDates assertEquals date getResumedDate assertEquals asList date date getResumedDates assertEquals date getCompletedDate assertEquals size getInvocations first getInvocations assertEquals date getStartedDate assertEquals date getCompletedDate assertEquals getState assertEquals getParent assertEquals getParentId equals getName assertEquals getName assertEquals getId assertEquals size getInputs assertEquals size getOutputs assertEquals getStringValue get getOutputs equals getName assertEquals getName assertEquals getId assertEquals size getInputs assertEquals getStringValue get getInputs assertEquals getStringValue get getInputs assertEquals size getOutputs assertEquals getStringValue get getOutputs fail getName assertEquals size getActivityReports getActivityReports assertEquals getParentReport assertEquals getState assertEquals date getCreatedDate assertEquals date getStartedDate assertEquals date getCancelledDate
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void load()
focal_class.declarator: uriTools = new URITools()
focal_class.modifier: private static
focal_class.original_string: private static URITools uriTools = new URITools();
focal_class.type: URITools
focal_class.var_name: uriTools
focal_class.declarator: STD_DATE_FORMAT = new StdDateFormat()
focal_class.modifier: private static final
focal_class.original_string: private static final StdDateFormat STD_DATE_FORMAT = new StdDateFormat();
focal_class.type: StdDateFormat
focal_class.var_name: STD_DATE_FORMAT
focal_class.file: taverna-run-impl/src/main/java/org/apache/taverna/platform/run/impl/WorkflowReportJSON.java
focal_class.identifier: WorkflowReportJSON
focal_class.class_method_signature: WorkflowReportJSON.save(WorkflowReport wfReport, Path path)
focal_class.full_signature: public void save(WorkflowReport wfReport, Path path)
focal_class.identifier: save
focal_class.modifiers: public
focal_class.parameters: (WorkflowReport wfReport, Path path)
focal_class.return: void
focal_class.signature: void save(WorkflowReport wfReport, Path path)
focal_class.class_method_signature: WorkflowReportJSON.makeObjectMapperForLoad()
focal_class.full_signature: protected static ObjectMapper makeObjectMapperForLoad()
focal_class.identifier: makeObjectMapperForLoad
focal_class.modifiers: protected static
focal_class.parameters: ()
focal_class.return: ObjectMapper
focal_class.signature: ObjectMapper makeObjectMapperForLoad()
focal_class.class_method_signature: WorkflowReportJSON.makeObjectMapperForSave()
focal_class.full_signature: protected static ObjectMapper makeObjectMapperForSave()
focal_class.identifier: makeObjectMapperForSave
focal_class.modifiers: protected static
focal_class.parameters: ()
focal_class.return: ObjectMapper
focal_class.signature: ObjectMapper makeObjectMapperForSave()
focal_class.class_method_signature: WorkflowReportJSON.injectContext(ObjectNode objNode)
focal_class.full_signature: @SuppressWarnings("unused") private void injectContext(ObjectNode objNode)
focal_class.identifier: injectContext
focal_class.modifiers: @SuppressWarnings("unused") private
focal_class.parameters: (ObjectNode objNode)
focal_class.return: void
focal_class.signature: void injectContext(ObjectNode objNode)
focal_class.class_method_signature: WorkflowReportJSON.save(WorkflowReport wfReport, Bundle dataBundle)
focal_class.full_signature: public void save(WorkflowReport wfReport, Bundle dataBundle)
focal_class.identifier: save
focal_class.modifiers: public
focal_class.parameters: (WorkflowReport wfReport, Bundle dataBundle)
focal_class.return: void
focal_class.signature: void save(WorkflowReport wfReport, Bundle dataBundle)
focal_class.class_method_signature: WorkflowReportJSON.load(Bundle bundle)
focal_class.full_signature: public WorkflowReport load(Bundle bundle)
focal_class.identifier: load
focal_class.modifiers: public
focal_class.parameters: (Bundle bundle)
focal_class.return: WorkflowReport
focal_class.signature: WorkflowReport load(Bundle bundle)
focal_class.class_method_signature: WorkflowReportJSON.load(Path workflowReportJson,
  			WorkflowBundle workflowBundle)
focal_class.full_signature: public WorkflowReport load(Path workflowReportJson,
  			WorkflowBundle workflowBundle)
focal_class.identifier: load
focal_class.modifiers: public
focal_class.parameters: (Path workflowReportJson,
  			WorkflowBundle workflowBundle)
focal_class.return: WorkflowReport
focal_class.signature: WorkflowReport load(Path workflowReportJson,
  			WorkflowBundle workflowBundle)
focal_class.class_method_signature: WorkflowReportJSON.parseWorkflowReport(JsonNode reportJson,
  			Path workflowReportJson, ActivityReport actReport,
  			WorkflowBundle workflowBundle)
focal_class.full_signature: protected WorkflowReport parseWorkflowReport(JsonNode reportJson,
  			Path workflowReportJson, ActivityReport actReport,
  			WorkflowBundle workflowBundle)
focal_class.identifier: parseWorkflowReport
focal_class.modifiers: protected
focal_class.parameters: (JsonNode reportJson,
  			Path workflowReportJson, ActivityReport actReport,
  			WorkflowBundle workflowBundle)
focal_class.return: WorkflowReport
focal_class.signature: WorkflowReport parseWorkflowReport(JsonNode reportJson,
  			Path workflowReportJson, ActivityReport actReport,
  			WorkflowBundle workflowBundle)
focal_class.class_method_signature: WorkflowReportJSON.parseProcessorReport(JsonNode reportJson,
  			Path workflowReportJson, WorkflowReport workflowReport,
  			WorkflowBundle workflowBundle)
focal_class.full_signature: protected ProcessorReport parseProcessorReport(JsonNode reportJson,
  			Path workflowReportJson, WorkflowReport workflowReport,
  			WorkflowBundle workflowBundle)
focal_class.identifier: parseProcessorReport
focal_class.modifiers: protected
focal_class.parameters: (JsonNode reportJson,
  			Path workflowReportJson, WorkflowReport workflowReport,
  			WorkflowBundle workflowBundle)
focal_class.return: ProcessorReport
focal_class.signature: ProcessorReport parseProcessorReport(JsonNode reportJson,
  			Path workflowReportJson, WorkflowReport workflowReport,
  			WorkflowBundle workflowBundle)
focal_class.class_method_signature: WorkflowReportJSON.parseActivityReport(JsonNode actJson,
  			Path workflowReportJson, ProcessorReport procReport,
  			WorkflowBundle workflowBundle)
focal_class.full_signature: protected ActivityReport parseActivityReport(JsonNode actJson,
  			Path workflowReportJson, ProcessorReport procReport,
  			WorkflowBundle workflowBundle)
focal_class.identifier: parseActivityReport
focal_class.modifiers: protected
focal_class.parameters: (JsonNode actJson,
  			Path workflowReportJson, ProcessorReport procReport,
  			WorkflowBundle workflowBundle)
focal_class.return: ActivityReport
focal_class.signature: ActivityReport parseActivityReport(JsonNode actJson,
  			Path workflowReportJson, ProcessorReport procReport,
  			WorkflowBundle workflowBundle)
focal_class.class_method_signature: WorkflowReportJSON.parseInvocation(JsonNode json, Path workflowReportJson,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.full_signature: protected void parseInvocation(JsonNode json, Path workflowReportJson,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.identifier: parseInvocation
focal_class.modifiers: protected
focal_class.parameters: (JsonNode json, Path workflowReportJson,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.return: void
focal_class.signature: void parseInvocation(JsonNode json, Path workflowReportJson,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.class_method_signature: WorkflowReportJSON.parseValues(JsonNode json, Path basePath)
focal_class.full_signature: protected Map<String, Path> parseValues(JsonNode json, Path basePath)
focal_class.identifier: parseValues
focal_class.modifiers: protected
focal_class.parameters: (JsonNode json, Path basePath)
focal_class.return: Map<String, Path>
focal_class.signature: Map<String, Path> parseValues(JsonNode json, Path basePath)
focal_class.class_method_signature: WorkflowReportJSON.iterate(final Iterator<T> iterator)
focal_class.full_signature: private static Iterable<T> iterate(final Iterator<T> iterator)
focal_class.identifier: iterate
focal_class.modifiers: private static
focal_class.parameters: (final Iterator<T> iterator)
focal_class.return: Iterable<T>
focal_class.signature: Iterable<T> iterate(final Iterator<T> iterator)
focal_class.class_method_signature: WorkflowReportJSON.parseDates(JsonNode json,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.full_signature: protected void parseDates(JsonNode json,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.identifier: parseDates
focal_class.modifiers: protected
focal_class.parameters: (JsonNode json,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.return: void
focal_class.signature: void parseDates(JsonNode json,
  			@SuppressWarnings("rawtypes") StatusReport report)
focal_class.class_method_signature: WorkflowReportJSON.getDate(JsonNode json, String name)
focal_class.full_signature: protected Date getDate(JsonNode json, String name)
focal_class.identifier: getDate
focal_class.modifiers: protected
focal_class.parameters: (JsonNode json, String name)
focal_class.return: Date
focal_class.signature: Date getDate(JsonNode json, String name)
focal_class.class_method_signature: WorkflowReportJSON.getSubject(JsonNode reportJson,
  			WorkflowBundle workflowBundle)
focal_class.full_signature: private WorkflowBean getSubject(JsonNode reportJson,
  			WorkflowBundle workflowBundle)
focal_class.identifier: getSubject
focal_class.modifiers: private
focal_class.parameters: (JsonNode reportJson,
  			WorkflowBundle workflowBundle)
focal_class.return: WorkflowBean
focal_class.signature: WorkflowBean getSubject(JsonNode reportJson,
  			WorkflowBundle workflowBundle)
focal_class.class_method_signature: WorkflowReportJSON.loadWorkflowReportJson(Path path)
focal_class.full_signature: protected JsonNode loadWorkflowReportJson(Path path)
focal_class.identifier: loadWorkflowReportJson
focal_class.modifiers: protected
focal_class.parameters: (Path path)
focal_class.return: JsonNode
focal_class.signature: JsonNode loadWorkflowReportJson(Path path)
focal_method.body: public WorkflowReport load(Bundle bundle) throws IOException,
  			ReaderException, ParseException {
  		Path path = getWorkflowRunReport(bundle);
  		WorkflowBundle workflow = getWorkflowBundle(bundle);
  		return load(path, workflow);
  	}
focal_method.class_method_signature: WorkflowReportJSON.load(Bundle bundle)
focal_method.full_signature: public WorkflowReport load(Bundle bundle)
focal_method.identifier: load
focal_method.invocations: getWorkflowRunReport getWorkflowBundle load
focal_method.modifiers: public
focal_method.parameters: (Bundle bundle)
focal_method.return: WorkflowReport
focal_method.signature: WorkflowReport load(Bundle bundle)