Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WaterlevelArtifact.java @ 1765:5d8b3880a553
Do not store association of states to facets, let artifacts keep facets in a pure list.
flys-artifacts/trunk@3083 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Oct 2011 12:23:47 +0000 |
parents | f643ea084213 |
children | c62ff9e72cea |
comparison
equal
deleted
inserted
replaced
1764:87c82499b98f | 1765:5d8b3880a553 |
---|---|
49 Object context, | 49 Object context, |
50 CallMeta callMeta, | 50 CallMeta callMeta, |
51 Document data) | 51 Document data) |
52 { | 52 { |
53 super.setup(identifier, factory, context, callMeta, data); | 53 super.setup(identifier, factory, context, callMeta, data); |
54 filterFacets.put( | 54 if(filterFacets != null) { |
55 "w_differences", | 55 filterFacets.put( |
56 filterFacets.get("longitudinal_section")); | 56 "w_differences", |
57 filterFacets.get("longitudinal_section")); | |
58 } | |
57 } | 59 } |
58 | 60 |
59 /** | 61 /** |
60 * Clone important stuff of an WINFOArtifact. | 62 * Clone important stuff of an WINFOArtifact. |
61 * @param artifact the WINFOArtifact to clone stuff from. | 63 * @param artifact the WINFOArtifact to clone stuff from. |
72 List<Facet> fs = new ArrayList<Facet>(); | 74 List<Facet> fs = new ArrayList<Facet>(); |
73 DefaultState state = (DefaultState) getCurrentState(context); | 75 DefaultState state = (DefaultState) getCurrentState(context); |
74 state.computeInit(this, hash(), context, meta, fs); | 76 state.computeInit(this, hash(), context, meta, fs); |
75 if (!fs.isEmpty()) { | 77 if (!fs.isEmpty()) { |
76 logger.debug("Facets to add in WaterlevelArtifact.initialize ."); | 78 logger.debug("Facets to add in WaterlevelArtifact.initialize ."); |
77 facets.put(getCurrentStateId(), fs); | 79 facets.addAll(fs); |
78 } | 80 } |
79 else { | 81 else { |
80 logger.debug("No facets to add in WaterlevelArtifact.initialize (" | 82 logger.debug("No facets to add in WaterlevelArtifact.initialize (" |
81 + state.getID() + ")."); | 83 + state.getID() + ")."); |
82 } | 84 } |