Mercurial > dive4elements > river
diff 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 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/CollectionHelper.java Thu Oct 13 10:22:39 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/CollectionHelper.java Thu Oct 13 12:25:07 2011 +0000 @@ -267,7 +267,7 @@ /** - * This method takes the DESCRIBE document of the Collections describe() + * Take the DESCRIBE document of the Collections describe() * operation and extracts the information about the collection itself and * the collection items. * @@ -299,8 +299,13 @@ "art:artifact-collection/@art:name", ArtifactNamespaceContext.INSTANCE); - if (uuid.length() == 0 || ttlStr.length() == 0) { - System.err.println("Found an invalid Collection!"); + if (uuid.length() == 0) { + System.err.println("Found an invalid (zero length uuid) Collection!"); + return null; + } + + if (ttlStr.length() == 0) { + System.err.println("Found an invalid Collectioni (zero length ttl)!"); return null; } @@ -611,6 +616,11 @@ } + /** + * Add an artifact to a collection. + * @param collection Collection to add artifact to. + * @param artifact Artifact to add to collection + */ public static Collection addArtifact( Collection collection, Artifact artifact,