Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/artifacts/bundu/bezugswst/BunduAccess.java @ 9432:d194c5b24bf8
Added bundu bzws w calculation and longitudinal sections of wspl and depth
author | mschaefer |
---|---|
date | Mon, 20 Aug 2018 09:46:02 +0200 |
parents | 6ebc9357550c |
children | e60584f2a531 |
comparison
equal
deleted
inserted
replaced
9431:eeea16ea0980 | 9432:d194c5b24bf8 |
---|---|
9 package org.dive4elements.river.artifacts.bundu.bezugswst; | 9 package org.dive4elements.river.artifacts.bundu.bezugswst; |
10 | 10 |
11 import org.apache.log4j.Logger; | 11 import org.apache.log4j.Logger; |
12 import org.dive4elements.river.artifacts.D4EArtifact; | 12 import org.dive4elements.river.artifacts.D4EArtifact; |
13 import org.dive4elements.river.artifacts.access.FixAnalysisAccess; | 13 import org.dive4elements.river.artifacts.access.FixAnalysisAccess; |
14 import org.dive4elements.river.artifacts.states.SoundingsSelect; | |
14 | 15 |
15 public class BunduAccess extends FixAnalysisAccess { | 16 public class BunduAccess extends FixAnalysisAccess { |
16 | 17 |
17 private static Logger log = Logger.getLogger(BunduAccess.class); | 18 private static Logger log = Logger.getLogger(BunduAccess.class); |
18 | 19 |
84 return null; | 85 return null; |
85 } | 86 } |
86 | 87 |
87 private boolean isCalculateMissingValue() { // probably public | 88 private boolean isCalculateMissingValue() { // probably public |
88 return getBoolean("missing_volume"); | 89 return getBoolean("missing_volume"); |
90 } | |
91 | |
92 public int getBedHeightID() { | |
93 | |
94 final String data = getString("soundings"); | |
95 | |
96 if (data == null) { | |
97 log.warn("No 'soundings' parameter specified!"); | |
98 return 0; | |
99 } | |
100 else { | |
101 log.debug("getBedHeightIDs(): data=" + data); | |
102 } | |
103 | |
104 final String[] parts = data.split(";"); | |
105 | |
106 int singleID = 0; | |
107 | |
108 if (data.indexOf(SoundingsSelect.PREFIX_SINGLE) >= 0) { | |
109 final String tmp = data.replace(SoundingsSelect.PREFIX_SINGLE, ""); | |
110 try { | |
111 singleID = Integer.parseInt(tmp); | |
112 } | |
113 catch (final NumberFormatException nfe) { | |
114 log.warn("Cannot parse int from string: '" + tmp + "'"); | |
115 } | |
116 } | |
117 return singleID; | |
89 } | 118 } |
90 | 119 |
91 // /** Access the reference date period, return null in case of 'errors'. */ | 120 // /** Access the reference date period, return null in case of 'errors'. */ |
92 // public DateRange getReferencePeriod() { | 121 // public DateRange getReferencePeriod() { |
93 // if (this.referencePeriod == null) { | 122 // if (this.referencePeriod == null) { |