comparison flys-client/src/main/java/de/intevation/flys/client/server/CollectionHelper.java @ 1318:ecd0243bc09e

Cosmetics, docs. flys-client/trunk@2959 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Thu, 13 Oct 2011 12:25:07 +0000
parents 478a571f1f94
children 5733c05ce24c
comparison
equal deleted inserted replaced
1317:45b9b1fc26e2 1318:ecd0243bc09e
265 return recommendation; 265 return recommendation;
266 } 266 }
267 267
268 268
269 /** 269 /**
270 * This method takes the DESCRIBE document of the Collections describe() 270 * Take the DESCRIBE document of the Collections describe()
271 * operation and extracts the information about the collection itself and 271 * operation and extracts the information about the collection itself and
272 * the collection items. 272 * the collection items.
273 * 273 *
274 * @param description The DESCRIBE document of the Collections describe() 274 * @param description The DESCRIBE document of the Collections describe()
275 * operation. 275 * operation.
297 String name = XMLUtils.xpathString( 297 String name = XMLUtils.xpathString(
298 description, 298 description,
299 "art:artifact-collection/@art:name", 299 "art:artifact-collection/@art:name",
300 ArtifactNamespaceContext.INSTANCE); 300 ArtifactNamespaceContext.INSTANCE);
301 301
302 if (uuid.length() == 0 || ttlStr.length() == 0) { 302 if (uuid.length() == 0) {
303 System.err.println("Found an invalid Collection!"); 303 System.err.println("Found an invalid (zero length uuid) Collection!");
304 return null;
305 }
306
307 if (ttlStr.length() == 0) {
308 System.err.println("Found an invalid Collectioni (zero length ttl)!");
304 return null; 309 return null;
305 } 310 }
306 311
307 312
308 long ttl = -1; 313 long ttl = -1;
609 614
610 return recs; 615 return recs;
611 } 616 }
612 617
613 618
619 /**
620 * Add an artifact to a collection.
621 * @param collection Collection to add artifact to.
622 * @param artifact Artifact to add to collection
623 */
614 public static Collection addArtifact( 624 public static Collection addArtifact(
615 Collection collection, 625 Collection collection,
616 Artifact artifact, 626 Artifact artifact,
617 String url, 627 String url,
618 String locale) 628 String locale)

http://dive4elements.wald.intevation.org