teichmann@5835: package org.dive4elements.river.client.shared.model; raimund@2505: raimund@2505: import java.io.Serializable; raimund@2505: raimund@2505: import java.util.List; raimund@2505: import java.util.ArrayList; raimund@2505: raimund@2505: public class FixingsOverviewInfo implements Serializable { raimund@2505: raimund@2505: protected List events; raimund@2505: protected String river; raimund@2505: protected double from; raimund@2505: protected double to; raimund@2505: protected int rid; raimund@2505: protected String html; raimund@2505: raimund@2505: protected FixingsOverviewInfo() {} raimund@2505: raimund@2505: public FixingsOverviewInfo( raimund@2505: int rid, raimund@2505: String river, raimund@2505: double from, raimund@2505: double to, raimund@2505: List events, raimund@2505: String html raimund@2505: ) { raimund@2505: this.rid = rid; raimund@2505: this.river = river; raimund@2505: this.from = from; raimund@2505: this.to = to; raimund@2505: this.events = new ArrayList(events); raimund@2505: this.html = html; raimund@2505: } raimund@2505: raimund@2505: public int getRId() { raimund@2505: return this.rid; raimund@2505: } raimund@2505: raimund@2505: public String getRiver() { raimund@2505: return this.river; raimund@2505: } raimund@2505: raimund@2505: public double getFrom() { raimund@2505: return this.from; raimund@2505: } raimund@2505: raimund@2505: public double getTo() { raimund@2505: return this.to; raimund@2505: } raimund@2505: raimund@2505: public List getEvents() { raimund@2505: return this.events; raimund@2505: } raimund@2505: raimund@2505: public FixEvent getEventByCId(String cid) { raimund@2505: for (int i = 0; i < events.size(); i++) { raimund@2505: if (events.get(i).getCId().equals(cid)) { raimund@2505: return events.get(i); raimund@2505: } raimund@2505: } raimund@2505: return null; raimund@2505: } raimund@2505: raimund@2505: public String getHTML() { raimund@2505: return this.html; raimund@2505: } raimund@2505: raimund@2505: raimund@2505: public static class FixEvent implements Serializable { raimund@2505: protected String cid; raimund@2505: protected String date; raimund@2536: protected String description; raimund@2505: protected List sectors; raimund@2505: raimund@2505: protected FixEvent () {} raimund@2505: raimund@2505: public FixEvent( raimund@2505: String cid, raimund@2505: String date, raimund@2536: String description, raimund@2505: List sectors raimund@2505: ) { raimund@2505: this.cid = cid; raimund@2505: this.date = date; raimund@2536: this.description = description; raimund@2505: this.sectors = new ArrayList(sectors); raimund@2505: } raimund@2505: raimund@2505: public String getCId() { raimund@2505: return this.cid; raimund@2505: } raimund@2505: raimund@2505: public String getDate() { raimund@2505: return this.date; raimund@2505: } raimund@2505: raimund@2536: public String getDescription() { raimund@2536: return this.description; raimund@2505: } raimund@2505: raimund@2505: public List getSectors() { raimund@2505: return this.sectors; raimund@2505: } raimund@2505: } raimund@2505: raimund@2505: public static class Sector implements Serializable { raimund@2505: protected int cls; raimund@2505: protected double from; raimund@2505: protected double to; raimund@2505: raimund@2505: protected Sector () {} raimund@2505: raimund@2505: public Sector( raimund@2505: int cls, raimund@2505: double from, raimund@2505: double to raimund@2505: ) { raimund@2505: this.cls = cls; raimund@2505: this.from = from; raimund@2505: this.to = to; raimund@2505: } raimund@2505: raimund@2505: public int getCls() { raimund@2505: return this.cls; raimund@2505: } raimund@2505: raimund@2505: public double getFrom() { raimund@2505: return this.from; raimund@2505: } raimund@2505: raimund@2505: public double getTo() { raimund@2505: return this.to; raimund@2505: } raimund@2505: } raimund@2505: } raimund@2505: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :