comparison 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
comparison
equal deleted inserted replaced
224:da92e7f8040b 226:41404961c804
1 package de.intevation.artifactdatabase.state; 1 package de.intevation.artifactdatabase.state;
2
3 import java.util.ArrayList;
4 import java.util.List;
2 5
3 6
4 /** 7 /**
5 * The default implementation of an Output. 8 * The default implementation of an Output.
6 * 9 *
12 15
13 protected String description; 16 protected String description;
14 17
15 protected String mimeType; 18 protected String mimeType;
16 19
20 protected List<Facet> facets;
21
17 22
18 /** 23 /**
19 * The default constructor that instantiates a new DefaultOutput object. 24 * The default constructor that instantiates a new DefaultOutput object.
20 * 25 *
21 * @param name The name of this output. 26 * @param name The name of this output.
24 */ 29 */
25 public DefaultOutput(String name, String description, String mimeType) { 30 public DefaultOutput(String name, String description, String mimeType) {
26 this.name = name; 31 this.name = name;
27 this.description = description; 32 this.description = description;
28 this.mimeType = mimeType; 33 this.mimeType = mimeType;
34 }
35
36
37 /**
38 * This constructor builds a new Output object that contains facets as well.
39 *
40 * @param name The name of this output.
41 * @param description The description of this output.
42 * @param mimeType The mimetype of this output.
43 * @param facets The list of facets supported by this output.
44 */
45 public DefaultOutput(
46 String name,
47 String description,
48 String mimeType,
49 List<Facet> facets)
50 {
51 this(name, description, mimeType);
52
53 this.facets = facets;
29 } 54 }
30 55
31 56
32 /** 57 /**
33 * Returns the name of this output. 58 * Returns the name of this output.
55 * @return the mimetype of this output. 80 * @return the mimetype of this output.
56 */ 81 */
57 public String getMimeType() { 82 public String getMimeType() {
58 return mimeType; 83 return mimeType;
59 } 84 }
85
86
87 /**
88 * Returns the list of facets supported by this output.
89 *
90 * @return the list of facets supported by this output.
91 */
92 public List<Facet> getFacets() {
93 return facets;
94 }
60 } 95 }
61 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 96 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org