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 save() throws Exception {
          workflowReportJson.save(wfReport, dataBundle);
          Path path = wfReport.getDataBundle().getRoot().resolve("/workflowrun.json");
          assertTrue("Did not save to expected path "  + path, Files.exists(path));
  
  //        System.out.println(DataBundles.getStringValue(path));
          
          JsonNode json;
          try (InputStream jsonIn = Files.newInputStream(path)) {
              json = new ObjectMapper().readTree(jsonIn);
          }
          assertEquals("COMPLETED", json.get("state").asText());
          assertEquals("2013-01-02T13:37:00.000+0000", json.get("createdDate").asText());
          assertEquals("2013-01-02T14:50:00.000+0000", json.get("startedDate").asText());
          assertEquals("2013-12-31T00:00:00.000+0000", json.get("completedDate").asText());
          String wfId = wfBundle.getGlobalBaseURI().toString();
          assertEquals(wfId + "workflow/Hello_Anyone/", 
                  json.get("subject").asText());
          
          // workflow invocation
          JsonNode wfInvoc = json.get("invocations").get(0);
          assertEquals("wf0", wfInvoc.get("id").asText());
          assertEquals("wf0", wfInvoc.get("name").asText());
          
          assertEquals("2013-01-02T14:51:00.000+0000", wfInvoc.get("startedDate").asText());
          assertEquals("2013-12-30T23:50:00.000+0000", wfInvoc.get("completedDate").asText());
  
          String inputsName = wfInvoc.get("inputs").get("name").asText();
          assertEquals("/inputs/name", inputsName);
          String outputsGreeting = wfInvoc.get("outputs").get("greeting").asText();
          assertEquals("/outputs/greeting", outputsGreeting);
          assertEquals(
                  "John Doe",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(inputsName)));        
          assertEquals(
                  "Hello, John Doe",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(outputsGreeting)));        
  
          // NOTE: This assumes alphabetical ordering when constructing
          // processor reports - which generally is given as
          // Workflow.getProcessors() is sorted.
          JsonNode proc0 = json.get("processorReports").get(0);
          assertEquals(wfId + "workflow/Hello_Anyone/processor/Concatenate_two_strings/",
                  proc0.get("subject").asText());
          assertEquals("COMPLETED", proc0.get("state").asText());
          assertEquals("2013-02-01T00:00:00.000+0000", proc0.get("createdDate").asText());
          assertEquals("2013-02-02T00:00:00.000+0000", proc0.get("startedDate").asText());
          assertEquals("2013-02-03T00:00:00.000+0000", proc0.get("pausedDates").get(0).asText());
          assertEquals("2013-02-05T00:00:00.000+0000", proc0.get("pausedDates").get(1).asText());
          assertEquals("2013-02-05T00:00:00.000+0000", proc0.get("pausedDate").asText());
  
          assertEquals("2013-02-04T00:00:00.000+0000", proc0.get("resumedDates").get(0).asText());
          assertEquals("2013-02-06T00:00:00.000+0000", proc0.get("resumedDates").get(1).asText());
          assertEquals("2013-02-06T00:00:00.000+0000", proc0.get("resumedDate").asText());
  
          assertEquals("2013-07-28T12:00:00.000+0000", proc0.get("completedDate").asText());
  
          // processor invocations
          JsonNode pInvoc0 = proc0.get("invocations").get(0);
          assertEquals("proc-Concatenate_two_strings0", pInvoc0.get("name").asText());
          assertEquals("wf0/proc-Concatenate_two_strings0", pInvoc0.get("id").asText());
          assertEquals("wf0", pInvoc0.get("parent").asText());
  
          String inputString1 = pInvoc0.get("inputs").get("string1").asText();
          assertTrue(inputString1.startsWith("/intermediates/"));
          assertEquals(
                  "Hello, ",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(inputString1)));        
          
          String inputString2 = pInvoc0.get("inputs").get("string2").asText();
          assertEquals("/inputs/name", inputString2);
          String output = pInvoc0.get("outputs").get("output").asText();
          assertTrue(output.startsWith("/intermediates/"));
          assertEquals(
                  "Hello, John Doe",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(output)));        
  
          // Activity reports
          JsonNode act0 = proc0.get("activityReports").get(0);
          assertEquals("CANCELLED", act0.get("state").asText());
          assertEquals(wfId + "profile/taverna-2.4.0/activity/Concatenate_two_strings/", 
                  act0.get("subject").asText());
          
          
          // activity invocation
          JsonNode aInvoc0 = act0.get("invocations").get(0);
  
          assertEquals("act-Concatenate_two_strings0", aInvoc0.get("name").asText());
          assertEquals("wf0/proc-Concatenate_two_strings0/act-Concatenate_two_strings0", aInvoc0.get("id").asText());
          assertEquals("wf0/proc-Concatenate_two_strings0", aInvoc0.get("parent").asText());
  
          String actInputString1 = aInvoc0.get("inputs").get("string1").asText();
          assertTrue(actInputString1.startsWith("/intermediates/"));
          assertEquals(
                  "Hello, ",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(actInputString1)));        
          
          String actInputString2 = aInvoc0.get("inputs").get("string2").asText();
          assertEquals("/inputs/name", actInputString2);
          String actOutput = pInvoc0.get("outputs").get("output").asText();
          assertTrue(actOutput.startsWith("/intermediates/"));
          assertEquals(
                  "Hello, John Doe",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(actOutput)));        
  
          
          
          
          JsonNode proc1 = json.get("processorReports").get(1);
          assertEquals(wfId + "workflow/Hello_Anyone/processor/hello/",
                  proc1.get("subject").asText());
          assertEquals("COMPLETED", proc1.get("state").asText());
          assertEquals("2013-02-01T00:00:00.000+0000", proc1.get("createdDate").asText());
          assertEquals("2013-02-02T00:00:00.000+0000", proc1.get("startedDate").asText());
          // etc.
  
          JsonNode pInvoc1 = proc1.get("invocations").get(0);
  
          String value = pInvoc1.get("outputs").get("value").asText();
          assertTrue(value.startsWith("/intermediates/"));
          assertEquals(
                  "Hello, ",
                  DataBundles.getStringValue(wfReport.getDataBundle().getRoot()
                          .resolve(value)));        
          assertEquals(inputString1, value);
      }
test_case.class_method_signature: WorkflowReportJSONTest.save()
test_case.full_signature: @Test public void save()
test_case.identifier: save
test_case.invocations: save resolve getRoot getDataBundle assertTrue exists newInputStream readTree assertEquals asText get assertEquals asText get assertEquals asText get assertEquals asText get toString getGlobalBaseURI assertEquals asText get get get assertEquals asText get assertEquals asText get assertEquals asText get assertEquals asText get asText get get assertEquals asText get get assertEquals assertEquals getStringValue resolve getRoot getDataBundle assertEquals getStringValue resolve getRoot getDataBundle get get assertEquals asText get assertEquals asText get assertEquals asText get assertEquals asText get assertEquals asText get get assertEquals asText get get assertEquals asText get assertEquals asText get get assertEquals asText get get assertEquals asText get assertEquals asText get get get assertEquals asText get assertEquals asText get assertEquals asText get asText get get assertTrue startsWith assertEquals getStringValue resolve getRoot getDataBundle asText get get assertEquals asText get get assertTrue startsWith assertEquals getStringValue resolve getRoot getDataBundle get get assertEquals asText get assertEquals asText get get get assertEquals asText get assertEquals asText get assertEquals asText get asText get get assertTrue startsWith assertEquals getStringValue resolve getRoot getDataBundle asText get get assertEquals asText get get assertTrue startsWith assertEquals getStringValue resolve getRoot getDataBundle get get assertEquals asText get assertEquals asText get assertEquals asText get assertEquals asText get get get asText get get assertTrue startsWith assertEquals getStringValue resolve getRoot getDataBundle assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void save()
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 void save(WorkflowReport wfReport, Path path) throws IOException {
  		ObjectMapper om = makeObjectMapperForSave();
  		try (Writer w = newBufferedWriter(path, Charset.forName("UTF-8"),
  				WRITE, CREATE, TRUNCATE_EXISTING)) {
  			om.writeValue(w, wfReport);
  		}
  	}
focal_method.class_method_signature: WorkflowReportJSON.save(WorkflowReport wfReport, Path path)
focal_method.full_signature: public void save(WorkflowReport wfReport, Path path)
focal_method.identifier: save
focal_method.invocations: makeObjectMapperForSave newBufferedWriter forName writeValue
focal_method.modifiers: public
focal_method.parameters: (WorkflowReport wfReport, Path path)
focal_method.return: void
focal_method.signature: void save(WorkflowReport wfReport, Path path)