teichmann@5863: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@5863: * Software engineering by Intevation GmbH teichmann@5863: * teichmann@5994: * This file is Free Software under the GNU AGPL (>=v3) teichmann@5863: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@5994: * documentation coming with Dive4Elements River for details. teichmann@5863: */ teichmann@5863: teichmann@5831: package org.dive4elements.river.exports.process; bjoern@4443: teichmann@5831: import org.dive4elements.artifactdatabase.state.ArtifactAndFacet; teichmann@5831: import org.dive4elements.river.exports.XYChartGenerator; teichmann@6905: import org.dive4elements.river.themes.ThemeDocument; aheinecke@7059: import org.dive4elements.river.exports.DiagramGenerator; bjoern@4443: bjoern@4443: /** bjoern@4443: * A processor is intended to generate an output e.g. curve in a chart diagramm from bjoern@4443: * arbitrary data input which can be reused in several generators. bjoern@4443: * bjoern@4443: * @author Björn Ricks bjoern@4443: */ bjoern@4443: public interface Processor { aheinecke@7059: /** aheinecke@7059: * Set the axis for this processor. aheinecke@7059: * This should be done before doOut is called for the first time. aheinecke@7059: * aheinecke@7059: * @param axisName The name of the Axis this processor should use. aheinecke@7059: */ aheinecke@7059: public void setAxisName(String axisName); aheinecke@7059: aheinecke@7059: /** aheinecke@7059: * Get the axis for this processor. aheinecke@7059: * aheinecke@7059: * @return The name of the axis that is used. aheinecke@7059: */ aheinecke@7059: public String getAxisName(); bjoern@4443: bjoern@4443: /** bjoern@4443: * Processes data to generate e.g. a chart. bjoern@4443: * teichmann@4736: * @param generator XYChartGenerator to add output on. aheinecke@7059: * @param aandf The artifact and facet aheinecke@7059: * @param theme The theme that contains styling information. aheinecke@7059: * @param visible The visibility of the curve. bjoern@4443: */ bjoern@4443: public void doOut( aheinecke@7059: DiagramGenerator generator, aheinecke@7059: ArtifactAndFacet aandf, aheinecke@7059: ThemeDocument theme, aheinecke@7059: boolean visible); aheinecke@7059: aheinecke@7059: /** aheinecke@7059: * Processes data to generate e.g. a chart. aheinecke@7059: * aheinecke@7059: * @param generator DiagramGenerator to add output on. aheinecke@7059: * @param aandf The artifact and facet aheinecke@7059: * @param theme The theme that contains styling information. aheinecke@7059: * @param visible The visibility of the curve. aheinecke@7059: * @param index The index of the curve aheinecke@7059: */ aheinecke@7059: @Deprecated aheinecke@7059: public void doOut( bjoern@4443: XYChartGenerator generator, teichmann@6905: ArtifactAndFacet aandf, teichmann@6905: ThemeDocument theme, teichmann@6905: boolean visible, teichmann@6905: int index); bjoern@4443: bjoern@4443: /** bjoern@4443: * Returns true if the Processor class is able to generate output for a facet type teichmann@4736: * bjoern@4443: * @param facettype Name of the facet type bjoern@4443: * @return true if the facettype can be processed bjoern@4443: */ teichmann@4736: public boolean canHandle(String facettype); bjoern@4443: }