diff --git a/src/main/java/org/hbp/mip/model/algorithm/AlgoConstraint.java b/src/main/java/org/hbp/mip/model/algorithm/AlgoConstraint.java new file mode 100644 index 0000000000000000000000000000000000000000..af90d4291cd2d2c8fa849542f9fd3930e062a10e --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/AlgoConstraint.java @@ -0,0 +1,54 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AlgoConstraint { + + private ConstrVariable variable; + + private ConstrMinMax groupings; + + private ConstrMinMax covariables; + + private Boolean mixed; + + + public ConstrVariable getVariable() { + return variable; + } + + public void setVariable(ConstrVariable variable) { + this.variable = variable; + } + + public ConstrMinMax getGroupings() { + return groupings; + } + + public void setGroupings(ConstrMinMax groupings) { + this.groupings = groupings; + } + + public ConstrMinMax getCovariables() { + return covariables; + } + + public void setCovariables(ConstrMinMax covariables) { + this.covariables = covariables; + } + + public Boolean getMixed() { + return mixed; + } + + public void setMixed(Boolean mixed) { + this.mixed = mixed; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/AlgoParameter.java b/src/main/java/org/hbp/mip/model/algorithm/AlgoParameter.java new file mode 100644 index 0000000000000000000000000000000000000000..2b23d14fd89549fa5cf5d69f111ddd6c2c7839e0 --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/AlgoParameter.java @@ -0,0 +1,74 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class AlgoParameter { + + private String code; + + private String label; + + private Integer defaultValue; + + private String type; + + private ParamConstraint constraints; + + private String description; + + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public Integer getDefaultValue() { + return defaultValue; + } + + public void setDefaultValue(Integer defaultValue) { + this.defaultValue = defaultValue; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ParamConstraint getConstraints() { + return constraints; + } + + public void setConstraints(ParamConstraint constraints) { + this.constraints = constraints; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/Algorithm.java b/src/main/java/org/hbp/mip/model/algorithm/Algorithm.java new file mode 100644 index 0000000000000000000000000000000000000000..2b2897c0818259663684780fdfd86f5e19b92f47 --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/Algorithm.java @@ -0,0 +1,108 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; + +import java.util.List; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Algorithm { + + private String code; + + private String label; + + private List type; + + private String environment; + + private String description; + + private List<AlgoParameter> parameters; + + @JsonProperty("docker_image") + private String dockerImage; + + private AlgoConstraint constraints; + + private Boolean disable; + + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public List getType() { + return type; + } + + public void setType(List type) { + this.type = type; + } + + public String getEnvironment() { + return environment; + } + + public void setEnvironment(String environment) { + this.environment = environment; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List<AlgoParameter> getParameters() { + return parameters; + } + + public void setParameters(List<AlgoParameter> parameters) { + this.parameters = parameters; + } + + public String getDockerImage() { + return dockerImage; + } + + public void setDockerImage(String dockerImage) { + this.dockerImage = dockerImage; + } + + public AlgoConstraint getConstraints() { + return constraints; + } + + public void setConstraints(AlgoConstraint constraints) { + this.constraints = constraints; + } + + public Boolean getDisable() { + return disable; + } + + public void setDisable(Boolean disable) { + this.disable = disable; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/Catalog.java b/src/main/java/org/hbp/mip/model/algorithm/Catalog.java new file mode 100644 index 0000000000000000000000000000000000000000..c2c8c451f3a0e7a42635529bcf70ba13d4048d3e --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/Catalog.java @@ -0,0 +1,28 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; + +import java.util.List; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class Catalog { + + private List<Algorithm> algorithms; + + private List<Algorithm> validations; + + + public List<Algorithm> getAlgorithms() { + return algorithms; + } + + public void setAlgorithms(List<Algorithm> algorithms) { + this.algorithms = algorithms; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/ConstrMinMax.java b/src/main/java/org/hbp/mip/model/algorithm/ConstrMinMax.java new file mode 100644 index 0000000000000000000000000000000000000000..6532175bbae98c583722dbf4050362901ecc2bd7 --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/ConstrMinMax.java @@ -0,0 +1,37 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ConstrMinMax { + + @JsonProperty("min_count") + private Integer minCount; + + @JsonProperty("max_count") + private Integer maxCount; + + + public Integer getMinCount() { + return minCount; + } + + public void setMinCount(Integer minCount) { + this.minCount = minCount; + } + + public Integer getMaxCount() { + return maxCount; + } + + public void setMaxCount(Integer maxCount) { + this.maxCount = maxCount; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/ConstrVariable.java b/src/main/java/org/hbp/mip/model/algorithm/ConstrVariable.java new file mode 100644 index 0000000000000000000000000000000000000000..21a35158fff0e27a4a5fc9051a08b2ccab8aba9c --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/ConstrVariable.java @@ -0,0 +1,44 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ConstrVariable { + + private Boolean real; + + private Boolean binomial; + + private Boolean polynomial; + + + public Boolean getReal() { + return real; + } + + public void setReal(Boolean real) { + this.real = real; + } + + public Boolean getBinomial() { + return binomial; + } + + public void setBinomial(Boolean binomial) { + this.binomial = binomial; + } + + public Boolean getPolynomial() { + return polynomial; + } + + public void setPolynomial(Boolean polynomial) { + this.polynomial = polynomial; + } +} diff --git a/src/main/java/org/hbp/mip/model/algorithm/ParamConstraint.java b/src/main/java/org/hbp/mip/model/algorithm/ParamConstraint.java new file mode 100644 index 0000000000000000000000000000000000000000..0cc94d30a86c3d09fc1d7abec78b4d016b77d801 --- /dev/null +++ b/src/main/java/org/hbp/mip/model/algorithm/ParamConstraint.java @@ -0,0 +1,34 @@ +package org.hbp.mip.model.algorithm; + +import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModel; + +/** + * Created by mirco on 17.06.16. + */ + +@ApiModel +@JsonInclude(JsonInclude.Include.NON_NULL) +public class ParamConstraint { + + private Integer min; + + private Integer max; + + + public Integer getMin() { + return min; + } + + public void setMin(Integer min) { + this.min = min; + } + + public Integer getMax() { + return max; + } + + public void setMax(Integer max) { + this.max = max; + } +}