From 6875bf3cb5c193048c9cebf85bd8fc3f3ede3539 Mon Sep 17 00:00:00 2001 From: pfurio Date: Fri, 19 May 2017 12:23:24 +0100 Subject: [PATCH 1/6] analysis: First draft of manifest java beans --- .../analysis/tools/manifest/ConfigAttr.java | 1 - .../analysis/tools/manifest/Example.java | 31 ++--- .../tools/manifest/ExampleOption.java | 56 --------- .../analysis/tools/manifest/Execution.java | 107 +++++++++--------- .../analysis/tools/manifest/InputParam.java | 103 ++++++++++++++++- .../analysis/tools/manifest/Manifest.java | 22 ++-- 6 files changed, 170 insertions(+), 150 deletions(-) delete mode 100644 hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ExampleOption.java diff --git a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ConfigAttr.java b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ConfigAttr.java index d0926ac8..6e31de18 100644 --- a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ConfigAttr.java +++ b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ConfigAttr.java @@ -22,7 +22,6 @@ public class ConfigAttr { private String value; public ConfigAttr() { - } public ConfigAttr(String name, String value) { diff --git a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Example.java b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Example.java index 34f40637..ca919c29 100644 --- a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Example.java +++ b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Example.java @@ -16,29 +16,27 @@ package org.opencb.hpg.bigdata.analysis.tools.manifest; -import java.util.List; +import java.util.Map; public class Example { - private String name, executionId; - private List options; + private String name; + private Map params; public Example() { } - public Example(String name, String executionId, List options) { + public Example(String name, Map params) { this.name = name; - this.executionId = executionId; - this.options = options; + this.params = params; } @Override public String toString() { final StringBuilder sb = new StringBuilder("Example{"); sb.append("name='").append(name).append('\''); - sb.append(", executionId='").append(executionId).append('\''); - sb.append(", options=").append(options); + sb.append(", params=").append(params); sb.append('}'); return sb.toString(); } @@ -51,19 +49,12 @@ public void setName(String name) { this.name = name; } - public String getExecutionId() { - return executionId; + public Map getParams() { + return params; } - public void setExecutionId(String executionId) { - this.executionId = executionId; - } - - public List geOptions() { - return options; - } - - public void setOptions(List options) { - this.options = options; + public Example setParams(Map params) { + this.params = params; + return this; } } diff --git a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ExampleOption.java b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ExampleOption.java deleted file mode 100644 index a6093580..00000000 --- a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/ExampleOption.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2015 OpenCB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.opencb.hpg.bigdata.analysis.tools.manifest; - -public class ExampleOption { - - private String paramName, value; - - public ExampleOption() { - - } - - public ExampleOption(String executionId, String value) { - this.paramName = executionId; - this.value = value; - } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("ExampleOption{"); - sb.append("paramName='").append(paramName).append('\''); - sb.append(", value='").append(value).append('\''); - sb.append('}'); - return sb.toString(); - } - - public String getParamName() { - return paramName; - } - - public void setParamName(String paramName) { - this.paramName = paramName; - } - - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } -} diff --git a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Execution.java b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Execution.java index 892a19d8..3a1e74ed 100644 --- a/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Execution.java +++ b/hpg-bigdata-analysis/src/main/java/org/opencb/hpg/bigdata/analysis/tools/manifest/Execution.java @@ -20,30 +20,27 @@ public class Execution { - private String id, name, executable, outputParam, testCmd, result; - private List inputParams; - private List inputParamsFromTxt; - private List