diff artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java @ 290:995fa6994480

Outputs can have a member variable 'type' that should make it easier to distinguish the type of an Output. artifacts/trunk@2310 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 08 Jul 2011 08:20:59 +0000
parents 9e12f3fbcf78
children a8e009ebe13c
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Tue Jun 28 07:51:17 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Fri Jul 08 08:20:59 2011 +0000
@@ -16,6 +16,8 @@
 
     protected String mimeType;
 
+    protected String type;
+
     protected List<Facet> facets;
 
 
@@ -30,10 +32,37 @@
         this.name        = name;
         this.description = description;
         this.mimeType    = mimeType;
+        this.type        = "";
         this.facets      = new ArrayList<Facet>();
     }
 
 
+    public DefaultOutput(
+        String      name,
+        String      description,
+        String      mimeType,
+        String      type)
+    {
+        this(name, description, mimeType);
+
+        this.facets = new ArrayList<Facet>();
+        this.type   = type;
+    }
+
+
+    public DefaultOutput(
+        String      name,
+        String      description,
+        String      mimeType,
+        List<Facet> facets)
+    {
+        this(name, description, mimeType);
+
+        this.type   = "";
+        this.facets = facets;
+    }
+
+
     /**
      * This constructor builds a new Output object that contains facets as well.
      *
@@ -46,11 +75,12 @@
         String      name,
         String      description,
         String      mimeType,
-        List<Facet> facets)
+        List<Facet> facets,
+        String      type)
     {
-        this(name, description, mimeType);
+        this(name, description, mimeType, facets);
 
-        this.facets = facets;
+        this.type = type;
     }
 
 
@@ -84,6 +114,11 @@
     }
 
 
+    public String getType() {
+        return type;
+    }
+
+
     /**
      * Returns the list of facets supported by this output.
      *

http://dive4elements.wald.intevation.org