comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 211:435631e07da2

Enhanced the ProtocolUtils and ClientProtocolUtils to append and retrieve output modes. artifacts/trunk@1543 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 23 Mar 2011 10:47:48 +0000
parents 8ea4d0824d8f
children d7042094f7b7
comparison
equal deleted inserted replaced
210:b75fca1ac215 211:435631e07da2
36 36
37 /** The XPath to the reachable states part in the DESCRIBE document.*/ 37 /** The XPath to the reachable states part in the DESCRIBE document.*/
38 public static final String XPATH_STATES = 38 public static final String XPATH_STATES =
39 "/art:result/art:reachable-states"; 39 "/art:result/art:reachable-states";
40 40
41 /** The XPath to the output modes in the DESCRIBE document.*/
42 public static final String XPATH_OUTPUT_MODES =
43 "/art:result/art:outputmodes/art:output";
44
45
41 /** The XPath to the select node relative to the dynamic UI node in the 46 /** The XPath to the select node relative to the dynamic UI node in the
42 * DESCRIBE document.*/ 47 * DESCRIBE document.*/
43 public static final String XPATH_DATA_SELECT = "art:select"; 48 public static final String XPATH_DATA_SELECT = "art:select";
44 49
45 /** The XPath to the choices nodes relative to the select node in the 50 /** The XPath to the choices nodes relative to the select node in the
324 ArtifactNamespaceContext.INSTANCE); 329 ArtifactNamespaceContext.INSTANCE);
325 } 330 }
326 331
327 332
328 /** 333 /**
334 * This method returns the output mode nodes of the DESCRIBE document.
335 *
336 * @param description The document returned by the artifact server's
337 * DESCRIBE operation.
338 *
339 * @return the node that contains the output modes.
340 */
341 public static NodeList getOutputModes(Document description) {
342 return (NodeList) XMLUtils.xpath(
343 description,
344 XPATH_OUTPUT_MODES,
345 XPathConstants.NODESET,
346 ArtifactNamespaceContext.INSTANCE);
347 }
348
349
350 /**
329 * Returns the node found by {@link XPATH_DATA_SELECT}. 351 * Returns the node found by {@link XPATH_DATA_SELECT}.
330 * 352 *
331 * @param dynamicNode The dynamic UI node of the DESCRIBE document. 353 * @param dynamicNode The dynamic UI node of the DESCRIBE document.
332 * 354 *
333 * @return the select node found in the dynamic UI node. 355 * @return the select node found in the dynamic UI node.

http://dive4elements.wald.intevation.org