changeset 7746:56001dce01dd

Upcoming issue1532: Extracted method where 'cloning/initialize' takes place.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Tue, 11 Feb 2014 16:18:11 +0100
parents 1d6b957d8953
children cfa7e2164f87
files artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java
diffstat 1 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Tue Feb 11 12:37:16 2014 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/D4EArtifact.java	Tue Feb 11 16:18:11 2014 +0100
@@ -219,6 +219,16 @@
         }
         setCurrentState(states.get(0));
 
+        handleInitModel(data, context, callMeta);
+
+        filterFacets = buildFilterFacets(data);
+
+        extractOut(data);
+    }
+
+    protected void handleInitModel(Document data, Object context, CallMeta callMeta) {
+        RiverContext flysContext = RiverUtils.getFlysContext(context);
+
         String model = XMLUtils.xpathString(
             data,
             XPATH_MODEL_ARTIFACT,
@@ -235,10 +245,6 @@
                 log.error(adbe, adbe);
             }
         }
-
-        filterFacets = buildFilterFacets(data);
-
-        extractOut(data);
     }
 
     protected void extractOut(Document data) {
@@ -1607,7 +1613,7 @@
             String      out     = entry.getKey();
             List<Facet> filters = entry.getValue();
 
-            log.debug("There are " + filters.size() + " filters for: " +out);
+            log.debug("There are " + filters.size() + " filters for: " + out);
 
             for (Facet filter: filters) {
                 log.debug("  filter: " + filter.getName());

http://dive4elements.wald.intevation.org