Mercurial > dive4elements > river
changeset 2125:7a8f52267a5c
Fix stateId/hash assignment in WaterlevelFacet.
flys-artifacts/trunk@3695 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Tue, 17 Jan 2012 09:00:30 +0000 |
parents | a202a9e048a5 |
children | d626ae185305 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java |
diffstat | 3 files changed, 23 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Jan 17 09:00:30 2012 +0000 @@ -1,3 +1,13 @@ +2012-01-17 Felix Wolfsteller <felix.wolfsteller@intevation.de> + + Fix assignment of stateId/hash in WaterlevelFacet. + + * src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java: + More verbose logging, fix hash/stateid assignment. + + * src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java: + (deepCopy): implemented. + 2012-01-17 Felix Wolfsteller <felix.wolfsteller@intevation.de> "Ported" StaticWQKmsArtifact to use compute-type caching mechanism.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/BlackboardDataFacet.java Tue Jan 17 09:00:30 2012 +0000 @@ -6,6 +6,7 @@ import de.intevation.artifacts.Artifact; import de.intevation.artifacts.CallContext; +import de.intevation.artifactdatabase.state.Facet; import de.intevation.artifactdatabase.state.DefaultFacet; @@ -61,5 +62,13 @@ return null; } } + + /** Copy deeply. */ + @Override + public Facet deepCopy() { + BlackboardDataFacet copy = new BlackboardDataFacet(); + copy.set(this); + return copy; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Tue Jan 17 08:17:50 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WaterlevelFacet.java Tue Jan 17 09:00:30 2012 +0000 @@ -32,7 +32,7 @@ String hash ) { - super(index, name, description, type, stateID, hash); + super(index, name, description, type, hash, stateID); } public WaterlevelFacet() { @@ -44,7 +44,8 @@ * @return a WQKms at given index. */ public Object getData(Artifact artifact, CallContext context) { - logger.debug("Get data for waterlevels at index: " + index); + logger.debug("Get data for waterlevels at index: " + index + + " /stateId: " + stateId); FLYSArtifact winfo = (FLYSArtifact)artifact; @@ -63,8 +64,8 @@ WaterlevelFacet copy = new WaterlevelFacet(); copy.set(this); copy.type = type; + copy.hash = hash; copy.stateId = stateId; - copy.hash = hash; return copy; } }