# HG changeset patch # User Sascha L. Teichmann # Date 1379876712 -7200 # Node ID ada424214b02055a3fb7f980dbf5d422bf427729 # Parent 42e243c640a095301d33e71d24194c413cf36b07 Use Object instead of DOM Element as argument for setup of out generators. First step to remove dependency to XML DOM when using configuration. diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ATExporter.java Sun Sep 22 21:05:12 2013 +0200 @@ -55,7 +55,7 @@ } @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("ATExporter.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/AbstractExporter.java Sun Sep 22 21:05:12 2013 +0200 @@ -119,7 +119,7 @@ */ protected abstract void addData(Object data); - public void setup(Element config) { + public void setup(Object config) { logger.debug("AbstractExporter.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -162,7 +162,7 @@ } @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("ChartGenerator.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartInfoGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -70,7 +70,7 @@ this.generator = generator; } - public void setup(Element config) { + public void setup(Object config) { logger.debug("ChartInfoGenerator.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/DiagramGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -104,11 +104,12 @@ } @Override - public void setup(Element config) { + public void setup(Object config) { + Element cfg = (Element)config; logger.debug("DiagramGenerator.setup"); // TODO: XML DOM is not thread safe! We have to re-factor this. - synchronized (config.getOwnerDocument()) { - diagramAttributes = new DiagramAttributes(config); + synchronized (cfg.getOwnerDocument()) { + diagramAttributes = new DiagramAttributes(cfg); } } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/MapGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -68,7 +68,7 @@ protected String outName; @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("MapGenerator.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/OutGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -32,7 +32,7 @@ /** * Pre-initialize generator from configuration. */ - void setup(Element config); + void setup(Object config); /** * Initializes the OutGenerator with meta information which are necessary diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ReportGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -43,7 +43,7 @@ } @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("ReportGenerator.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ShapeExporter.java Sun Sep 22 21:05:12 2013 +0200 @@ -33,7 +33,7 @@ private String outName; @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("ShapeExporter.setup"); } diff -r 42e243c640a0 -r ada424214b02 artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java Sun Sep 22 17:15:15 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/sq/SQOverviewGenerator.java Sun Sep 22 21:05:12 2013 +0200 @@ -65,7 +65,7 @@ protected String outName; @Override - public void setup(Element config) { + public void setup(Object config) { logger.debug("SQOverviewGenerator.setup"); }