changeset 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 f84ddc205c8b
children 1b5204203e18
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java
diffstat 2 files changed, 28 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <felix.wolfsteller@intevation.de>
+
+ Cosmetics, docs.
+
+	* src/main/java/de/intevation/flys/collections/AttributeWriter.java:
+	  Documentation added.
+
 2011-09-22  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java:
@@ -41,7 +48,7 @@
 
 2011-09-21  Felix Wolfsteller <felix.wolfsteller@intevation.de>
 
- Added WaterlevelArtifact to accompany WDifferencesPlots.
+ Added WaterlevelArtifact to accompany WINFOArtifacts in WDifferencesPlots.
 
 	* src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java:
 	  New WaterlevelArtifact.
--- 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

http://dive4elements.wald.intevation.org