Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java @ 1770:e8a98eee816d
Cosmetics, documentation.
flys-artifacts/trunk@3091 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 26 Oct 2011 12:55:32 +0000 |
parents | a70e0cbc5e02 |
children | 2fe270661b20 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java Wed Oct 26 12:54:22 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java Wed Oct 26 12:55:32 2011 +0000 @@ -22,11 +22,10 @@ public class OutputParser { - /** Constant XPath that points to the outputmodes of an artifact.*/ + /** Constant XPath that points to the outputmodes of an artifact. */ public static final String XPATH_ARTIFACT_OUTPUTMODES = "/art:result/art:outputmodes/art:output"; - private static Logger logger = Logger.getLogger(OutputParser.class); protected ArtifactDatabase db; @@ -36,6 +35,9 @@ protected Map<String, Output> outs; + /** + * @param db Database used to fetch artifacts, outputs and facets. + */ public OutputParser(ArtifactDatabase db, CallContext context) { this.db = db; this.meta = context.getMeta(); @@ -44,6 +46,11 @@ } + /** + * Gets raw facet with given id and sorts outputs in mapping. + * Converts Facets to ManagedFacets on the way. + * @param uuid uuid of artifact to load from database. + */ public void parse(String uuid) throws ArtifactDatabaseException { @@ -66,10 +73,10 @@ out.getMimeType(), new ArrayList<Facet>(), out.getType()); - outs.put(name, o); } else { + logger.debug("OutputParser.parse: Use 'old' Output"); pos = o.getFacets().size() + 1; } @@ -79,6 +86,9 @@ } + /** + * Access mapping of Outputname to Output. + */ public Map<String, Output> getOuts() { return outs; }