[Dive4elements-commits] [PATCH] Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection
Wald Commits
scm-commit at wald.intevation.org
Fri Oct 26 08:51:23 CEST 2012
# HG changeset patch
# User Ingo Weinzierl <ingo.weinzierl at intevation.de>
# Date 1351234268 -7200
# Node ID e4a415773b0a9e48c38d5df2f13c1855289029f2
# Parent 5cc9453456a7ee7bdfffab3d7aa004e858ee6db7
Added the 'index' parameter to HistoricalDischargeWQFacet to avoid loosing facets during the merge process in the FLYSArtifactCollection.
diff -r 5cc9453456a7 -r e4a415773b0a flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java Thu Oct 25 17:25:37 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/HistoricalDischargeWQFacet.java Fri Oct 26 08:51:08 2012 +0200
@@ -3,6 +3,7 @@
import de.intevation.artifactdatabase.state.Facet;
import de.intevation.artifacts.Artifact;
import de.intevation.artifacts.CallContext;
+import de.intevation.flys.artifacts.states.DefaultState.ComputeType;
/**
@@ -15,8 +16,11 @@
public HistoricalDischargeWQFacet() {
}
- public HistoricalDischargeWQFacet(String name, String desc, double value) {
- super(name, desc);
+ public HistoricalDischargeWQFacet(int index, String name,
+ String description, ComputeType type, String hash, String stateId,
+ double value) {
+
+ super(index, name, description, type, hash, stateId);
this.value = value;
}
diff -r 5cc9453456a7 -r e4a415773b0a flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Thu Oct 25 17:25:37 2012 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/HistoricalDischargeComputeState.java Fri Oct 26 08:51:08 2012 +0200
@@ -137,13 +137,15 @@
double[] qs = access.getQs();
for (int k = 0; k < ws.length; k++) {
- facets.add(new HistoricalDischargeWQFacet(
- HISTORICAL_DISCHARGE_WQ_W, "W=" + ws[k], ws[k]));
+ facets.add(new HistoricalDischargeWQFacet(k,
+ HISTORICAL_DISCHARGE_WQ_W, "W=" + ws[k], ComputeType.ADVANCE,
+ hash, getID(), ws[k]));
}
for (int k = 0; k < qs.length; k++) {
- facets.add(new HistoricalDischargeWQFacet(
- HISTORICAL_DISCHARGE_WQ_Q, "Q=" + qs[k], qs[k]));
+ facets.add(new HistoricalDischargeWQFacet(k,
+ HISTORICAL_DISCHARGE_WQ_Q, "Q=" + qs[k], ComputeType.ADVANCE,
+ hash, getID(), qs[k]));
}
int idx = 0;
More information about the Dive4elements-commits
mailing list