comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedXYColumns.java @ 807:a645bd23c1c8

Added more javadoc. Removed trailing whitespace. gnv-artifacts/trunk@889 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 08 Apr 2010 15:24:45 +0000
parents d766fe2d917a
children 2e951160c43d
comparison
equal deleted inserted replaced
806:2cea76f1112e 807:a645bd23c1c8
7 import java.util.HashMap; 7 import java.util.HashMap;
8 import java.util.List; 8 import java.util.List;
9 import java.util.Map; 9 import java.util.Map;
10 10
11 /** 11 /**
12 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> 12 * Stores the results of a 3D interpolation. Used to generated the final
13 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> 13 * products.
14 *
15 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
16 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
14 */ 17 */
15 public class AttributedXYColumns 18 public class AttributedXYColumns
16 implements Serializable 19 implements Serializable
17 { 20 {
21 /**
22 * The list of height value column.
23 */
18 protected List<? extends XYColumn> columns; 24 protected List<? extends XYColumn> columns;
25
26 /**
27 * The extra input attributes which are not relevant
28 * for the interpolation but for generating the results.
29 */
19 protected Map attributes; 30 protected Map attributes;
31
32 /**
33 * The interpolation result.
34 */
20 protected Interpolation3D interpolation; 35 protected Interpolation3D interpolation;
36
37 /**
38 * Dataset to be used in a {@link de.intevation.gnv.jfreechart.PolygonPlot}.
39 */
21 protected PolygonDataset dataset; 40 protected PolygonDataset dataset;
22 41
42 /**
43 * Default constructor.
44 */
23 public AttributedXYColumns() { 45 public AttributedXYColumns() {
24 } 46 }
25 47
48 /**
49 * Constructor to create a AttributedXYColumns instance only
50 * with the height value columns.
51 * @param columns The height value columns.
52 */
26 public AttributedXYColumns(List<? extends XYColumn> columns) { 53 public AttributedXYColumns(List<? extends XYColumn> columns) {
27 this(columns, null); 54 this(columns, null);
28 } 55 }
29 56
57 /**
58 * Constructor to create a AttributedXYColumns with
59 * height value columns and the attributes to be used to
60 * generate the results.
61 * @param columns The height value columns.
62 * @param attributes The external attributes.
63 */
30 public AttributedXYColumns( 64 public AttributedXYColumns(
31 List<? extends XYColumn> columns, 65 List<? extends XYColumn> columns,
32 Map attributes 66 Map attributes
33 ) { 67 ) {
34 this.columns = columns; 68 this.columns = columns;
35 this.attributes = attributes; 69 this.attributes = attributes;
36 } 70 }
37 71
72 /**
73 * Gets an attribute.
74 * @param key The key of the attribute.
75 * @return The attribute or null if no such attribue is found.
76 */
38 public Object getAttribute(Object key) { 77 public Object getAttribute(Object key) {
39 return attributes != null 78 return attributes != null
40 ? attributes.get(key) 79 ? attributes.get(key)
41 : null; 80 : null;
42 } 81 }
43 82
83 /**
84 * Puts an attribute to the map of external attributes.
85 * @param key The key of the attribute.
86 * @param value The value of the attribute.
87 */
44 public void setAttribute(Object key, Object value) { 88 public void setAttribute(Object key, Object value) {
45 if (attributes == null) { 89 if (attributes == null) {
46 attributes = new HashMap(); 90 attributes = new HashMap();
47 } 91 }
48 attributes.put(key, value); 92 attributes.put(key, value);
49 } 93 }
50 94
95 /**
96 * Returns the list of height value columns.
97 * @return The list of height value columns.
98 */
51 public List<? extends XYColumn> getXYColumns() { 99 public List<? extends XYColumn> getXYColumns() {
52 return columns; 100 return columns;
53 } 101 }
54 102
103 /**
104 * Sets the list of height value columns.
105 * @param columns The new list of height value columns.
106 */
55 public void setXYColumns(List<? extends XYColumn> columns) { 107 public void setXYColumns(List<? extends XYColumn> columns) {
56 this.columns = columns; 108 this.columns = columns;
57 } 109 }
58 110
111 /**
112 * Sets the interpolation result.
113 * @param interpolation The new interpolation result.
114 */
59 public void setInterpolation(Interpolation3D interpolation) { 115 public void setInterpolation(Interpolation3D interpolation) {
60 this.interpolation = interpolation; 116 this.interpolation = interpolation;
61 } 117 }
62 118
119 /**
120 * Gets the interpolation results.
121 * @return The interpolation results.
122 */
63 public Interpolation3D getInterpolation() { 123 public Interpolation3D getInterpolation() {
64 return interpolation; 124 return interpolation;
65 } 125 }
66 126
127 /**
128 * Sets the generated polygon data set to be used in a
129 * {@link de.intevation.gnv.jfreechart.PolygonPlot}.
130 * @param dataset The polygon data set.
131 */
67 public void setPolygonDataset(PolygonDataset dataset) { 132 public void setPolygonDataset(PolygonDataset dataset) {
68 this.dataset = dataset; 133 this.dataset = dataset;
69 } 134 }
70 135
136 /**
137 * Returns the polygon data set.
138 * @return The polygon data set.
139 */
71 public PolygonDataset getPolygonDataset() { 140 public PolygonDataset getPolygonDataset() {
72 return dataset; 141 return dataset;
73 } 142 }
74 } 143 }
75 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 144 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org