private void reportOnWorkflow( String workflowAccession, WorkflowRunStatus status, Date earlyDate, Date lateDate) throws IOException { String title = ""; if (workflowAccession != null) { title = "workflow_" + workflowAccession; } if (status != null) { title += "status_" + status.name(); } if (earlyDate != null) { title += "from" + dateFormat.format(earlyDate); } if (lateDate != null) { title += "to" + dateFormat.format(lateDate); } initWriter(title); String report; try { Integer workflowParameter = null; if (workflowAccession != null) { workflowParameter = Integer.parseInt(workflowAccession); } report = metadata.getWorkflowRunReport(workflowParameter, status, earlyDate, lateDate); } catch (RuntimeException e) { Log.fatal("Workflow not found", e); ret = new ReturnValue(ReturnValue.INVALIDPARAMETERS); return; } if (options.has("human")) { writer.write(TabExpansionUtil.expansion(report)); return; } writer.write(report); }
private void reportOnWorkflowRun(String workflowRunAccession) throws IOException { String title = "workflowrun_" + workflowRunAccession; initWriter(title); String report; try { report = metadata.getWorkflowRunReport(Integer.parseInt(workflowRunAccession)); } catch (RuntimeException e) { println("Workflow run not found"); ret = new ReturnValue(ReturnValue.INVALIDPARAMETERS); return; } if (options.has("human")) { writer.write(TabExpansionUtil.expansion(report)); return; } writer.write(report); }