comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/ExtendedInputData.java @ 875:5e9efdda6894

merged gnv-artifacts/1.0
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:13:56 +0200
parents feae2f9d6c6f
children f953c9a559d8
comparison
equal deleted inserted replaced
722:bb3ffe7d719e 875:5e9efdda6894
1 package de.intevation.gnv.state;
2
3 /**
4 * This class is used to save the relation between two attributes. Mainly used
5 * to save the relation between a measurement and the parameter it belongs to.
6 *
7 * @see MeasurementState
8 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
9 */
10 public class ExtendedInputData extends DefaultInputData {
11
12 /**
13 * The separater used to separate measurement ids and parameter ids.
14 */
15 public static final String SEPARATOR = ";";
16
17 /**
18 * The parameter this object belongs to.
19 */
20 protected String parameterid;
21
22 /**
23 * Constructcor.
24 *
25 * @param name
26 * @param value
27 * @param object
28 * @param parameterid
29 */
30 public ExtendedInputData(
31 String name,
32 String value,
33 Object object,
34 String parameterid)
35 {
36 super(name, value, object);
37 this.parameterid = parameterid;
38 }
39
40 /**
41 * Return the parameter ids this object belongs to.
42 *
43 * @return the parameter id.
44 */
45 public String getParameterID() {
46 return parameterid;
47 }
48
49 /**
50 * Set the parameter ids.
51 *
52 * @param parameterid Parameter ids.
53 */
54 public void setParameter(String parameterid) {
55 this.parameterid = parameterid;
56 }
57
58 /**
59 * Return all parameter ids as array.
60 *
61 * @return Array of parameter ids.
62 */
63 public String[] splitParameter() {
64 if (parameterid != null)
65 return parameterid.split(SEPARATOR);
66
67 return null;
68 }
69 }
70 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org