annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/ExtendedInputData.java @ 1139:3a28fef65500

dummy merge for repo head
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:15:16 +0200
parents f953c9a559d8
children
rev   line source
1115
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
1 /*
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
3 *
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
5 * Read the file LGPL.txt coming with the software for details
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
7 */
f953c9a559d8 Added license file and license headers.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 803
diff changeset
8
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.state;
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 /**
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
12 * This class is used to save the relation between two attributes. Mainly used
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
13 * to save the relation between a measurement and the parameter it belongs to.
803
feae2f9d6c6f Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 796
diff changeset
14 *
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
15 * @see MeasurementState
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 */
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 public class ExtendedInputData extends DefaultInputData {
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
20 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
21 * The separater used to separate measurement ids and parameter ids.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
22 */
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 public static final String SEPARATOR = ";";
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
25 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
26 * The parameter this object belongs to.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
27 */
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28 protected String parameterid;
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
30 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
31 * Constructcor.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
32 *
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
33 * @param name
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
34 * @param value
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
35 * @param object
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
36 * @param parameterid
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
37 */
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 public ExtendedInputData(
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 String name,
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 String value,
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 Object object,
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 String parameterid)
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 {
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44 super(name, value, object);
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
45 this.parameterid = parameterid;
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
46 }
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
47
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
48 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
49 * Return the parameter ids this object belongs to.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
50 *
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
51 * @return the parameter id.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
52 */
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 public String getParameterID() {
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
54 return parameterid;
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 }
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
57 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
58 * Set the parameter ids.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
59 *
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
60 * @param parameterid Parameter ids.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
61 */
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 public void setParameter(String parameterid) {
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 this.parameterid = parameterid;
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 }
786
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
65
796
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
66 /**
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
67 * Return all parameter ids as array.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
68 *
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
69 * @return Array of parameter ids.
a5526908f92f Added javadoc in state package.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 786
diff changeset
70 */
786
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
71 public String[] splitParameter() {
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
72 if (parameterid != null)
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
73 return parameterid.split(SEPARATOR);
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
74
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
75 return null;
c907636c0288 Added a method to ExtendedInputData to retrieve the parameter ids as array (analog to splitValue() in DefaultInputData).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 785
diff changeset
76 }
785
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 }
e764cab8c885 Save the relation between selected measurement and the parameter it belongs to (issue210). TODO: Adapt sql statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org