comparison artifacts/src/main/java/org/dive4elements/river/exports/process/DefaultProcessor.java @ 7059:f9d5020af0af generator-refactoring

Remove AxisProcessor "glue" class and extend Processor interface
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 20 Sep 2013 10:30:03 +0200
parents 1011a40ee79c
children 253d80af5b7f
comparison
equal deleted inserted replaced
7058:5c07024cdc24 7059:f9d5020af0af
8 8
9 package org.dive4elements.river.exports.process; 9 package org.dive4elements.river.exports.process;
10 10
11 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; 11 import org.dive4elements.artifactdatabase.state.ArtifactAndFacet;
12 import org.dive4elements.river.exports.XYChartGenerator; 12 import org.dive4elements.river.exports.XYChartGenerator;
13 import org.dive4elements.river.exports.DiagramGenerator;
13 import org.dive4elements.river.themes.ThemeDocument; 14 import org.dive4elements.river.themes.ThemeDocument;
14 15
15 /** Dummy implementation for the Processor interface. 16 /** Dummy implementation for the Processor interface.
16 */ 17 */
17 public class DefaultProcessor implements Processor { 18 public class DefaultProcessor implements Processor {
19
20 protected String axisName;
21
22 public void setAxisName(String axisName) {
23 this.axisName = axisName;
24 }
25
26 public String getAxisName() {
27 return axisName;
28 }
18 29
19 /** 30 /**
20 * Processes data to generate e.g. a chart. 31 * Processes data to generate e.g. a chart.
21 * 32 *
22 * @param generator XYChartGenerator to add output on. 33 * @param generator XYChartGenerator to add output on.
23 * @param aandf The artifact and facet 34 * @param aandf The artifact and facet
24 * @param theme The theme that contains styling information. 35 * @param theme The theme that contains styling information.
25 * @param visible The visibility of the curve. 36 * @param visible The visibility of the curve.
26 * @param index The index of the curve 37 * @param index The index of the curve
27 */ 38 */
39 @Override
28 public void doOut( 40 public void doOut(
29 XYChartGenerator generator, 41 XYChartGenerator generator,
30 ArtifactAndFacet aandf, 42 ArtifactAndFacet aandf,
31 ThemeDocument theme, 43 ThemeDocument theme,
32 boolean visible, 44 boolean visible,
33 int indexu) 45 int index) {
34 { 46 return;
47 }
48
49 @Override
50 public void doOut(
51 DiagramGenerator generator,
52 ArtifactAndFacet aandf,
53 ThemeDocument theme,
54 boolean visible) {
35 return; 55 return;
36 } 56 }
37 57
38 /** 58 /**
39 * Returns true if the Processor class is able to generate output for a facet type 59 * Returns true if the Processor class is able to generate output for a facet type
40 * 60 *
41 * @param facettype Name of the facet type 61 * @param facettype Name of the facet type
42 * @return true if the facettype can be processed 62 * @return true if the facettype can be processed
43 */ 63 */
64 @Override
44 public boolean canHandle(String facettype) 65 public boolean canHandle(String facettype)
45 { 66 {
46 return false; 67 return false;
47 } 68 }
48 } 69 }

http://dive4elements.wald.intevation.org