Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/StaticWQKmsArtifact.java @ 2740:64dc2997b2dd
Refactor static xpath, other artifacts will come in a later commit.
flys-artifacts/trunk@4474 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 23 May 2012 10:04:11 +0000 |
parents | 79a94c4171cb |
children | 0251393f037c |
comparison
equal
deleted
inserted
replaced
2739:ccc955ef8811 | 2740:64dc2997b2dd |
---|---|
37 { | 37 { |
38 /** The logger for this class. */ | 38 /** The logger for this class. */ |
39 private static Logger logger = | 39 private static Logger logger = |
40 Logger.getLogger(StaticWQKmsArtifact.class); | 40 Logger.getLogger(StaticWQKmsArtifact.class); |
41 | 41 |
42 /** XPath to access initial parameter. */ | |
43 public static final String XPATH_DATA = | |
44 "/art:action/art:ids/@value"; | |
45 | |
46 public static final String STATIC_STATE_NAME = | 42 public static final String STATIC_STATE_NAME = |
47 "state.additional_wqkms.static"; | 43 "state.additional_wqkms.static"; |
48 | 44 |
49 | 45 |
50 /** | 46 /** |
70 | 66 |
71 // Store the 'ids' (from datacage). | 67 // Store the 'ids' (from datacage). |
72 logger.debug("StaticWQKmsArtiact.setup" + XMLUtils.toString(data)); | 68 logger.debug("StaticWQKmsArtiact.setup" + XMLUtils.toString(data)); |
73 | 69 |
74 String code = XMLUtils.xpathString( | 70 String code = XMLUtils.xpathString( |
75 data, XPATH_DATA, ArtifactNamespaceContext.INSTANCE); | 71 data, XPATH_IDS, ArtifactNamespaceContext.INSTANCE); |
76 addStringData("ids", code); | 72 addStringData("ids", code); |
77 if (code != null) { | 73 if (code != null) { |
78 String [] parts = code.split("-"); | 74 String [] parts = code.split("-"); |
79 | 75 |
80 if (parts.length >= 4) { | 76 if (parts.length >= 4) { |