changeset 2169:b817e680cf18

Cosmetics. flys-artifacts/trunk@3764 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 25 Jan 2012 12:58:26 +0000
parents a079f4e26001
children 90dfc25007f1
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
diffstat 2 files changed, 14 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jan 25 10:52:58 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed Jan 25 12:58:26 2012 +0000
@@ -1,3 +1,8 @@
+2012-01-25  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java:
+	  Cosmetics, documentation.
+
 2012-01-25	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* contrib/visualize-transitions.xsl: Fixed output of the conditions 
@@ -58,7 +63,7 @@
 
 	* src/main/java/de/intevation/flys/artifacts/model/FacetTypes.java:
 	  Added new type (duration_curve.mainvalues.q).
-	
+
 	* doc/conf/themes.xml: Added theme mapping for new facet type.
 
 	* src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java:
@@ -85,7 +90,6 @@
 	  and calculate text and line positions accordingly.
 	  Removed junk.
 
-
 2012-01-23  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	Fix compilation.
@@ -114,7 +118,7 @@
 
 	* src/main/java/de/intevation/flys/themes/ThemeAccess.java:
 	  Added new LineStyle class.
-	
+
 	* src/main/java/de/intevation/flys/exports/XYChartGenerator.java:
 	  Call addAnnotationsToRenderer later, where positioning information
 	  is already known.
@@ -123,7 +127,6 @@
 				      CollisionFreeXYText- and
 				      XYLineAnnotations.
 	  (Area): Helper class.
-	  
 
 2012-01-23  Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Jan 25 10:52:58 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Wed Jan 25 12:58:26 2012 +0000
@@ -55,7 +55,8 @@
 import org.w3c.dom.NodeList;
 
 /**
- * The defaul FLYS artifact.
+ * The default FLYS artifact with convenience added.
+ * (Subclass to get fully functional artifacts).
  *
  * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
  */
@@ -156,6 +157,9 @@
         String name = getName();
         logger.debug("Set initial state for artifact '" + name + "'");
 
+        if (states == null) {
+            logger.error("No states found from which a state could be picked.");
+        }
         setCurrentState(states.get(0));
 
         String model = XMLUtils.xpathString(
@@ -207,6 +211,7 @@
         this.addData(name, sd);
     }
 
+
     protected Map<String, StateData> cloneData() {
         Map<String, StateData> copy = new TreeMap<String, StateData>();
 
@@ -558,6 +563,7 @@
     }
 
 
+    /** Return named data item, null if not found. */
     public String getDataAsString(String name) {
         StateData data = getData(name);
         return data != null ? (String) data.getValue() : null;

http://dive4elements.wald.intevation.org