comparison flys-client/src/main/java/org/dive4elements/river/client/shared/model/FixingsOverviewInfo.java @ 5834:f507086aa94b

Repaired internal references.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:31:32 +0200
parents flys-client/src/main/java/de/intevation/flys/client/shared/model/FixingsOverviewInfo.java@256b458cc7ea
children 821a02bbfb4e
comparison
equal deleted inserted replaced
5833:a2bdc0f524e8 5834:f507086aa94b
1 package de.intevation.flys.client.shared.model;
2
3 import java.io.Serializable;
4
5 import java.util.List;
6 import java.util.ArrayList;
7
8 public class FixingsOverviewInfo implements Serializable {
9
10 protected List<FixEvent> events;
11 protected String river;
12 protected double from;
13 protected double to;
14 protected int rid;
15 protected String html;
16
17 protected FixingsOverviewInfo() {}
18
19 public FixingsOverviewInfo(
20 int rid,
21 String river,
22 double from,
23 double to,
24 List<FixEvent> events,
25 String html
26 ) {
27 this.rid = rid;
28 this.river = river;
29 this.from = from;
30 this.to = to;
31 this.events = new ArrayList<FixEvent>(events);
32 this.html = html;
33 }
34
35 public int getRId() {
36 return this.rid;
37 }
38
39 public String getRiver() {
40 return this.river;
41 }
42
43 public double getFrom() {
44 return this.from;
45 }
46
47 public double getTo() {
48 return this.to;
49 }
50
51 public List<FixEvent> getEvents() {
52 return this.events;
53 }
54
55 public FixEvent getEventByCId(String cid) {
56 for (int i = 0; i < events.size(); i++) {
57 if (events.get(i).getCId().equals(cid)) {
58 return events.get(i);
59 }
60 }
61 return null;
62 }
63
64 public String getHTML() {
65 return this.html;
66 }
67
68
69 public static class FixEvent implements Serializable {
70 protected String cid;
71 protected String date;
72 protected String description;
73 protected List<Sector> sectors;
74
75 protected FixEvent () {}
76
77 public FixEvent(
78 String cid,
79 String date,
80 String description,
81 List<Sector> sectors
82 ) {
83 this.cid = cid;
84 this.date = date;
85 this.description = description;
86 this.sectors = new ArrayList<Sector>(sectors);
87 }
88
89 public String getCId() {
90 return this.cid;
91 }
92
93 public String getDate() {
94 return this.date;
95 }
96
97 public String getDescription() {
98 return this.description;
99 }
100
101 public List<Sector> getSectors() {
102 return this.sectors;
103 }
104 }
105
106 public static class Sector implements Serializable {
107 protected int cls;
108 protected double from;
109 protected double to;
110
111 protected Sector () {}
112
113 public Sector(
114 int cls,
115 double from,
116 double to
117 ) {
118 this.cls = cls;
119 this.from = from;
120 this.to = to;
121 }
122
123 public int getCls() {
124 return this.cls;
125 }
126
127 public double getFrom() {
128 return this.from;
129 }
130
131 public double getTo() {
132 return this.to;
133 }
134 }
135 }
136 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org