Mercurial > dive4elements > river
changeset 1787:f3be8fa1ec62
Cosmetics, added simpler constructor for StaticState.
flys-artifacts/trunk@3110 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 28 Oct 2011 10:24:26 +0000 |
parents | 115803f2ba1c |
children | d5d2bffb26ca |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticState.java |
diffstat | 4 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Oct 28 10:20:00 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Oct 28 10:24:26 2011 +0000 @@ -1,3 +1,12 @@ +2011-10-28 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/states/StaticState.java: + Added simpler constructor. + + * src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java, + src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java: + Adjusted construction of StaticStates. + 2011-10-28 Felix Wolfsteller <felix.wolfsteller@intevation.de> * doc/conf/artifacts/winfo.xml: Allow Annotations in longitudinal and
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Fri Oct 28 10:20:00 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Fri Oct 28 10:24:26 2011 +0000 @@ -74,9 +74,8 @@ Document data) { logger.debug("MainValuesArtifact.setup"); - state = new StaticState( - STATIC_STATE_NAME, - STATIC_STATE_NAME); + state = new StaticState(STATIC_STATE_NAME); + Facet qfacet = new MainValuesQFacet(Resources.getMsg( callMeta, "facet.discharge_curves.mainvalues.q", @@ -100,7 +99,7 @@ * Create "the" state. */ protected State spawnState() { - state = new StaticState(STATIC_STATE_NAME, STATIC_STATE_NAME); + state = new StaticState(STATIC_STATE_NAME); List<Facet> fs = (List<Facet>) facets.get(STATIC_STATE_NAME); DefaultOutput mainValuesOutput2 = new DefaultOutput(
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Fri Oct 28 10:20:00 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Fri Oct 28 10:24:26 2011 +0000 @@ -72,9 +72,7 @@ { logger.debug("StaticWKmsArtifact.setup"); - state = new StaticState( - STATIC_STATE_NAME, - STATIC_STATE_NAME); + state = new StaticState(STATIC_STATE_NAME); List<Facet> fs = new ArrayList<Facet>(); logger.debug(XMLUtils.toString(data)); @@ -120,9 +118,7 @@ * @return static state */ protected State spawnState() { - state = new StaticState( - STATIC_STATE_NAME, - STATIC_STATE_NAME); + state = new StaticState(STATIC_STATE_NAME); List<Facet> fs = facets.get(STATIC_STATE_NAME); DefaultOutput output1 = new DefaultOutput( "w_differences",
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticState.java Fri Oct 28 10:20:00 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/StaticState.java Fri Oct 28 10:24:26 2011 +0000 @@ -14,6 +14,16 @@ /** The logger that is used in this state. */ private static final Logger logger = Logger.getLogger(StaticState.class); + + /** + * Trivial constructor, sets id and description. + * @param id String used for both id and description. + */ + public StaticState(String id) { + this(id, id); + } + + public StaticState(String id, String description) { super(); setID(id);