[Dive4elements-commits] [PATCH 01 of 11] Documentation of DA66Parser
Wald Commits
scm-commit at wald.intevation.org
Thu Dec 27 16:10:27 CET 2012
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1356610351 -3600
# Node ID e67d396ed65dfb8f3118794e019a2e707c98de15
# Parent 6016b9aa827aab6bf396be0a4ea32dc1c563f8d8
Documentation of DA66Parser.
diff -r 6016b9aa827a -r e67d396ed65d flys-backend/src/main/java/de/intevation/flys/importer/parsers/DA66Parser.java
--- a/flys-backend/src/main/java/de/intevation/flys/importer/parsers/DA66Parser.java Wed Dec 19 14:59:55 2012 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/parsers/DA66Parser.java Thu Dec 27 13:12:31 2012 +0100
@@ -32,6 +32,7 @@
private static String HEAD_GEOM = "66"; // "Values"
private static String HEAD_ENDG = "88"; // Probably never used.
+ /** Regex to match lines of files in da66 format. */
private static final Pattern LINE_PATTERN =
Pattern.compile("^([0-9 -]{2})" + // Type (00|66|88)
"([0-9 -]{5})" + // unset
@@ -164,20 +165,31 @@
protected Map<Double, List<XY>> data;
+ /** Trivial constructor. */
public DA66Parser() {
data = new TreeMap<Double, List<XY>>();
}
+
+ /** Get the description of the cross section parsed. */
@Override
public String getDescription() {
+ // TODO place file name here
return "da66-dummy";
}
+
+ /** Get the year of this cross sections measurement. */
@Override
public Integer getYear() {
return 2012;
}
+
+ /**
+ * Return the data parsed.
+ * @return map of stations (km) to list of points.
+ */
@Override
public Map<Double, List<XY>> getData() {
return data;
@@ -187,6 +199,7 @@
this.data = data;
}
+ // TODO yet unused, use for description.
private static final String removeExtension(String name) {
int index = name.lastIndexOf('.');
return index == -1
More information about the Dive4elements-commits
mailing list