Mercurial > dive4elements > river
changeset 1834:9eedda250280
Extract output names from artifact, not from state. Important when querying recommendations for an artifact with these outputs.
flys-artifacts/trunk@3170 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 04 Nov 2011 13:23:39 +0000 (2011-11-04) |
parents | d4e80e9b40b5 |
children | 35e38e2afb22 |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog Fri Nov 04 12:21:12 2011 +0000 +++ b/flys-artifacts/ChangeLog Fri Nov 04 13:23:39 2011 +0000 @@ -20,6 +20,14 @@ 2011-11-04 Felix Wolfsteller <felix.wolfsteller@intevation.de> + When querying metadata/datacage, use only output-names of outputs that + actually exists (in the sense of having facets). + + * src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java: + Get output names from artifact, not from state. + +2011-11-04 Felix Wolfsteller <felix.wolfsteller@intevation.de> + For a Flys-Collection, add outputt to attributes-part of describe document only if they contain facets. -> Prevent empty output nodes in flys-collections outputs.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java Fri Nov 04 12:21:12 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java Fri Nov 04 13:23:39 2011 +0000 @@ -66,12 +66,15 @@ } + /** + * Get outputnames from current state (only the ones for which + * facets exist). + */ public static String[] extractOutputNames( FLYSArtifact flys, CallContext context) { - State state = flys.getCurrentState(context); - List<Output> outs = state.getOutputs(); + List<Output> outs = flys.getCurrentOutputs(context); int num = outs == null ? 0 : outs.size();