Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java @ 808:2e951160c43d
Finished the javadoc of the math package.
gnv-artifacts/trunk@890 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 08 Apr 2010 16:35:02 +0000 |
parents | c4156275c1e1 |
children | f953c9a559d8 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java Thu Apr 08 15:24:45 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java Thu Apr 08 16:35:02 2010 +0000 @@ -12,30 +12,73 @@ import java.util.Map; /** - * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> + * Stores the results of an area interpolation. + * Used to generate the final products. + * + * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class AttributedPoint2ds implements Serializable { + /** + * The list of input points. + */ protected List<? extends Point2d> points; + + /** + * The map of input attributes that are need to generate + * the products. + */ protected Map attributes; + + /** + * The interpolation result. + */ protected AreaInterpolation interpolation; + + /** + * The JTS multi line strings to be written by GeoTools later. + */ protected List<Pair<Object, MultiLineString>> lineStrings; + + /** + * The JTS multi polygons to be written by GeoTools later. + */ protected Map<Integer, MultiPolygon> polygons; + /** + * Default constructor. + */ public AttributedPoint2ds() { } + /** + * Constructor to create a AttributedPoint2ds with a list + * of input points. + * + * @param points The input points. + */ public AttributedPoint2ds(List<? extends Point2d> points) { this.points = points; } + /** + * Returns an attribute from the map of external attributes. + * @param key The key of the attribute. + * @return The attribute or null if the attribute was not found. + */ public Object getAttribute(Object key) { return attributes != null ? attributes.get(key) : null; } + /** + * Stores an attribute under a given key in + * the map of external attributes. + * @param key The key of the attribute. + * @param value The attribute value. + */ public void setAttribute(Object key, Object value) { if (attributes == null) { attributes = new HashMap(); @@ -43,36 +86,68 @@ attributes.put(key, value); } + /** + * Returns the input points. + * @return The input points. + */ public List<? extends Point2d> getPoints() { return points; } + /** + * Sets the input points. + * @param points The input points. + */ public void setPoints(List<? extends Point2d> points) { this.points = points; } + /** + * Sets the area interpolation result. + * @param interpolation The new interpolation result. + */ public void setInterpolation(AreaInterpolation interpolation) { this.interpolation = interpolation; } + /** + * Returns the area interpolation result. + * @return The interpolation result. + */ public AreaInterpolation getInterpolation() { return interpolation; } + /** + * Sets the produced JTS multi polygons. + * @param polygons The multi polygons. + */ public void setPolygons(Map<Integer, MultiPolygon> polygons) { this.polygons = polygons; } + /** + * Returns the JTS multi polygons. + * @return The polygons. + */ public Map<Integer, MultiPolygon> getPolygons() { return polygons; } + /** + * Set the produced JTS multi line strings. + * @param lineStrings The line strings. + */ public void setLineStrings( List<Pair<Object, MultiLineString>> lineStrings ) { this.lineStrings = lineStrings; } + /** + * Returns the produced JTS multi line strings. + * @return The line strings. + */ public List<Pair<Object, MultiLineString>> getLineStrings() { return lineStrings; }