changeset 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 991e13c3d504
children 41a7c49b5cb4
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileMeshCrossOutputState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/HorizontalProfileOutputState.java gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/horizontal/NorthSouthEastWestState.java
diffstat 4 files changed, 103 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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 <ingo.weinzierl@intevation.de>
+
+	* 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 <ingo.weinzierl@intevation.de>
 
 	* src/main/java/de/intevation/gnv/timeseries/TimeSeriesMeshArtifact.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 <code>OutputState</code> is used for 'Horizontalschnitt' products.
+ * 
  * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
  * @author <a href="mailto:iweinzierl@intevation.de">Ingo Weinzierl</a>
  * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
@@ -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 <code>HorizontalCrossProfileChart</code>.
+     */
     @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<Result> process(
         List<Coordinate>   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
--- 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
--- 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 <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
- *
  */
 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<Object> purifyResult(Collection<Result> result, String uuid) {
         List<Object> describeData = new ArrayList<Object>();
@@ -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

http://dive4elements.wald.intevation.org