Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
1779:2fe270661b20 | 1780:b503d92dd709 |
---|---|
56 | 56 |
57 public static final String XPATH_OUT_NAME = "/art:action/@art:name"; | 57 public static final String XPATH_OUT_NAME = "/art:action/@art:name"; |
58 | 58 |
59 public static final String XPATH_OUT_TYPE = "/art:action/@art:type"; | 59 public static final String XPATH_OUT_TYPE = "/art:action/@art:type"; |
60 | 60 |
61 public static final String XPATH_MASTER_UUID = "/art:artifact-collection/art:artifact/@art:uuid"; | 61 /** Xpath to master artifacts uuid. */ |
62 public static final String XPATH_MASTER_UUID = | |
63 "/art:artifact-collection/art:artifact/@art:uuid"; | |
62 | 64 |
63 public static final String XPATH_LOADED_RECOMMENDATIONS = | 65 public static final String XPATH_LOADED_RECOMMENDATIONS = |
64 "/art:attribute/art:loaded-recommendations"; | 66 "/art:attribute/art:loaded-recommendations"; |
65 | 67 |
66 | 68 |
195 log.info("-> Output name = " + name); | 197 log.info("-> Output name = " + name); |
196 log.info("-> Output type = " + type); | 198 log.info("-> Output type = " + type); |
197 log.info("-> Output subtype = " + subtype); | 199 log.info("-> Output subtype = " + subtype); |
198 | 200 |
199 OutGenerator generator = null; | 201 OutGenerator generator = null; |
200 if (type != null && type.length() > 0) { | 202 if (type != null |
201 if (type.indexOf("chartinfo") > 0) { | 203 && type.length() > 0 |
202 generator = getOutGenerator(context, type, subtype); | 204 && type.indexOf("chartinfo") > 0) |
203 } | 205 { |
204 else { | 206 generator = getOutGenerator(context, type, subtype); |
205 generator = getOutGenerator(context, name, subtype); | |
206 } | |
207 } | 207 } |
208 else { | 208 else { |
209 generator = getOutGenerator(context, name, subtype); | 209 generator = getOutGenerator(context, name, subtype); |
210 } | 210 } |
211 | 211 |
220 | 220 |
221 // Get master artifact. | 221 // Get master artifact. |
222 try{ | 222 try{ |
223 ArtifactDatabase db = context.getDatabase(); | 223 ArtifactDatabase db = context.getDatabase(); |
224 CallMeta callMeta = context.getMeta(); | 224 CallMeta callMeta = context.getMeta(); |
225 Document document = | 225 Document document = db.getCollectionsMasterArtifact( |
226 db.getCollectionsMasterArtifact(identifier(), callMeta); | 226 identifier(), callMeta); |
227 | |
228 //log.debug(XMLUtils.toString(document)); | |
229 | 227 |
230 String masterUUID = XMLUtils.xpathString( | 228 String masterUUID = XMLUtils.xpathString( |
231 document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE); | 229 document, XPATH_MASTER_UUID, ArtifactNamespaceContext.INSTANCE); |
232 | 230 |
233 log.debug("Will set master Artifact to uuid: " + masterUUID); | 231 log.debug("Will set master Artifact to uuid: " + masterUUID); |
234 generator.setMasterArtifact(getArtifact(masterUUID, context)); | 232 generator.setMasterArtifact(getArtifact(masterUUID, context)); |
235 } catch (ArtifactDatabaseException adb) { | 233 } |
234 catch (ArtifactDatabaseException adb) { | |
236 log.error(adb, adb); | 235 log.error(adb, adb); |
237 } | 236 } |
238 | 237 |
239 try { | 238 try { |
240 Document attr = getAttribute(context, name); | 239 Document attr = getAttribute(context, name); |
355 oParser.getOuts()).write(); | 354 oParser.getOuts()).write(); |
356 } | 355 } |
357 | 356 |
358 | 357 |
359 /** | 358 /** |
360 * Returns the attribute for a specific output type. | 359 * Returns the "attribute" (part of description document) for a specific |
360 * output type. | |
361 * | 361 * |
362 * @param output The name of the desired output type. | 362 * @param output The name of the desired output type. |
363 * | 363 * |
364 * @return the attribute for the desired output type. | 364 * @return the attribute for the desired output type. |
365 */ | 365 */ |