[PATCH 10 of 15] Handle porosity facets in a processor

Wald Commits scm-commit at wald.intevation.org
Wed Apr 30 15:30:13 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1398864147 -7200
# Node ID 693778752ee7c49c6fdaac63dd4747c554daa7ed
# Parent  a95f1265da8e511c284228fe175ba663cf70c447
Handle porosity facets in a processor.

diff -r a95f1265da8e -r 693778752ee7 artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityPorosityProcessor.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityPorosityProcessor.java	Wed Apr 30 15:20:41 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/process/BedQualityPorosityProcessor.java	Wed Apr 30 15:22:27 2014 +0200
@@ -20,6 +20,7 @@
 import org.dive4elements.river.themes.ThemeDocument;
 
 import org.dive4elements.river.artifacts.model.minfo.BedParametersResult;
+import org.dive4elements.river.artifacts.model.minfo.Porosity;
 
 public class BedQualityPorosityProcessor extends DefaultProcessor {
 
@@ -48,6 +49,8 @@
             points = ((BedParametersResult) data).getPorosityCapData();
         } else if (facetName.equals(FacetTypes.BED_QUALITY_POROSITY_SUBLAYER)) {
             points = ((BedParametersResult) data).getPorositySubData();
+        } else if (facetName.equals(FacetTypes.POROSITY)) {
+            points = ((Porosity)data).getAsArray();
         } else {
             logger.error("Unknown facet name: " + facetName);
             return;
@@ -60,7 +63,8 @@
     @Override
     public boolean canHandle(String facettype) {
         return facettype.equals(FacetTypes.BED_QUALITY_POROSITY_TOPLAYER) ||
-            facettype.equals(FacetTypes.BED_QUALITY_POROSITY_SUBLAYER);
+            facettype.equals(FacetTypes.BED_QUALITY_POROSITY_SUBLAYER) ||
+            facettype.equals(FacetTypes.POROSITY);
     }
 
     @Override


More information about the Dive4Elements-commits mailing list