Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java @ 811:df6d980c5418
Added more Javadoc in state.profile.horizontal package.
gnv-artifacts/trunk@895 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 09 Apr 2010 10:46:31 +0000 |
parents | c4156275c1e1 |
children | 499cfbbb61bc |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java Fri Apr 09 10:22:38 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java Fri Apr 09 10:46:31 2010 +0000 @@ -46,6 +46,8 @@ import org.jfree.chart.ChartTheme; /** + * This <code>OutputState</code> is used for 'Horizontalprofile' products. + * * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> */ @@ -133,6 +135,24 @@ } + /** + * This method creates a chart and returns it. + * + * @param chartLables Labels used to decorate the chart. + * @param theme The theme used to adjust the look of the chart. + * @param parameters A collection with parameters this chart contains. + * @param measurements A collection with measurement this chart contains. + * @param dates A collection with dates this chart contains. + * @param result The data collection used to be displayed in this chart. + * @param locale The Locale used to determine the language. + * @param uuid The uuid of the current artifact. + * @param linesVisible A boolean property to determine the visibility of + * lines connecting two points in a chart (not used in this chart type). + * @param shapesVisible A boolean property to determine the visiblity of + * datapoints in this chart (not used in this chart type). + * @param callContext The CallContext object. + * @return a <code>HorizontalProfileChart</code>. + */ @Override protected Chart getChart( ChartLabels chartLables, @@ -181,9 +201,6 @@ } - /** - * @see de.intevation.gnv.state.timeseries.TimeSeriesOutputState#getStatisticsGenerator() - */ @Override protected Statistics getStatisticsGenerator() { return new HorizontalProfileStatistics(); @@ -235,6 +252,14 @@ } + /** + * Creates and returns the chart title. + * + * @param locale The Locale used to adjust the language of the title. + * @param uuid The UUID of the current artifact. + * @return the name of the selected fis. + */ + @Override protected String createChartTitle(Locale locale, String uuid) { String fisName = getFisName(locale); log.debug("created title for horizontal profile chart: " + fisName); @@ -243,6 +268,14 @@ } + /** + * Creates and returns the subtitle of a chart. + * + * @param locale The Locale used to adjust the language of the subtitle. + * @param uuid The UUID of the current artifact. + * @return the timeperiod of this chart and the start coordinate. + */ + @Override protected String createChartSubtitle(Locale locale, String uuid) { log.debug("create chart subtitle."); String subtitle = createTimePeriod(locale, uuid); @@ -261,6 +294,14 @@ } + /** + * Create meta information used in subtitles. + * + * @param locale The Locale used to adjust the language of the subtitle. + * @param result A data object. + * @return the start coordinate as human readable string. + */ + @SuppressWarnings("static-access") protected String createMetaChartSubtitle(Locale locale, Result result) { log.debug("Fetch meta information and put it into subtitle."); if (result == null) @@ -282,7 +323,7 @@ meta.append(": "); meta.append(WKTUtils.toText( locale, - new InputValidator().getPointValue(wktPoint))); + InputValidator.getPointValue(wktPoint))); } catch (Exception e) { log.error(e, e); @@ -311,6 +352,13 @@ } + /** + * Creates a timeperiod taking account for all data items used in charts. + * + * @param locale The Locale used to adjust the language of the subtitle. + * @param uuid The UUID of the current artifact. + * @return a human readable timeperiod. + */ protected String createTimePeriod(Locale locale, String uuid) { log.debug("create time period for chart subtitle."); String subTitle = null; @@ -363,3 +411,4 @@ return subTitle; } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file