Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java @ 1780:b503d92dd709
Cosmetics, docs.
flys-artifacts/trunk@3102 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Fri, 28 Oct 2011 09:22:34 +0000 |
parents | 460374a08c44 |
children | 0fe3c4849baa |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Fri Oct 28 09:08:48 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/FLYSArtifactCollection.java Fri Oct 28 09:22:34 2011 +0000 @@ -58,7 +58,9 @@ public static final String XPATH_OUT_TYPE = "/art:action/@art:type"; - public static final String XPATH_MASTER_UUID = "/art:artifact-collection/art:artifact/@art:uuid"; + /** Xpath to master artifacts uuid. */ + public static final String XPATH_MASTER_UUID = + "/art:artifact-collection/art:artifact/@art:uuid"; public static final String XPATH_LOADED_RECOMMENDATIONS = "/art:attribute/art:loaded-recommendations"; @@ -197,13 +199,11 @@ log.info("-> Output subtype = " + subtype); OutGenerator generator = null; - if (type != null && type.length() > 0) { - if (type.indexOf("chartinfo") > 0) { - generator = getOutGenerator(context, type, subtype); - } - else { - generator = getOutGenerator(context, name, subtype); - } + if (type != null + && type.length() > 0 + && type.indexOf("chartinfo") > 0) + { + generator = getOutGenerator(context, type, subtype); } else { generator = getOutGenerator(context, name, subtype); @@ -222,17 +222,16 @@ try{ ArtifactDatabase db = context.getDatabase(); CallMeta callMeta = context.getMeta(); - Document document = - db.getCollectionsMasterArtifact(identifier(), callMeta); - - //log.debug(XMLUtils.toString(document)); + Document document = db.getCollectionsMasterArtifact( + identifier(), callMeta); String masterUUID = XMLUtils.xpathString( - document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE); + document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE); log.debug("Will set master Artifact to uuid: " + masterUUID); generator.setMasterArtifact(getArtifact(masterUUID, context)); - } catch (ArtifactDatabaseException adb) { + } + catch (ArtifactDatabaseException adb) { log.error(adb, adb); } @@ -357,7 +356,8 @@ /** - * Returns the attribute for a specific output type. + * Returns the "attribute" (part of description document) for a specific + * output type. * * @param output The name of the desired output type. *