comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/profile/verticalcrosssection/VerticalCrossSectionOutputState.java @ 804:9058c08eac3a

Added more Javadoc in some classes of state.profile. gnv-artifacts/trunk@886 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 08 Apr 2010 10:10:04 +0000
parents c4156275c1e1
children 3ab5754e72e3
comparison
equal deleted inserted replaced
803:feae2f9d6c6f 804:9058c08eac3a
195 return getData(uuid, callContext); 195 return getData(uuid, callContext);
196 } 196 }
197 } 197 }
198 198
199 199
200 /**
201 * Retrieves the data used to create a VerticalCrossProfileChart.
202 *
203 * @param uuid The UUID of the current artifact.
204 * @param callContext The CallContext object.
205 * @return the data used to create a VerticalCrossProfileChart.
206 */
200 protected Object getData(String uuid, CallContext callContext) { 207 protected Object getData(String uuid, CallContext callContext) {
201 Collection<Result> result = null; 208 Collection<Result> result = null;
202 InputData meshLine = inputData.get("mesh_linestring"); 209 InputData meshLine = inputData.get("mesh_linestring");
203 InputData meshId = inputData.get("meshid"); 210 InputData meshId = inputData.get("meshid");
204 211
249 256
250 return obj; 257 return obj;
251 } 258 }
252 259
253 260
261 @Override
254 protected String getSelectedInputDataName(String uuid, String id) { 262 protected String getSelectedInputDataName(String uuid, String id) {
255 Collection values = getCollection(id, uuid); 263 Collection values = getCollection(id, uuid);
256 264
257 if (values != null) { 265 if (values != null) {
258 Iterator it = values.iterator(); 266 Iterator it = values.iterator();
323 : GNVArtifactContext.DEFAULT_VERTICAL_CROSS_SECTION_GROUND_FILL; 331 : GNVArtifactContext.DEFAULT_VERTICAL_CROSS_SECTION_GROUND_FILL;
324 } 332 }
325 333
326 public static final double EPSILON = 1e-5d; 334 public static final double EPSILON = 1e-5d;
327 335
336
337 /**
338 * Finalize the data used for chart generation. Isolines are added, colors
339 * are assigned to polygons and the seabed is added.
340 *
341 * @param path The path which have been inserted while parameterization.
342 * @param columns The data used to be displayed in a 2D chart.
343 * @param callContext The CallContext object.
344 * @return the finalized data ready for chart generation.
345 */
328 protected Object process( 346 protected Object process(
329 List<Coordinate> path, 347 List<Coordinate> path,
330 AttributedXYColumns columns, 348 AttributedXYColumns columns,
331 CallContext callContext 349 CallContext callContext
332 ) { 350 ) {
475 493
476 return columns; 494 return columns;
477 } 495 }
478 496
479 497
498 /**
499 * Pre-process the data returned by database query. The resulting data is
500 * not ready for chart creation!
501 *
502 * @param results Data returned by database.
503 * @return Pre-processed data which is not ready for chart creation yet.
504 */
480 protected AttributedXYColumns preProcess(Collection results) { 505 protected AttributedXYColumns preProcess(Collection results) {
481 506
482 AttributedXYColumns attColumns = new AttributedXYColumns(); 507 AttributedXYColumns attColumns = new AttributedXYColumns();
483 Map<IJKey, XYColumn> map = new HashMap<IJKey, XYColumn>(1013); 508 Map<IJKey, XYColumn> map = new HashMap<IJKey, XYColumn>(1013);
484 Iterator iter = results.iterator(); 509 Iterator iter = results.iterator();
540 565
541 return attColumns; 566 return attColumns;
542 } 567 }
543 568
544 569
570 /**
571 * This <code>getChart</code> method returns a 2D VerticalCrossSectionChart
572 * displaying polygon data with isolines and a legend describing the colors
573 * used in that chart.
574 *
575 * @param chartLables Labels used to decorate the chart.
576 * @param theme The theme used to adjust the look of the chart.
577 * @param parameters A collection with parameters this chart contains.
578 * @param measurements A collection with measurement this chart contains.
579 * @param dates A collection with dates this chart contains.
580 * @param result The data collection used to be displayed in this chart.
581 * @param locale The Locale used to determine the language.
582 * @param uuid The uuid of the current artifact.
583 * @param linesVisible A boolean property to determine the visibility of
584 * lines connecting two points in a chart (not used in this chart type).
585 * @param shapesVisible A boolean property to determine the visiblity of
586 * datapoints in this chart (not used in this chart type).
587 * @param callContext The CallContext object.
588 * @return a 2D chart representing the data as polygons.
589 */
545 @Override 590 @Override
546 protected Chart getChart( 591 protected Chart getChart(
547 ChartLabels chartLables, 592 ChartLabels chartLables,
548 ChartTheme theme, 593 ChartTheme theme,
549 Collection parameters, 594 Collection parameters,
612 } 657 }
613 658
614 return chart; 659 return chart;
615 } 660 }
616 661
617 /** 662
618 * @see de.intevation.gnv.state.timeseries.TimeSeriesOutputState#getStatisticsGenerator()
619 */
620 @Override 663 @Override
621 protected Statistics getStatisticsGenerator() { 664 protected Statistics getStatisticsGenerator() {
622 return new VerticalCrossSectionStatistics(); 665 return new VerticalCrossSectionStatistics();
623 } 666 }
624 667
625 /** 668 /**
626 * @see de.intevation.gnv.state.timeseries.TimeSeriesOutputState#createCSV(java.io.OutputStream, java.util.Collection) 669 * Nothing happens here. <b>This method should never be called</b> until
670 * there is a wise implementation of a csv representation of the polygon
671 * data.
672 *
673 * @param outputStream The output stream used to write the csv file to.
674 * @param chartResult The data used to be written to csv file.
675 * @throws UnsupportedEncodingException if the encoding is not supported.
676 * @throws IOException if an error occured while writing to output stream.
677 * @throws StateException if an error occured while csv file creation.
627 */ 678 */
628 @Override 679 @Override
629 protected void createCSV( 680 protected void createCSV(
630 OutputStream outputStream, 681 OutputStream outputStream,
631 Collection<Result> chartResult 682 Collection<Result> chartResult

http://dive4elements.wald.intevation.org