[Dive4elements-commits] [PATCH 2 of 2] Merged
Wald Commits
scm-commit at wald.intevation.org
Wed Nov 14 12:38:10 CET 2012
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1352893077 -3600
# Node ID d7e1aee9d51edf69eb62e7cb5100d4033bb35733
# Parent f91260ccef0339d6e6e42f66ab02ff704f4c595f
# Parent 5b0a545fceef760bfa7eac3cb3e53798500c90c3
Merged.
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AnnotationArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -106,7 +106,7 @@
if (!fs.isEmpty()) {
logger.debug("Facets to add in AnnotationsArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in AnnotationsArtifact.initialize .");
@@ -213,7 +213,7 @@
continue;
}
- List<Facet> fs = facets.get(stateId);
+ List<Facet> fs = getFacets(stateId);
if (fs == null || fs.isEmpty()) {
logger.debug("No facets found.");
continue;
@@ -234,7 +234,7 @@
logger.debug(
"Append output modes for state: " + cur.getID());
- List<Facet> fs = facets.get(cur.getID());
+ List<Facet> fs = getFacets(cur.getID());
if (fs != null && fs.size() > 0) {
List<Output> generated = generateOutputs(list, fs);
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/AreaArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -84,7 +84,7 @@
AreaCreationState state = (AreaCreationState) getCurrentState(context);
if (!fs.isEmpty()) {
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
}
@@ -148,7 +148,7 @@
*/
@Override
public State getCurrentState(Object cc) {
- final List<Facet> fs = facets.get(getCurrentStateId());
+ final List<Facet> fs = getFacets(getCurrentStateId());
AreaCreationState state = new AreaCreationState();
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/BedHeightsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -95,7 +95,7 @@
bedHName);
fs.add(bedHFacet);
- facets.put(state.getID(), fs);
+ addFacets(state.getID(), fs);
}
}
@@ -111,47 +111,11 @@
@Override
protected List<State> getStates(Object context) {
ArrayList<State> states = new ArrayList<State>();
- states.add(getState());
+ states.add(state);
return states;
}
/**
- * Get the "current" state (there is but one).
- * @param cc ignored.
- * @return the "current" (only possible) state.
- */
- @Override
- public State getCurrentState(Object cc) {
- return getState();
- }
-
-
- /**
- * Get the only possible state.
- * @return the state.
- */
- protected State getState() {
- return getState(null, null);
- }
-
-
- /**
- * Get the state.
- * @param context ignored.
- * @param stateID ignored.
- * @return the state.
- */
- @Override
- protected State getState(Object context, String stateID) {
- return (state != null)
- ? state
- : new StaticState(STATIC_STATE_NAME);
- }
-
- /**
- * Get WKms from factory.
- * @param idx param is not needed (TODO?)
- * @return WKms according to parameterization (can be null);
*/
public BedHeight getHeight() {
return BedHeightFactory.getHeight(
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ChartArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -95,7 +95,7 @@
continue;
}
- List<Facet> fs = facets.get(stateId);
+ List<Facet> fs = getFacets(stateId);
if (fs == null || fs.isEmpty()) {
logger.debug("No facets for previous state found.");
@@ -116,7 +116,7 @@
logger.debug(
"Append output modes for current state: " + cur.getID());
- List<Facet> fs = facets.get(cur.getID());
+ List<Facet> fs = getFacets(cur.getID());
if (fs != null && fs.size() > 0) {
List<Output> generated = generateOutputs(list, fs);
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CrossSectionArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -141,7 +141,7 @@
StaticState state = (StaticState) getCurrentState(context);
if (!fs.isEmpty()) {
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
}
@@ -180,7 +180,7 @@
*/
@Override
public State getCurrentState(Object cc) {
- final List<Facet> fs = facets.get(getCurrentStateId());
+ final List<Facet> fs = getFacets(getCurrentStateId());
StaticState state = new StaticState(STATIC_STATE_NAME) {
@Override
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ExternalWMSArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -59,7 +59,7 @@
s.computeInit(this, hash(), context, callMeta, fs);
if (!fs.isEmpty()) {
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
}
@@ -78,7 +78,7 @@
public State getCurrentState(Object cc) {
State s = new ExternalWMSState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FLYSArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -95,7 +95,7 @@
private Map<String, StateData> data;
/** Mapping of state names to created facets. */
- protected Map<String, List<Facet>> facets;
+ private Map<String, List<Facet>> facets;
/**
* Used to generates "view" on the facets (hides facets not matching the
@@ -930,6 +930,8 @@
}
log.warn("Could not find facet: " + name + " at " + index);
+ log.warn("Available facets for : " + getName() + " " + identifier() +
+ ": " + facets.values());
return null;
}
@@ -1221,7 +1223,7 @@
String stateId = state.getID();
- List<Facet> fs = facets.get(stateId);
+ List<Facet> fs = getFacets(stateId);
if (fs == null || fs.isEmpty()) {
if (debug) {
@@ -1229,6 +1231,9 @@
}
return new ArrayList<Output>();
}
+ if (debug) {
+ log.debug("State '" + stateId + "' has facets " + fs);
+ }
List<Output> gen = generateOutputs(list, fs);
@@ -1249,10 +1254,13 @@
*/
protected List<Output> generateOutputs(List<Output> list, List<Facet> fs) {
List<Output> generated = new ArrayList<Output>();
+ log.debug("generateOutputs for Artifact " + getName() + " "
+ + identifier());
boolean debug = log.isDebugEnabled();
for (Output out: list) {
+ log.debug("check facets for output: " + out.getName());
Output o = new DefaultOutput(
out.getName(),
out.getDescription(),
@@ -1439,6 +1447,9 @@
protected void dumpArtifact() {
log.debug("++++++++++++++ DUMP ARTIFACT DATA +++++++++++++++++");
// Include uuid, type, name
+ log.debug(" - Name: " + getName());
+ log.debug(" - UUID: " + identifier());
+ log.debug(" - Class: " + this.getClass().getName());
log.debug("------ DUMP DATA ------");
Collection<StateData> allData = data.values();
@@ -1540,5 +1551,14 @@
destroyStates(toDestroy, context);
}
+
+ /**
+ * Return the Facets which a state provides
+ * @param stateid String that identifies the state
+ * @return List of Facets belonging to the state identifier
+ */
+ protected List<Facet> getFacets(String stateid) {
+ return this.facets.get(stateid);
+ }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/FlowVelocityMeasurementArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -68,7 +68,7 @@
/** Create a new state with bogus output. */
protected State spawnState() {
state = new StaticState(STATIC_STATE_NAME);
- List<Facet> fs = facets.get(STATIC_STATE_NAME);
+ List<Facet> fs = getFacets(STATIC_STATE_NAME);
DefaultOutput output = new DefaultOutput(
"general",
"general",
@@ -111,7 +111,7 @@
FLOW_VELOCITY_MEASUREMENT,
"flowvelocity-name");
fs.add(facet);
- facets.put(state.getID(), fs);
+ addFacets(state.getID(), fs);
addStringData(DATA_NAME, code);
}
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/GaugeDischargeArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -102,7 +102,7 @@
if (!fs.isEmpty()) {
logger.debug("Facets to add in GaugeDischargeArtifact.initialize. ("
+ state.getID() + "/ " + getCurrentStateId() + ").");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in GaugeDischargeArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/HYKArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -113,7 +113,7 @@
state.computeInit(this, hash(), context, callMeta, fs);
if (!fs.isEmpty()) {
logger.debug("Facets to add in HYKArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in HYKArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MainValuesArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -97,7 +97,7 @@
state = new StaticState(STATIC_STATE_NAME);
List<Facet> fs = new ArrayList<Facet>();
- facets.put(state.getID(), fs);
+ addFacets(state.getID(), fs);
spawnState();
super.setup(identifier, factory, context, callMeta, data);
String restriction = getDatacageIDValue(data);
@@ -156,7 +156,7 @@
*/
protected State spawnState() {
state = new StaticState(STATIC_STATE_NAME);
- List<Facet> fs = (List<Facet>) facets.get(STATIC_STATE_NAME);
+ List<Facet> fs = (List<Facet>) getFacets(STATIC_STATE_NAME);
DefaultOutput mainValuesOutput = new DefaultOutput(
"computed_discharge_curve",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/ManualPointsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -95,7 +95,7 @@
state.computeInit(this, hash(), context, meta, fs);
if (!fs.isEmpty()) {
logger.debug("Facets to add in ManualPointsArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in ManualPointsArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/MapArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -94,7 +94,7 @@
continue;
}
- List<Facet> fs = facets.get(stateId);
+ List<Facet> fs = getFacets(stateId);
if (fs == null || fs.isEmpty()) {
logger.debug("No facets for previous state found.");
@@ -116,7 +116,7 @@
logger.debug(
"Append output modes for current state: " + cur.getID());
- List<Facet> fs = facets.get(cur.getID());
+ List<Facet> fs = getFacets(cur.getID());
if (fs != null && fs.size() > 0) {
List<Output> generated = generateOutputs(list, fs);
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/QSectorArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -120,7 +120,7 @@
state.computeInit(this, hash(), context, meta, fs);
if (!fs.isEmpty()) {
logger.debug("Facets to add in QSectorArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in QSectorArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new RiverAxisState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticFLYSArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -102,14 +102,19 @@
Document doc,
ElementCreator creator)
{
+ logger.debug("createOutputModes");
+
Element outs = ProtocolUtils.createArtNode(
creator, "outputmodes", null, null);
State state = getCurrentState(cc);
+
+ logger.debug("Current state is " + state.getID());
+
List<Output> list = state.getOutputs();
if (list != null && list.size() > 0) {
- List<Facet> fs = facets.get(state.getID());
+ List<Facet> fs = getFacets(state.getID());
if (fs != null && fs.size() > 0) {
List<Output> generated = generateOutputs(list, fs);
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWKmsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -156,7 +156,7 @@
fs.add(wKmsFacet);
fs.add(csFacet);
fs.add(rpFacet);
- facets.put(state.getID(), fs);
+ addFacets(state.getID(), fs);
}
}
@@ -171,7 +171,7 @@
*/
protected State spawnState() {
state = new StaticState(STATIC_STATE_NAME);
- List<Facet> fs = facets.get(STATIC_STATE_NAME);
+ List<Facet> fs = getFacets(STATIC_STATE_NAME);
DefaultOutput output = new DefaultOutput(
"general",
"general", "image/png",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -117,7 +117,7 @@
state.computeInit(this, hash(), context, meta, fs);
if (!fs.isEmpty()) {
logger.debug("Facets to add in StaticWQKmsArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in StaticWQKmsArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBackgroundArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -41,7 +41,7 @@
state.computeInit(this, hash(), context, meta, fs);
if (!fs.isEmpty()) {
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
}
}
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSBuildingsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new BuildingsState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSCatchmentArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new CatchmentState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSDBArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -74,7 +74,7 @@
state.computeInit(this, hash(), context, callMeta, fs);
if (!fs.isEmpty()) {
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
}
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFixpointsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new FixpointsState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodmapsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new FloodmapsState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSFloodplainArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new FloodplainState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSGaugeLocationArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -59,7 +59,7 @@
public State getCurrentState(Object cc) {
State s = new WMSGaugeLocationState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHwsArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new HwsState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new HydrBoundaryState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSHydrBoundaryPolyArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new HydrBoundaryPolyState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSKmArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -58,7 +58,7 @@
public State getCurrentState(Object cc) {
State s = new WMSKmState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSLineArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new LineState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WMSQPSArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -57,7 +57,7 @@
public State getCurrentState(Object cc) {
State s = new WMSQPSState(this);
- List<Facet> fs = facets.get(getCurrentStateId());
+ List<Facet> fs = getFacets(getCurrentStateId());
DefaultOutput o = new DefaultOutput(
"floodmap",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -133,7 +133,7 @@
wkmsName,
wkmsName));
fs.add(wQFacet);
- facets.put(state.getID(), fs);
+ addFacets(state.getID(), fs);
}
}
else {
@@ -151,7 +151,7 @@
*/
protected State spawnState() {
state = new StaticState(STATIC_STATE_NAME);
- List<Facet> fs = facets.get(STATIC_STATE_NAME);
+ List<Facet> fs = getFacets(STATIC_STATE_NAME);
DefaultOutput output = new DefaultOutput(
"general",
"general",
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java Wed Nov 14 12:37:57 2012 +0100
@@ -96,7 +96,7 @@
state.computeInit(this, hash(), context, meta, fs);
if (!fs.isEmpty()) {
logger.debug("Facets to add in WaterlevelArtifact.initialize .");
- facets.put(getCurrentStateId(), fs);
+ addFacets(getCurrentStateId(), fs);
}
else {
logger.debug("No facets to add in WaterlevelArtifact.initialize ("
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/AttributeWriter.java Wed Nov 14 12:37:57 2012 +0100
@@ -175,6 +175,9 @@
List<ManagedFacet> genuinelyNewFacets = new ArrayList<ManagedFacet>();
boolean debug = logger.isDebugEnabled();
+ if (debug) {
+ logger.debug("Compatible facets are " + compatibleFacets);
+ }
for (int i = 0; i < num; i++) {
ManagedFacet facet = (ManagedFacet) newFacets.get(i);
diff -r f91260ccef03 -r d7e1aee9d51e flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Wed Nov 14 12:37:57 2012 +0100
@@ -18,6 +18,7 @@
import de.intevation.artifactdatabase.Backend;
import de.intevation.artifactdatabase.Backend.PersistentArtifact;
import de.intevation.artifactdatabase.DefaultArtifactCollection;
+import de.intevation.artifactdatabase.state.Facet;
import de.intevation.artifactdatabase.state.Output;
import de.intevation.artifactdatabase.state.Settings;
import de.intevation.artifactdatabase.state.StateEngine;
@@ -334,6 +335,7 @@
long reqBegin = System.currentTimeMillis();
if (debug) {
+ log.debug(XMLUtils.toString(format));
log.debug("FLYSArtifactCollection.out");
}
@@ -375,6 +377,13 @@
Settings settings = null;
if (output != null) {
settings = output.getSettings();
+
+ if (debug) {
+ List<Facet> facets = output.getFacets();
+ for(Facet facet: facets) {
+ log.debug(" -- Facet " + facet.getName());
+ }
+ }
}
generator.init(format, out, context);
diff -r f91260ccef03 -r d7e1aee9d51e flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Wed Nov 14 12:36:30 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DatacageWidget.java Wed Nov 14 12:37:57 2012 +0100
@@ -348,6 +348,7 @@
String out = node.getAttribute("out");
String name = node.getAttribute("facet");
String ids = node.getAttribute("ids");
+ String displayname = node.getAttribute("name");
String debugAttributeValues = "";
for (String attr: node.getAttributes()) {
debugAttributeValues += ("[" + attr +": "
@@ -361,7 +362,7 @@
out,
name,
ids,
- node.getAttribute("name"));
+ displayname);
}
TreeNode [] children = tree.getChildren(node);
if (children != null) {
More information about the Dive4elements-commits
mailing list