changeset 7337:3df290c09c21

BedHeightsArtifact: Use FacetTypes, eliminate local facet type definition.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 15 Oct 2013 17:38:50 +0200
parents 6b344b0e5245
children f37c7e183b5e
files artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Tue Oct 15 17:31:44 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/BedHeightsArtifact.java	Tue Oct 15 17:38:50 2013 +0200
@@ -21,19 +21,21 @@
 import org.dive4elements.artifacts.Artifact;
 import org.dive4elements.artifacts.CallMeta;
 import org.dive4elements.artifacts.common.utils.XMLUtils;
+import org.dive4elements.river.artifacts.model.FacetTypes;
 import org.dive4elements.river.artifacts.model.minfo.BedHeightFacet;
 import org.dive4elements.river.artifacts.model.minfo.BedHeightFactory;
 import org.dive4elements.river.artifacts.states.StaticState;
 
 public class BedHeightsArtifact
 extends      AbstractStaticStateArtifact
+implements   FacetTypes
 {
     /** The logger for this class. */
     private static Logger logger =
         Logger.getLogger(BedHeightsArtifact.class);
 
+    /** Artifact name. */
     private static final String NAME = "bedheights";
-    private static final String STATIC_FACET_NAME = "bedheight";
 
     static {
         // TODO: Move to configuration.
@@ -100,7 +102,7 @@
                 String bedHName = BedHeightFactory.getHeightName(btype, hId);
 
                 Facet facet = new BedHeightFacet(
-                        STATIC_FACET_NAME, bedHName, type);
+                        BEDHEIGHT, bedHName, type);
 
                 ArrayList<Facet> facets = new ArrayList<Facet>(1);
                 facets.add(facet);

http://dive4elements.wald.intevation.org