comparison artifacts/src/main/java/org/dive4elements/river/artifacts/states/MinMaxState.java @ 8618:42fc26e463db

Remove another obsolete check for an unused (and removed) config value
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 25 Mar 2015 18:23:22 +0100
parents e4606eae8ea5
children 0a5239a1e46e
comparison
equal deleted inserted replaced
8617:b8493c4bdf0c 8618:42fc26e463db
45 select.setAttributeNS( 45 select.setAttributeNS(
46 ArtifactNamespaceContext.NAMESPACE_URI, 46 ArtifactNamespaceContext.NAMESPACE_URI,
47 "art:type", 47 "art:type",
48 getType()); 48 getType());
49 49
50 String[] defMinMax = getDefaults(artifact, name); 50 String[] defMinMax = getMinMaxDefaults(artifact, name);
51 51
52 Element min = ProtocolUtils.createArtNode( 52 Element min = ProtocolUtils.createArtNode(
53 creator, 53 creator,
54 "min", 54 "min",
55 new String[] { "value", "default" }, 55 new String[] { "value", "default" },
105 return rawValue.split(";"); 105 return rawValue.split(";");
106 } 106 }
107 107
108 108
109 /** 109 /**
110 * This method returns the default values for min and max. If the static
111 * field DefaultState.USE_DEFAULTS is set, the minimum and maximum inserted
112 * by the user is returned as string. Otherwise, the absolute minimum and
113 * maximum are returned.
114 *
115 * @param artifact The D4EArtifact.
116 * @param name The name of the parameter.
117 *
118 * @return a string array [min,max] that contains the minimum and maximum
119 * values for the parameter <i>name</i>.
120 */
121 protected String[] getDefaults(Artifact artifact, String name) {
122 if (DefaultState.USE_DEFAULTS) {
123 String[] tmp = getMinMaxByParameter(artifact, name);
124
125 return tmp != null ? tmp : getMinMaxDefaults(artifact, name);
126 }
127 else {
128 return getMinMaxDefaults(artifact, name);
129 }
130 }
131
132
133 /**
134 * Returns a string array with minimum and maximum inserted by the user as 110 * Returns a string array with minimum and maximum inserted by the user as
135 * [min,max]. 111 * [min,max].
136 * 112 *
137 * @param artifact The D4EArtifact that stores the parameter. 113 * @param artifact The D4EArtifact that stores the parameter.
138 * @param name The name of the parameter for raw min/max value string. 114 * @param name The name of the parameter for raw min/max value string.

http://dive4elements.wald.intevation.org