Mercurial > dive4elements > river
changeset 1624:238145ef67da
Cosmetics.
flys-artifacts/trunk@2799 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 21 Sep 2011 13:01:25 +0000 |
parents | 0221451a24fe |
children | c45e8d6b99a2 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeParser.java |
diffstat | 6 files changed, 33 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/ChangeLog Wed Sep 21 13:01:25 2011 +0000 @@ -1,3 +1,20 @@ +2011-09-21 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Cosmetics, improved debug output, doc. + + * src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java: + Improved debug output. + + * src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java: + Added documentation. + + * src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java, + src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java: + Removed commented code. + + * src/main/java/de/intevation/flys/collections/AttributeParser.java: + Whitespace cosmetics. + 2011-09-21 Felix Wolfsteller <felix.wolfsteller@intevation.de> Avoid NullPointerException when drawing XYChart without data.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java Wed Sep 21 13:01:25 2011 +0000 @@ -58,11 +58,6 @@ FLYSArtifact flys = (FLYSArtifact) artifact; addData("river", flys.getData("river")); - /* - logger.debug("Could set ranges to " + - AnnotationsFactory.getAnnotationsBreadth( - getRiver().getName())[0]); - */ List<Facet> fs = new ArrayList<Facet>();
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java Wed Sep 21 13:01:25 2011 +0000 @@ -488,8 +488,13 @@ ) { log.debug("createdArtifact"); + if (artifact == null) { + log.warn("artifact to create is null"); + return; + } + if (!(artifact instanceof FLYSArtifact)) { - log.warn("need FLYSArtifact here"); + log.warn("need FLYSArtifact here (have " + artifact.getClass() + ")"); return; } @@ -536,7 +541,7 @@ ) { log.debug("storedArtifact"); if (!(artifact instanceof FLYSArtifact)) { - log.warn("need FLYSArtifact here"); + log.warn("need FLYSArtifact here but have a " + artifact.getClass()); return; }
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java Wed Sep 21 13:01:25 2011 +0000 @@ -11,15 +11,20 @@ import de.intevation.artifactdatabase.state.DefaultFacet; import de.intevation.artifactdatabase.state.Facet; + +/** + * Facet with user-supplied theme-control-information (pos in list, + * active/disabled etc) attached. + */ public class ManagedFacet extends DefaultFacet { - /** The uuid of the owner artifact.*/ + /** The uuid of the owner artifact. */ protected String uuid; - /** A property that determines the position of this facet.*/ + /** A property that determines the position of this facet. */ protected int position; - /** A property that determines if this facet is active or not.*/ + /** A property that determines if this facet is active or not. */ protected int active; public ManagedFacet() {
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java Wed Sep 21 13:01:25 2011 +0000 @@ -40,7 +40,6 @@ Object old ) { //Get data and do stuff, do not calculate - //JSONObject jsonObject = new JSONObject().accumulate("string", 2.0f); return ""; } }
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeParser.java Wed Sep 21 12:55:36 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeParser.java Wed Sep 21 13:01:25 2011 +0000 @@ -25,7 +25,7 @@ public class AttributeParser { - /** Constant XPath that points to the outputmodes of an artifact.*/ + /** Constant XPath that points to the outputmodes of an artifact. */ public static final String XPATH_ARTIFACT_OUTPUTMODES = "/art:attribute/art:outputs/art:output";