annotate backend/src/main/java/org/dive4elements/river/model/Porosity.java @ 8721:1083cb887ffb

(issue1754) Do not filter BedHeightSoundings to range. This is more symetric to WINFO Raw data and fixes the problematic master artifact information loss from issue1754 as the information from the master (range) is no longer required.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 27 Apr 2015 17:35:28 +0200
parents 02711de579cc
children
rev   line source
7840
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2 * Software engineering by Intevation GmbH
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3 *
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6 * documentation coming with Dive4Elements River for details.
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 */
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 package org.dive4elements.river.model;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 import java.io.Serializable;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 import java.util.List;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 import javax.persistence.Entity;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 import javax.persistence.Id;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 import javax.persistence.Table;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 import javax.persistence.GeneratedValue;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 import javax.persistence.Column;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19 import javax.persistence.SequenceGenerator;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 import javax.persistence.GenerationType;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 import javax.persistence.JoinColumn;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 import javax.persistence.OneToOne;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 import javax.persistence.OneToMany;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 @Entity
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27 @Table(name = "porosity")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 public class Porosity implements Serializable {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 private Integer id;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32 private River river;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34 private Depth depth;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
35
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
36 private List<PorosityValue> values;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
38 private String description;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
39
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
40 private TimeInterval timeInterval;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
42 public Porosity() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
43 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
45
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
46 public Porosity(
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47 River river,
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48 Depth depth,
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49 String desc,
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
50 TimeInterval timeInterval
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
51 ) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
52 this.river = river;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
53 this.depth = depth;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
54 this.description = desc;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
55 this.timeInterval = timeInterval;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
56 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
57
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
58 @Id
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
59 @SequenceGenerator(
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
60 name = "SEQUENCE_POROSITY_ID_SEQ",
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
61 sequenceName = "POROSITY_ID_SEQ",
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
62 allocationSize = 1)
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
63 @GeneratedValue(
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
64 strategy = GenerationType.SEQUENCE,
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
65 generator = "SEQUENCE_POROSITY_ID_SEQ")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
66 @Column(name = "id")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
67 public Integer getId() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
68 return id;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
69 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
70
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
71 public void setId(Integer id) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
72 this.id = id;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
73 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
74
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
75 @OneToOne
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
76 @JoinColumn(name = "river_id" )
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
77 public River getRiver() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
78 return river;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
79 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
80
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
81 public void setRiver(River river) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
82 this.river = river;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
83 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
84
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
85 @OneToOne
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
86 @JoinColumn(name = "depth_id")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
87 public Depth getDepth() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
88 return depth;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
89 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
90
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
91 public void setDepth(Depth depth) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
92 this.depth = depth;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
93 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
94
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
95 @Column(name = "description")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
96 public String getDescription() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
97 return description;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
98 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
99
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
100 public void setDescription(String description) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
101 this.description = description;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
102 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
103
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
104 @OneToOne
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
105 @JoinColumn(name = "time_interval_id")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
106 public TimeInterval getTimeInterval() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
107 return timeInterval;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
108 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
109
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
110 public void setTimeInterval(TimeInterval timeInterval) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
111 this.timeInterval = timeInterval;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
112 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
113
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
114 @OneToMany
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
115 @JoinColumn(name="porosity_id")
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
116 public List<PorosityValue> getValues() {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
117 return values;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
118 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
119
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
120 public void setValues(List<PorosityValue> values) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
121 this.values = values;
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
122 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
123
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
124 public void addValue(PorosityValue value) {
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
125 this.values.add(value);
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
126 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
127 }
02711de579cc Added model, parser and importer for porosities.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
128 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org