# HG changeset patch # User Ingo Weinzierl # Date 1270809991 0 # Node ID df6d980c5418a48392cff461ec59967db3d77d3a # Parent 991e13c3d50435f07a8593577506d1f6772622e3 Added more Javadoc in state.profile.horizontal package. gnv-artifacts/trunk@895 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 991e13c3d504 -r df6d980c5418 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Fri Apr 09 10:22:38 2010 +0000 +++ b/gnv-artifacts/ChangeLog Fri Apr 09 10:46:31 2010 +0000 @@ -1,3 +1,10 @@ +2010-04-09 Ingo Weinzierl + + * src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java, + src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java, + src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java: + Added more Javadoc. + 2010-04-09 Ingo Weinzierl * src/main/java/de/intevation/gnv/timeseries/TimeSeriesMeshArtifact.java, diff -r 991e13c3d504 -r df6d980c5418 gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java Fri Apr 09 10:22:38 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java Fri Apr 09 10:46:31 2010 +0000 @@ -47,6 +47,8 @@ import org.w3c.dom.Node; /** + * This OutputState is used for 'Horizontalschnitt' products. + * * @author Tim Englich * @author Ingo Weinzierl * @author Sascha L. Teichmann @@ -75,9 +77,7 @@ super(); } - /** - * @see de.intevation.gnv.state.timeseries.TimeSeriesOutputState#setup(org.w3c.dom.Node) - */ + @Override public void setup(Node configuration) { super.setup(configuration); @@ -86,6 +86,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 HorizontalCrossProfileChart. + */ @Override protected Chart getChart( ChartLabels chartLables, @@ -212,6 +230,13 @@ } + /** + * The chart subtitle created by this method is build up of the timeperiod. + * + * @param locale The Locale used to adjust the language of the subtitle. + * @param uuid The UUID of the current artifact. + * @return a timeperiod as string. + */ @Override protected String createChartSubtitle(Locale locale, String uuid) { log.debug("create chart subtitle for horizontal crossprofile charts."); @@ -221,6 +246,15 @@ } + /** + * Prepares the input data for chart creation. + * + * @param path The coordinates describing the path the data is processed + * for. + * @param numSamples Number of samples. + * @param input The input data. + * @return finalized data ready for chart creation. + */ public static Collection process( List path, int numSamples, @@ -409,3 +443,4 @@ } } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file diff -r 991e13c3d504 -r df6d980c5418 gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java --- 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 OutputState is used for 'Horizontalprofile' products. + * * @author Tim Englich * @author Ingo Weinzierl */ @@ -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 HorizontalProfileChart. + */ @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 diff -r 991e13c3d504 -r df6d980c5418 gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java Fri Apr 09 10:22:38 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java Fri Apr 09 10:46:31 2010 +0000 @@ -21,8 +21,9 @@ import java.util.List; /** + * This states handles coordinate inputs. + * * @author Tim Englich - * */ public class NorthSouthEastWestState extends StateBase { @@ -41,9 +42,7 @@ public NorthSouthEastWestState() { } - /** - * @see de.intevation.gnv.state.StateBase#purifyResult(java.util.Collection, java.lang.String) - */ + @Override protected List purifyResult(Collection result, String uuid) { List describeData = new ArrayList(); @@ -61,9 +60,7 @@ return describeData; } - /** - * @see de.intevation.gnv.state.StateBase#initialize(java.lang.String, de.intevation.artifacts.CallMeta) - */ + @Override public void initialize(String uuid, CallContext context) throws StateException @@ -80,6 +77,5 @@ jpos = factory.getRessource( callMeta.getLanguages(), "jposition", "jposition"); } - - } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : \ No newline at end of file