changeset 1136:8da5f5a9ed3c

Cosmetics, docs. flys-artifacts/trunk@2657 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 07 Sep 2011 07:28:52 +0000
parents c8c753931514
children 073c36bb94ed
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java
diffstat 5 files changed, 32 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Tue Sep 06 17:41:07 2011 +0000
+++ b/flys-artifacts/ChangeLog	Wed Sep 07 07:28:52 2011 +0000
@@ -1,3 +1,11 @@
+2011-09-07  Felix Wolfsteller <felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/DataFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/state/DefaultState.java:
+	  Cosmetics, docs.
+
 2011-09-06  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/mapserver/barrier_polygons_class.vm,
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Tue Sep 06 17:41:07 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Wed Sep 07 07:28:52 2011 +0000
@@ -40,6 +40,8 @@
         return winfo.getWaterLines();
     }
 
+
+    /** Do a deep copy. */
     @Override 
     public Facet deepCopy() {
         CrossSectionWaterLineFacet copy = new CrossSectionWaterLineFacet(this.description);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java	Tue Sep 06 17:41:07 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java	Wed Sep 07 07:28:52 2011 +0000
@@ -58,7 +58,7 @@
         FLYSArtifact flys = (FLYSArtifact)artifact;
         String    theHash = (hash != null) ? hash : flys.hash();
 
-        return stateId != null && stateId.length() > 0
+        return (stateId != null && stateId.length() > 0)
             ? flys.compute(context, theHash, stateId, type, false)
             : flys.compute(context, theHash, type, false);
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java	Tue Sep 06 17:41:07 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java	Wed Sep 07 07:28:52 2011 +0000
@@ -20,13 +20,16 @@
     protected String      stateID;
     protected String      hash;
 
+
     public WaterlevelFacet(int index, String name, String description) {
         this(index, name, description, ComputeType.ADVANCE, null, null);
     }
 
+
     public WaterlevelFacet() {
     }
 
+
     public WaterlevelFacet(
         int         index,
         String      name,
@@ -42,6 +45,11 @@
         this.hash    = hash;
     }
 
+
+    /**
+     * Get waterlevel data.
+     * @return a WQKms at given index.
+     */
     public Object getData(Artifact artifact, CallContext context) {
         logger.debug("Get data for waterlevels at index: " + index);
 
@@ -55,6 +63,9 @@
         return wqkms[index];
     }
 
+
+    /** Copy deeply. */
+    @Override
     public Facet deepCopy() {
         WaterlevelFacet copy = new WaterlevelFacet();
         copy.set(this);
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java	Tue Sep 06 17:41:07 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/DefaultState.java	Wed Sep 07 07:28:52 2011 +0000
@@ -48,6 +48,9 @@
     }
 
 
+    /**
+     * Append to a node and return xml description relevant for gui.
+     */
     public Element describeStatic(
         Artifact    artifact,
         Document    document,
@@ -80,7 +83,7 @@
             String    name = iter.next();
             StateData data = getData(flys, name);
 
-            String value = data != null ? (String) data.getValue() : null;
+            String value = (data != null) ? (String) data.getValue() : null;
 
             if (value == null) {
                 continue;
@@ -98,7 +101,7 @@
             String attrValue = "";
             try {
                 // XXX A better way to format the output would be to use the
-                // 'type' value if the data objects.
+                // 'type' value of the data objects.
                 double doubleVal = Double.valueOf(value);
                 Locale         l = Resources.getLocale(meta);
                 NumberFormat  nf = NumberFormat.getInstance(l);
@@ -134,13 +137,13 @@
         Element ui        = null;
         String uiprovider = getUIProvider();
         if (uiprovider != null) {
-            ui  = ProtocolUtils.createArtNode(
+            ui = ProtocolUtils.createArtNode(
                 creator, "dynamic",
                 new String[] { "uiprovider" },
                 new String[] { uiprovider });
         }
         else {
-            ui  = ProtocolUtils.createArtNode(creator, "dynamic", null, null);
+            ui = ProtocolUtils.createArtNode(creator, "dynamic", null, null);
         }
 
         Map<String, StateData> theData = getData();
@@ -263,6 +266,7 @@
         return null;
     }
 
+
     public Object computeAdvance(
         FLYSArtifact artifact,
         String       hash,
@@ -273,6 +277,7 @@
         return null;
     }
 
+
     public Object computeFeed(
         FLYSArtifact artifact,
         String       hash,
@@ -283,6 +288,7 @@
         return null;
     }
 
+
     public Object computeInit(
         FLYSArtifact artifact,
         String       hash,

http://dive4elements.wald.intevation.org