diff artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java @ 226:41404961c804

Added support for facets - facets of output modes are read from configuration now. artifacts/trunk@1626 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 30 Mar 2011 14:45:15 +0000
parents 1a3fb29b8b2e
children fbd57d2eeaef
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Wed Mar 30 13:35:37 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultOutput.java	Wed Mar 30 14:45:15 2011 +0000
@@ -1,5 +1,8 @@
 package de.intevation.artifactdatabase.state;
 
+import java.util.ArrayList;
+import java.util.List;
+
 
 /**
  * The default implementation of an Output.
@@ -14,6 +17,8 @@
 
     protected String mimeType;
 
+    protected List<Facet> facets;
+
 
     /**
      * The default constructor that instantiates a new DefaultOutput object.
@@ -30,6 +35,26 @@
 
 
     /**
+     * This constructor builds a new Output object that contains facets as well.
+     *
+     * @param name The name of this output.
+     * @param description The description of this output.
+     * @param mimeType The mimetype of this output.
+     * @param facets The list of facets supported by this output.
+     */
+    public DefaultOutput(
+        String      name,
+        String      description,
+        String      mimeType,
+        List<Facet> facets)
+    {
+        this(name, description, mimeType);
+
+        this.facets = facets;
+    }
+
+
+    /**
      * Returns the name of this output.
      *
      * @return the name of this output.
@@ -57,5 +82,15 @@
     public String getMimeType() {
         return mimeType;
     }
+
+
+    /**
+     * Returns the list of facets supported by this output.
+     *
+     * @return the list of facets supported by this output.
+     */
+    public List<Facet> getFacets() {
+        return facets;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org