Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java @ 1634:cc47828a1390
Added documentation.
flys-artifacts/trunk@2813 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 23 Sep 2011 04:21:16 +0000 |
parents | 16c74ca3586e |
children | 1b5204203e18 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Thu Sep 22 16:16:55 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Fri Sep 23 04:21:16 2011 +0000 @@ -19,7 +19,11 @@ import de.intevation.flys.artifacts.model.ManagedFacet; - +/** + * Create attribute- element of describe document of an ArtifactCollection. + * The attribute-element contains the merged output of all outputmodes and + * facets that are part of the collection. + */ public class AttributeWriter { protected Map<String, Output> oldAttr; @@ -28,6 +32,13 @@ private static Logger logger = Logger.getLogger(AttributeWriter.class); + /** + * Create a AttributeWriter. + * Attributes not present in newAttr will not be included in the document. + * @param oldAttr "Old" (possibly user-changed) outputs. + * @param newAttr "New" (eventually re-read in its original, unchagnged + * form) outputs. + */ public AttributeWriter( Map<String, Output> oldAttr, Map<String, Output> newAttr) @@ -38,7 +49,13 @@ /** - * Create document + * Create document by merging outputs given in + * constructor. + * The "new" set rules about existance of attributes, so anything not + * present in it will not be included in the resulting document. + * The "old" set rules about the content of attributes (as user changes + * are recorded here and not in the new set). + * @return document with merged outputs as described. */ protected Document write() { Document doc = XMLUtils.newDocument(); @@ -65,6 +82,7 @@ return doc; } + /** * @param doc Document to add output nodes to * @param outs Node in Document to add output nodes to