# HG changeset patch # User Felix Wolfsteller # Date 1316610085 0 # Node ID 238145ef67daa25a71b39a725089738a41bbb376 # Parent 0221451a24fe7643947ffc426c0b5df8dfd50967 Cosmetics. flys-artifacts/trunk@2799 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 0221451a24fe -r 238145ef67da flys-artifacts/ChangeLog --- 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 + + 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 Avoid NullPointerException when drawing XYChart without data. diff -r 0221451a24fe -r 238145ef67da flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java --- 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 fs = new ArrayList(); diff -r 0221451a24fe -r 238145ef67da flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/Datacage.java --- 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; } diff -r 0221451a24fe -r 238145ef67da flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ManagedFacet.java --- 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() { diff -r 0221451a24fe -r 238145ef67da flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/WaterlevelPairSelectState.java --- 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 ""; } } diff -r 0221451a24fe -r 238145ef67da flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeParser.java --- 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";