Mercurial > dive4elements > framework
comparison artifacts-common/src/main/java/de/intevation/artifacts/common/utils/ClientProtocolUtils.java @ 223:91333a41b234
Enhanced the ClientProtocolUtils with a method to create a document to trigger the DESCRIBE operation of a collection.
artifacts/trunk@1616 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 30 Mar 2011 07:50:01 +0000 |
parents | ecfc33a4ba3d |
children | ab196a861796 |
comparison
equal
deleted
inserted
replaced
222:98695dc6d94d | 223:91333a41b234 |
---|---|
265 return doc; | 265 return doc; |
266 } | 266 } |
267 | 267 |
268 | 268 |
269 /** | 269 /** |
270 * This method creates a new Document that is used to trigger the DESCRIBE | |
271 * operation of a collection in the artifact server. | |
272 * | |
273 * @param uuid The identifier of the collection that should be described. | |
274 * | |
275 * @return the document to describe a collection. | |
276 */ | |
277 public static Document newDescribeCollectionDocument(String uuid) { | |
278 Document doc = XMLUtils.newDocument(); | |
279 | |
280 XMLUtils.ElementCreator cr = new XMLUtils.ElementCreator( | |
281 doc, | |
282 ArtifactNamespaceContext.NAMESPACE_URI, | |
283 ArtifactNamespaceContext.NAMESPACE_PREFIX); | |
284 | |
285 Element action = cr.create("action"); | |
286 Element type = cr.create("type"); | |
287 cr.addAttr(type, "name", "describe"); | |
288 | |
289 action.appendChild(type); | |
290 | |
291 doc.appendChild(action); | |
292 | |
293 return doc; | |
294 } | |
295 | |
296 | |
297 /** | |
270 * Returns string value found by {@link XPATH_LABEL} relative to | 298 * Returns string value found by {@link XPATH_LABEL} relative to |
271 * <i>node</i>. | 299 * <i>node</i>. |
272 * | 300 * |
273 * @param node A node. | 301 * @param node A node. |
274 * | 302 * |