changeset 932:9ff7e06bcb77

Artifacts and Collections now support the 'type' member of Outputs. flys-artifacts/trunk@2311 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 08 Jul 2011 08:26:18 +0000
parents 057cc0bf4aef
children 34136924661b
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java
diffstat 3 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed Jul 06 13:41:36 2011 +0000
+++ b/flys-artifacts/ChangeLog	Fri Jul 08 08:26:18 2011 +0000
@@ -1,3 +1,12 @@
+2011-07-08  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java: The
+	  Outputs created while generating the DESCRIBE document will now have the
+	  'type' member set.
+
+	* src/main/java/de/intevation/flys/collections/OutputParser.java: Read the
+	  'type' member from DESCRIBE document.
+
 2011-07-06  Ingo Weinzierl <ingo@intevation.de>
 
 	* doc/conf/artifacts/winfo.xml: Removed a typo.
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Wed Jul 06 13:41:36 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/WINFOArtifact.java	Fri Jul 08 08:26:18 2011 +0000
@@ -240,7 +240,8 @@
             Output o = new DefaultOutput(
                 out.getName(),
                 out.getDescription(),
-                out.getMimeType());
+                out.getMimeType(),
+                out.getType());
 
             Set<String> outTypes = new HashSet<String>();
 
--- a/flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java	Wed Jul 06 13:41:36 2011 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/collections/OutputParser.java	Fri Jul 08 08:26:18 2011 +0000
@@ -112,8 +112,9 @@
 
         String desc     = out.getAttributeNS(uri, "description");
         String mimetype = out.getAttributeNS(uri, "mime-type");
+        String type     = out.getAttributeNS(uri, "type");
 
-        Output o = new DefaultOutput(name, desc, mimetype);
+        Output o = new DefaultOutput(name, desc, mimetype, type);
 
         outs.put(name, o);
     }

http://dive4elements.wald.intevation.org