comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/WQKmsInterpolArtifact.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 c553d4fa3957
children 0251393f037c
comparison
equal deleted inserted replaced
2739:ccc955ef8811 2740:64dc2997b2dd
42 { 42 {
43 /** The logger for this class. */ 43 /** The logger for this class. */
44 private static Logger logger = 44 private static Logger logger =
45 Logger.getLogger(WQKmsInterpolArtifact.class); 45 Logger.getLogger(WQKmsInterpolArtifact.class);
46 46
47 /** XPath to access initial parameter. */
48 public static final String XPATH_DATA =
49 "/art:action/art:ids/@value";
50
51 public static final String STATIC_STATE_NAME = 47 public static final String STATIC_STATE_NAME =
52 "state.additional_wqkms.interpol.static"; 48 "state.additional_wqkms.interpol.static";
53 49
54 /** One and only state to be in. */ 50 /** One and only state to be in. */
55 protected transient State state = null; 51 protected transient State state = null;
78 74
79 state = new StaticState(STATIC_STATE_NAME); 75 state = new StaticState(STATIC_STATE_NAME);
80 76
81 List<Facet> fs = new ArrayList<Facet>(); 77 List<Facet> fs = new ArrayList<Facet>();
82 String code = XMLUtils.xpathString( 78 String code = XMLUtils.xpathString(
83 data, XPATH_DATA, ArtifactNamespaceContext.INSTANCE); 79 data, XPATH_IDS, ArtifactNamespaceContext.INSTANCE);
84 80
85 // TODO Go for JSON, one day. 81 // TODO Go for JSON, one day.
86 //ex.: flood_protection-wstv-114-12 82 //ex.: flood_protection-wstv-114-12
87 if (code != null) { 83 if (code != null) {
88 String [] parts = code.split("-"); 84 String [] parts = code.split("-");

http://dive4elements.wald.intevation.org