wf.readMetadata();
String workflowContent = MyExperimentRESTClient.getWorkflowContent(wf);
generator.setMigrationComponent(wf, workflowContent, parameters);
} catch (Exception e) {
log.warn("An error occured querying myExperiment migration component.", e.getMessage());
throw new PlanningException("An error occured querying myExperiment migration component", e);
}
}
// Add QA components
addQaComponents(generator, measures, sourceMimetype, targetMimetype);
// Create digital object
ByteArrayOutputStream out = new ByteArrayOutputStream();
OutputStreamWriter writer = new OutputStreamWriter(out);
try {
generator.generate(writer);
} catch (IOException e) {
log.warn("An error occured generating the executable plan.", e.getMessage());
throw new PlanningException("An error occured generating the executable plan.", e);
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException e) {
log.warn("An error occured closing the executable plan generator writer.", e.getMessage());
throw new PlanningException("An error occured closing the executable plan generator writer.", e);
}
}
}
byte[] data = out.toByteArray();