[PATCH] Call processors from configuration
Wald Commits
scm-commit at wald.intevation.org
Thu Sep 19 11:50:41 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1379584236 -7200
# Branch generator-refactoring
# Node ID 7056fa3b1f75c9968a51ee10872758403d37aa06
# Parent c4bacc5ddd9b168bb1db2f9d1c7299fc244dc652
Call processors from configuration.
diff -r c4bacc5ddd9b -r 7056fa3b1f75 artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Thu Sep 19 11:39:00 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Thu Sep 19 11:50:36 2013 +0200
@@ -993,9 +993,11 @@
* For every outable facets, this function is
* called and handles the data accordingly. */
@Override
- public void doOut(ArtifactAndFacet bundle, ThemeDocument theme,
- boolean visible)
- {
+ public void doOut(
+ ArtifactAndFacet bundle,
+ ThemeDocument theme,
+ boolean visible
+ ) {
String facetName = bundle.getFacetName();
Facet facet = bundle.getFacet();
@@ -1003,19 +1005,16 @@
if (facetName == null || facet == null) {
/* Can't happen,.. */
logger.error("doOut called with null facet.");
+ return;
}
logger.debug("DoOut for facet: " + facetName);
- /* TODO Here should the configured processors come into play */
- List<Processor> processors = new ArrayList<Processor>();
- processors.add(new WOutProcessor());
- processors.add(new QOutProcessor());
- processors.add(new BedheightProcessor());
- processors.add(new BedDiffYearProcessor());
- processors.add(new BedDiffHeightYearProcessor());
-
- for (Processor pr: processors) {
+ for (DiagramAttributes.AxisProcessor ap:
+ diagramAttributes.getAxesProcessors()) {
+
+ Processor pr = ap.getProcessor();
+
if (pr.canHandle(facetName)) {
// pr.doOut(this, bundle, theme, visible, 0);
}
More information about the Dive4elements-commits
mailing list