diff gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java @ 1090:51f3edc9d743

Added missing classes of the last commit. gnv-artifacts/trunk@1204 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sat, 12 Jun 2010 13:00:45 +0000
parents cc4ec127d666
children f953c9a559d8
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java	Sat Jun 12 12:59:48 2010 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java	Sat Jun 12 13:00:45 2010 +0000
@@ -191,8 +191,8 @@
      */
     protected Object getData(String uuid, CallContext callContext) {
         Collection<Result> result = null;
-        InputData meshLine        = inputData.get("mesh_linestring");
         InputData meshId          = inputData.get("meshid");
+        String    meshLine        = getLineString();
 
         if (meshLine == null) {
             log.error("mesh_linestring is not defined");
@@ -205,7 +205,7 @@
         }
 
         Coordinate [] coords = WKTUtils.toCoordinates(
-            meshLine.getValue());
+            meshLine);
 
         if (coords == null) {
             throw new IllegalStateException("cannot read coordinates");
@@ -243,6 +243,13 @@
     }
 
 
+    protected String getLineString() {
+        InputData meshLine = inputData.get("mesh_linestring");
+
+        return meshLine != null ? meshLine.getValue() : null;
+    }
+
+
     @Override
     protected String getSelectedInputDataName(String uuid, String id) {
         Collection values = getCollection(id, uuid);

http://dive4elements.wald.intevation.org