Mercurial > dive4elements > framework
annotate artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 114:19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
artifacts/trunk@1328 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 18 Feb 2011 14:21:32 +0000 |
parents | 0344a20f8a93 |
children | 8ce06db80857 |
rev | line source |
---|---|
113
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 /* |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 * Copyright (c) 2011 by Intevation GmbH |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 * |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 * This program is free software under the LGPL (>=v2.1) |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 * Read the file LGPL.txt coming with the software for details |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 * or visit http://www.gnu.org/licenses/ if it does not exist. |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 */ |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 package de.intevation.artifacts.common.utils; |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 |
114
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
10 import javax.xml.xpath.XPathConstants; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
11 |
113
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import org.w3c.dom.Document; |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import org.w3c.dom.Element; |
114
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
14 import org.w3c.dom.Node; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
15 import org.w3c.dom.NodeList; |
113
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 import de.intevation.artifacts.common.ArtifactNamespaceContext; |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 /** |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 * This class provides methods that help creating the artifact protocol |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 * documents DESCRIBE, FEED, ADVANCE and OUT. |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 * |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 */ |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public class ClientProtocolUtils { |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
114
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
28 /** The XPath to the current state in the DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
29 public static final String XPATH_CURRENT_STATE = "/art:result/art:state"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
30 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
31 /** The XPath to the static UI part in the DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
32 public static final String XPATH_STATIC = "/art:result/art:ui/art:static"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
33 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
34 /** The XPath to the dynamic UI part in the DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
35 public static final String XPATH_DYNAMIC = "/art:result/art:ui/art:dynamic"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
36 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
37 /** The XPath to the reachable states part in the DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
38 public static final String XPATH_STATES = |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
39 "/art:result/art:reachable-states"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
40 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
41 /** The XPath to the select node relative to the dynamic UI node in the |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
42 * DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
43 public static final String XPATH_DATA_SELECT = "art:select"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
44 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
45 /** The XPath to the choices nodes relative to the select node in the |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
46 * DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
47 public static final String XPATH_DATA_ITEMS = "art:choices/art:item"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
48 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
49 /** The XPath to a label in the artifact's DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
50 public static final String XPATH_LABEL = "art:label/text()"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
51 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
52 /** The XPath to a value in the artifact's DESCRIBE document.*/ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
53 public static final String XPATH_VALUE = "art:value/text()"; |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
54 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
55 |
113
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 /** |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 * It should not be necessary to create instances of this class. |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 */ |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 private ClientProtocolUtils() { |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 } |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 /** |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 * This method creates a new CREATE document. |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 * |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 * @return the CREATE document. |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 */ |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 public static Document newCreateDocument(String factory) { |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 Document doc = XMLUtils.newDocument(); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 doc, |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 ArtifactNamespaceContext.NAMESPACE_URI, |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 ArtifactNamespaceContext.NAMESPACE_PREFIX); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 Element action = cr.create("action"); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 Element type = cr.create("type"); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 Element fac = cr.create("factory"); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 type.setAttribute("name", "create"); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 fac.setAttribute("name", factory); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 action.appendChild(type); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 action.appendChild(fac); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 doc.appendChild(action); |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 return doc; |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 } |
114
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
90 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
91 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
92 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
93 * Returns string value found by {@link XPATH_LABEL} relative to |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
94 * <i>node</i>. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
95 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
96 * @param node A node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
97 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
98 * @return the string value found by {@link XPATH_LABEL}. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
99 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
100 public static String getLabel(Node node) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
101 return (String) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
102 node, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
103 XPATH_LABEL, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
104 XPathConstants.STRING, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
105 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
106 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
107 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
108 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
109 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
110 * Returns string value found by {@link XPATH_VALUE} relative to |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
111 * <i>node</i>. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
112 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
113 * @param node A node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
114 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
115 * @return the string value found by {@link XPATH_VALUE}. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
116 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
117 public static String getValue(Node node) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
118 return (String) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
119 node, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
120 XPATH_VALUE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
121 XPathConstants.STRING, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
122 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
123 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
124 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
125 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
126 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
127 * This method returns the static UI part of the artifact's DESCRIBE |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
128 * document. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
129 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
130 * @param description The document returned by the artifact server's |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
131 * DESCRIBE operation. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
132 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
133 * @return the static UI node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
134 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
135 public static Node getStaticUI(Document description) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
136 return (Node) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
137 description, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
138 XPATH_STATIC, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
139 XPathConstants.NODE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
140 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
141 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
142 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
143 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
144 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
145 * This method returns the dynamic UI part of the artifact's DESCRIBE |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
146 * document. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
147 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
148 * @param description The document returned by the artifact server's |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
149 * DESCRIBE operation. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
150 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
151 * @return the dynamic UI node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
152 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
153 public static Node getDynamicUI(Document description) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
154 return (Node) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
155 description, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
156 XPATH_DYNAMIC, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
157 XPathConstants.NODE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
158 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
159 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
160 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
161 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
162 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
163 * This method returns the current state node contained in the DESCRIBE |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
164 * document. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
165 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
166 * @param description The document returned by the artifact server's |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
167 * DESCRIBE operation. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
168 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
169 * @return the node containing information about the current state. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
170 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
171 public static Node getCurrentState(Document description) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
172 return (Node) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
173 description, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
174 XPATH_CURRENT_STATE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
175 XPathConstants.NODE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
176 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
177 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
178 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
179 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
180 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
181 * This method returns the node that contains information about the |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
182 * reachable states of the artifact in the artifact's DESCRIBE document. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
183 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
184 * @param description The document returned by the artifact server's |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
185 * DESCRIBE operation. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
186 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
187 * @return the node that contains the reachable states. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
188 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
189 public static Node getReachableStates(Document description) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
190 return (Node) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
191 description, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
192 XPATH_STATES, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
193 XPathConstants.NODE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
194 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
195 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
196 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
197 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
198 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
199 * Returns the node found by {@link XPATH_DATA_SELECT}. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
200 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
201 * @param dynamicNode The dynamic UI node of the DESCRIBE document. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
202 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
203 * @return the select node found in the dynamic UI node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
204 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
205 public static Node getSelectNode(Node dynamicNode) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
206 return (Node) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
207 dynamicNode, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
208 XPATH_DATA_SELECT, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
209 XPathConstants.NODE, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
210 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
211 } |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
212 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
213 |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
214 /** |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
215 * Returns the items that could be found in the <i>node</i>. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
216 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
217 * @param node A select node. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
218 * |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
219 * @return the choices nodes as node list. |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
220 */ |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
221 public static NodeList getItemNodes(Node node) { |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
222 return (NodeList) XMLUtils.xpath( |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
223 node, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
224 XPATH_DATA_ITEMS, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
225 XPathConstants.NODESET, |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
226 ArtifactNamespaceContext.INSTANCE); |
19b86e27d0c3
New XPath constants and methods that retrieve important nodes of the DESCRIBE document.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
113
diff
changeset
|
227 } |
113
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
228 } |
0344a20f8a93
Added the ArtifactNamespaceContext and a ClientProtocolUtils that helps working with the artifact protocol.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
229 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |