# HG changeset patch # User Felix Wolfsteller # Date 1316751676 0 # Node ID cc47828a1390f7cc2c54215c788181bdb7028141 # Parent f84ddc205c8b8f2a1b1943cf3d072bedf7921abc Added documentation. flys-artifacts/trunk@2813 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r f84ddc205c8b -r cc47828a1390 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Thu Sep 22 16:16:55 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Sep 23 04:21:16 2011 +0000 @@ -1,3 +1,10 @@ +2011-09-23 Felix Wolfsteller + + Cosmetics, docs. + + * src/main/java/de/intevation/flys/collections/AttributeWriter.java: + Documentation added. + 2011-09-22 Ingo Weinzierl * src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java: @@ -41,7 +48,7 @@ 2011-09-21 Felix Wolfsteller - Added WaterlevelArtifact to accompany WDifferencesPlots. + Added WaterlevelArtifact to accompany WINFOArtifacts in WDifferencesPlots. * src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java: New WaterlevelArtifact. diff -r f84ddc205c8b -r cc47828a1390 flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java --- 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 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 oldAttr, Map 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