comparison flys-aft/src/main/java/de/intevation/aft/River.java @ 4753:a310aceb2e51

Fetch calculation range (Berechnungsstrecke) for FLYS rivers, too.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 03 Jan 2013 14:19:45 +0100
parents b195fede1c3b
children 04377ccef10a
comparison
equal deleted inserted replaced
4752:ce570c74aa94 4753:a310aceb2e51
18 { 18 {
19 private static Logger log = Logger.getLogger(River.class); 19 private static Logger log = Logger.getLogger(River.class);
20 20
21 protected String name; 21 protected String name;
22 22
23 protected double from;
24 protected double to;
25
23 public River() { 26 public River() {
27 }
28
29 public River(int id1, String name, double from, double to) {
30 super(id1);
31 this.name = name;
32 this.from = from;
33 this.to = to;
24 } 34 }
25 35
26 public River(int id1, int id2, String name) { 36 public River(int id1, int id2, String name) {
27 super(id1, id2); 37 super(id1, id2);
28 this.name = name; 38 this.name = name;
30 40
31 public String getName() { 41 public String getName() {
32 return name; 42 return name;
33 } 43 }
34 44
45 public double getFrom() {
46 return from;
47 }
48
49 public void setFrom(double from) {
50 this.from = from;
51 }
52
53 public double getTo() {
54 return to;
55 }
56
57 public void setTo(double to) {
58 this.to = to;
59 }
60
61 public boolean inside(double x) {
62 return x >= from && x <= to;
63 }
35 64
36 public boolean sync(SyncContext context) throws SQLException { 65 public boolean sync(SyncContext context) throws SQLException {
37 log.info("sync river: " + this); 66 log.info("sync river: " + this);
38 67
39 Map<Long, DIPSGauge> dipsGauges = context.getDIPSGauges(); 68 Map<Long, DIPSGauge> dipsGauges = context.getDIPSGauges();

http://dive4elements.wald.intevation.org