diff --git a/apiconnector/src/main/java/org/openml/apiconnector/algorithms/ParameterType.java b/apiconnector/src/main/java/org/openml/apiconnector/algorithms/ParameterType.java deleted file mode 100644 index 54420c1b..00000000 --- a/apiconnector/src/main/java/org/openml/apiconnector/algorithms/ParameterType.java +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2017, Jan N. van Rijn - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. Neither the name of the copyright holder nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ -package org.openml.apiconnector.algorithms; - -@Deprecated -public enum ParameterType { - FLAG("flag"), KERNEL("kernel"), BASELEARNER("baselearner"), OPTION("option"), ARRAY("array"); - - private String text; - - ParameterType(String text) { - this.text = text; - } - - /** - * @return The name of this parameter type; - */ - public String getName() { - return this.text; - } - - /** - * Converts a textual description of a parameter into a ParameterType - * - * @param text (String) - * @return the ParameterType - */ - public static ParameterType fromString(String text) { - if (text != null) { - for (ParameterType b : ParameterType.values()) { - if (text.equalsIgnoreCase(b.text)) { - return b; - } - } - } - return null; - } -} diff --git a/apiconnector/src/main/java/org/openml/apiconnector/xml/SetupParameters.java b/apiconnector/src/main/java/org/openml/apiconnector/xml/SetupParameters.java index 450882d0..fc37e2d2 100644 --- a/apiconnector/src/main/java/org/openml/apiconnector/xml/SetupParameters.java +++ b/apiconnector/src/main/java/org/openml/apiconnector/xml/SetupParameters.java @@ -74,6 +74,8 @@ public Map getParametersAsMap() { public class Parameter implements Serializable { private static final long serialVersionUID = -4380189808506822529L; + @XStreamAlias("oml:flow_id") + private Integer flow_id; @XStreamAlias("oml:full_name") private String full_name; @XStreamAlias("oml:parameter_name") @@ -85,16 +87,9 @@ public class Parameter implements Serializable { @XStreamAlias("oml:value") private String value; - public Parameter(String full_name, String parameter_name, - String data_type, String default_value, String value) { - super(); - this.full_name = full_name; - this.parameter_name = parameter_name; - this.data_type = data_type; - this.default_value = default_value; - this.value = value; + public Integer getFlow_id() { + return flow_id; } - public String getFull_name() { return full_name; }