# HG changeset patch # User Felix Wolfsteller # Date 1320413019 0 # Node ID 9eedda250280ebb61a7879713ab8fe0631d6c42a # Parent d4e80e9b40b56eeabbe365de846e80ff33fcc6ce 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 diff -r d4e80e9b40b5 -r 9eedda250280 flys-artifacts/ChangeLog --- 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 + 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 + 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. diff -r d4e80e9b40b5 -r 9eedda250280 flys-artifacts/src/main/java/de/intevation/flys/artifacts/CollectionMonitor.java --- 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 outs = state.getOutputs(); + List outs = flys.getCurrentOutputs(context); int num = outs == null ? 0 : outs.size();