Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReferenceCurveFacet.java @ 2405:f008c3335a77
Towards fixe of flys/issue495.
flys-artifacts/trunk@4033 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 10 Feb 2012 12:41:12 +0000 |
parents | c5e4a2d67631 |
children | dce0cc856357 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReferenceCurveFacet.java Fri Feb 10 12:09:36 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/ReferenceCurveFacet.java Fri Feb 10 12:41:12 2012 +0000 @@ -1,7 +1,8 @@ package de.intevation.flys.artifacts.model; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; -import java.util.Arrays; import de.intevation.artifactdatabase.state.Facet; @@ -65,10 +66,10 @@ @Override public void set(Facet other) { super.set(other); - ReferenceCurveFacet o= (ReferenceCurveFacet)other; - type = o.type; - hash = o.hash; - stateId = o.stateId; + ReferenceCurveFacet o = (ReferenceCurveFacet)other; + type = o.type; + hash = o.hash; + stateId = o.stateId; } /** Copy deeply. */ @@ -80,7 +81,20 @@ } @Override - public List getDataProviderKeys(Artifact art) { + public List getDataProviderKeys(Artifact art, CallContext context) { + // Answer to key only if x or y in meter... + List keys = new ArrayList(); + // compute / get data + Object obj = context.getContextValue("reference.curve.axis.scale"); + + if (!(obj instanceof WWAxisTypes)) { + obj = new WWAxisTypes(getWWQQ(art, context)); + context.putContextValue("reference.curve.axis.scale", obj); + } + else { + ((WWAxisTypes)obj).classify(getWWQQ(art, context)); + } + // TODO we do not need to provide data return BLACK_BOARD_KEY_LIST; } @@ -91,6 +105,7 @@ Object param, CallContext context ) { + // TODO we do not really need to provide data if (!key.equals(BLACK_BOARD_KEY)) { return null; }