annotate artifacts/src/main/java/org/dive4elements/river/artifacts/model/Module.java @ 8962:708f210ff242

Fetching year informations for waterlevels used in sinfo
author gernotbelger
date Wed, 28 Mar 2018 17:03:11 +0200
parents c26fb37899ca
children
rev   line source
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5994
af13ceeba52a Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5863
diff changeset
6 * documentation coming with Dive4Elements River for details.
5863
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
4897a58c8746 River artifacts: Added new copyright headers.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5831
bd047b71ab37 Repaired internal references
Sascha L. Teichmann <teichmann@intevation.de>
parents: 3630
diff changeset
9 package org.dive4elements.river.artifacts.model;
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
10
7755
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
11 import java.util.List;
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
12
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
13 /**
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
14 * Represents a Module as is is loaded from the config
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
15 */
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
16 public class Module {
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
17
8870
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
18 private final String name;
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
19
8870
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
20 /**
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
21 * Defines an (optional) group name for a module. Modules with the same group name are considered to be in the same group
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
22 * This can be uised to group modules in the front-end
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
23 */
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
24 private final String group;
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
25
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
26 private final boolean selected;
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
27
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
28 private final List<String> rivers;
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
29
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
30 public Module(final String name, final boolean selected, final String group, final List<String> rivers) {
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
31 this.name = name;
8870
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
32 this.group = group;
7755
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
33 this.rivers = rivers;
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
34 this.selected = selected;
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
35 }
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
36
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
37 public String getName() {
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
38 return this.name;
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
39 }
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
40
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
41 public boolean isSelected() {
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
42 return this.selected;
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
43 }
8870
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
44
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
45 public String getGroup() {
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
46 return this.group;
c26fb37899ca Introduced groups for modules. Modules marked with the same group-id, will be put together in the ui.
gernotbelger
parents: 7755
diff changeset
47 }
7755
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
48
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
49 public List<String> getRivers() {
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
50 return this.rivers;
4a85cc6add7f Added list of rivers a module supports.
Raimund Renkert <rrenkert@intevation.de>
parents: 5994
diff changeset
51 }
3630
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
52 }
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
53
28be160b5870 Add a module service. It's now possible to configure the modules which are
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
54 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 tw=80:

http://dive4elements.wald.intevation.org