Mercurial > dive4elements > river
changeset 4504:d7e1aee9d51e
Merged.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Wed, 14 Nov 2012 12:37:57 +0100 |
parents | f91260ccef03 (current diff) 5b0a545fceef (diff) |
children | 1983f5706578 |
files | |
diffstat | 37 files changed, 86 insertions(+), 84 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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();
--- 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(
--- 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);
--- 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
--- 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",
--- 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 :
--- 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); }
--- 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 ("
--- 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 ("
--- 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",
--- 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 ("
--- 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);
--- 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 ("
--- 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",
--- 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);
--- 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",
--- 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 ("
--- 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); } } }
--- 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",
--- 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",
--- 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); } }
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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",
--- 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 ("
--- 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);
--- 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);
--- 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) {