Mercurial > lada > lada-server
diff src/main/java/de/intevation/lada/importer/laf/LafRawData.java @ 1097:186d602e031a
Merged branch schema-update into default.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 14 Oct 2016 18:17:42 +0200 |
parents | |
children | 7683c4162746 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/importer/laf/LafRawData.java Fri Oct 14 18:17:42 2016 +0200 @@ -0,0 +1,115 @@ +package de.intevation.lada.importer.laf; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class LafRawData { + + private List<LafRawData.Probe> probe; + + public LafRawData () { + this.probe = new ArrayList<LafRawData.Probe>(); + } + + public class Probe { + private Map<String, String> attributes; + private List<LafRawData.Messung> messung; + private List<Map<String, String>> kommentar; + private List<Map<String, String>> zusatzwert; + private List<Map<String, String>> ort; + + public Probe() { + this.attributes = new HashMap<String, String>(); + this.ort = new ArrayList<Map<String, String>>(); + this.kommentar = new ArrayList<Map<String, String>>(); + this.zusatzwert = new ArrayList<Map<String, String>>(); + this.messung = new ArrayList<LafRawData.Messung>(); + } + + public void addAttribute(String key, String value) { + this.attributes.put(key, value); + } + + public Map<String, String> getAttributes() { + return this.attributes; + } + + public void addMessung(LafRawData.Messung messung) { + this.messung.add(messung); + } + + public List<LafRawData.Messung> getMessungen() { + return this.messung; + } + + public void addKommentar(Map<String, String> kommentar) { + this.kommentar.add(kommentar); + } + + public List<Map<String, String>> getKommentare() { + return this.kommentar; + } + + public void addZusatzwert(Map<String, String> zusatzwert) { + this.zusatzwert.add(zusatzwert); + } + + public List<Map<String, String>> getZusatzwerte() { + return this.zusatzwert; + } + + public void addOrt(Map<String, String> ort) { + this.ort.add(ort); + } + + public List<Map<String, String>> getOrte() { + return this.ort; + } + }; + + public class Messung { + private Map<String, String> attributes; + private List<Map<String, String>> messwert; + private List<Map<String, String>> kommentar; + + public Messung() { + this.attributes = new HashMap<String, String>(); + this.messwert = new ArrayList<Map<String, String>>(); + this.kommentar = new ArrayList<Map<String, String>>(); + } + + public void addAttribute(String key, String value) { + this.attributes.put(key, value); + } + + public Map<String, String> getAttributes() { + return this.attributes; + } + + public void addMesswert(Map<String, String> messwert) { + this.messwert.add(messwert); + } + + public List<Map<String, String>> getMesswerte() { + return this.messwert; + } + + public void addKommentar(Map<String, String> kommentar) { + this.kommentar.add(kommentar); + } + } + + public void addProbe(LafRawData.Probe probe) { + this.probe.add(probe); + } + + public List<LafRawData.Probe> getProben() { + return this.probe; + } + + public int count() { + return this.probe.size(); + } +}