diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java @ 2743:10e6400d4166

Added (dummy-) implementation of relative point facet in staticwkms case. flys-artifacts/trunk@4478 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 23 May 2012 13:48:20 +0000
parents 0143b44631cc
children b63017afbca8
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Wed May 23 11:02:50 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java	Wed May 23 13:48:20 2012 +0000
@@ -20,6 +20,7 @@
 
 import de.intevation.flys.artifacts.model.CrossSectionWaterLineFacet;
 import de.intevation.flys.artifacts.model.FacetTypes;
+import de.intevation.flys.artifacts.model.RelativePointFacet;
 import de.intevation.flys.artifacts.model.WKms;
 import de.intevation.flys.artifacts.model.WKmsFacet;
 import de.intevation.flys.artifacts.model.WKmsFactory;
@@ -48,10 +49,6 @@
     private static Logger logger =
         Logger.getLogger(StaticWKmsArtifact.class);
 
-    /** XPath to access initial parameter. */
-    public static final String XPATH_DATA =
-        "/art:action/art:ids/@value";
-
     public static final String STATIC_STATE_NAME =
         "state.additional_wkms.static";
 
@@ -84,8 +81,7 @@
 
         List<Facet> fs = new ArrayList<Facet>();
         logger.debug(XMLUtils.toString(data));
-        String code = XMLUtils.xpathString(
-            data, XPATH_DATA, ArtifactNamespaceContext.INSTANCE);
+        String code = getDatacageIDValue(data);
 
         // TODO Go for JSON, one day.
         //ex.: flood_protection-wstv-114-12
@@ -126,8 +122,11 @@
                     facetDescription);
                 Facet csFacet = new CrossSectionWaterLineFacet(0,
                     facetDescription);
+                Facet rpFacet = new RelativePointFacet(facetDescription);
+
                 fs.add(wKmsFacet);
                 fs.add(csFacet);
+                fs.add(rpFacet);
                 facets.put(state.getID(), fs);
             }
         }

http://dive4elements.wald.intevation.org