comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/ExtendedInputData.java @ 1119:7c4f81f74c47

merged gnv-artifacts
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:00 +0200
parents f953c9a559d8
children
comparison
equal deleted inserted replaced
1027:fca4b5eb8d2f 1119:7c4f81f74c47
1 /*
2 * Copyright (c) 2010 by Intevation GmbH
3 *
4 * This program is free software under the LGPL (>=v2.1)
5 * Read the file LGPL.txt coming with the software for details
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
7 */
8
9 package de.intevation.gnv.state;
10
11 /**
12 * This class is used to save the relation between two attributes. Mainly used
13 * to save the relation between a measurement and the parameter it belongs to.
14 *
15 * @see MeasurementState
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
17 */
18 public class ExtendedInputData extends DefaultInputData {
19
20 /**
21 * The separater used to separate measurement ids and parameter ids.
22 */
23 public static final String SEPARATOR = ";";
24
25 /**
26 * The parameter this object belongs to.
27 */
28 protected String parameterid;
29
30 /**
31 * Constructcor.
32 *
33 * @param name
34 * @param value
35 * @param object
36 * @param parameterid
37 */
38 public ExtendedInputData(
39 String name,
40 String value,
41 Object object,
42 String parameterid)
43 {
44 super(name, value, object);
45 this.parameterid = parameterid;
46 }
47
48 /**
49 * Return the parameter ids this object belongs to.
50 *
51 * @return the parameter id.
52 */
53 public String getParameterID() {
54 return parameterid;
55 }
56
57 /**
58 * Set the parameter ids.
59 *
60 * @param parameterid Parameter ids.
61 */
62 public void setParameter(String parameterid) {
63 this.parameterid = parameterid;
64 }
65
66 /**
67 * Return all parameter ids as array.
68 *
69 * @return Array of parameter ids.
70 */
71 public String[] splitParameter() {
72 if (parameterid != null)
73 return parameterid.split(SEPARATOR);
74
75 return null;
76 }
77 }
78 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org