changeset 2141:79a94c4171cb

Cosmetics. flys-artifacts/trunk@3719 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 19 Jan 2012 13:01:33 +0000
parents 3d73109005b8
children ef337d9fa5ea
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java 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/exports/ChartGenerator.java
diffstat 7 files changed, 22 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/ChangeLog	Thu Jan 19 13:01:33 2012 +0000
@@ -1,3 +1,14 @@
+2012-01-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/model/CrossSectionFactory.java,
+	  src/main/java/de/intevation/flys/artifacts/model/DataFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java,
+	  src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java,
+	  src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java,
+	  src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java,
+	  src/main/java/de/intevation/flys/exports/ChartGenerator.java:
+	  Cosmetics, docs, improved logging.
+
 2012-01-19	Felix Wolfsteller	<felix.wolfsteller@intevation.de>
 
 	* doc/conf/meta-data.xml: Recommend hyks for current river if hit by
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java	Thu Jan 19 13:01:33 2012 +0000
@@ -179,10 +179,12 @@
     }
 
 
+    /** Get copy of previous state ids as Strings in list. */
     protected List<String> clonePreviousStateIds() {
         return new ArrayList<String>(previousStateIds);
     }
 
+
     /**
      * Copies data item from other artifact to this artifact.
      *
@@ -1038,7 +1040,8 @@
         ComputeType type,
         boolean     generateFacets
     ) {
-        DefaultState current = stateID == null
+        DefaultState current =
+            (stateID == null)
             ? (DefaultState)getCurrentState(context)
             : (DefaultState)getState(context, stateID);
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java	Thu Jan 19 13:01:33 2012 +0000
@@ -105,7 +105,7 @@
         logger.debug("StaticWQKmsArtifact.initialize");
         WINFOArtifact winfo = (WINFOArtifact) artifact;
         // TODO: The river is of no interest, so far., also use importData
-        addData("river", winfo.getData("river"));
+        importData(winfo, "river");
 
         List<Facet> fs = new ArrayList<Facet>();
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/context/FLYSContextFactory.java	Thu Jan 19 13:01:33 2012 +0000
@@ -120,7 +120,8 @@
                 doc, XPATH_TRANSITIONS, XPathConstants.NODESET);
 
             if (list == null) {
-                logger.warn("The artifact has no transitions configured.");
+                logger.warn("The artifact " + artName +
+                    " has no transitions configured.");
                 continue;
             }
 
@@ -193,7 +194,8 @@
                 doc, XPATH_STATES, XPathConstants.NODESET);
 
             if (stateList == null) {
-                logger.warn("The artifact has no states configured.");
+                logger.warn("The artifact " + artName +
+                    " has no states configured.");
                 continue;
             }
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/CrossSectionWaterLineFacet.java	Thu Jan 19 13:01:33 2012 +0000
@@ -6,9 +6,9 @@
 
 import de.intevation.artifacts.Artifact;
 import de.intevation.artifacts.CallContext;
+import de.intevation.artifacts.DataProvider;
 
 import de.intevation.artifactdatabase.state.Facet;
-import de.intevation.artifacts.DataProvider;
 
 import de.intevation.flys.artifacts.WaterLineArtifact;
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/DataFacet.java	Thu Jan 19 13:01:33 2012 +0000
@@ -76,6 +76,7 @@
         this.stateId = stateId;
     }
 
+
     /**
      * Return computation result.
      */
--- a/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Thu Jan 19 12:59:36 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/exports/ChartGenerator.java	Thu Jan 19 13:01:33 2012 +0000
@@ -26,7 +26,6 @@
 
 import de.intevation.flys.model.River;
 
-import de.intevation.flys.artifacts.WINFOArtifact;
 import de.intevation.flys.artifacts.FLYSArtifact;
 import de.intevation.flys.artifacts.resources.Resources;
 import de.intevation.flys.utils.FLYSUtils;

http://dive4elements.wald.intevation.org