comparison 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
comparison
equal deleted inserted replaced
289:cf2e8cca02b7 290:995fa6994480
14 14
15 protected String description; 15 protected String description;
16 16
17 protected String mimeType; 17 protected String mimeType;
18 18
19 protected String type;
20
19 protected List<Facet> facets; 21 protected List<Facet> facets;
20 22
21 23
22 /** 24 /**
23 * The default constructor that instantiates a new DefaultOutput object. 25 * The default constructor that instantiates a new DefaultOutput object.
28 */ 30 */
29 public DefaultOutput(String name, String description, String mimeType) { 31 public DefaultOutput(String name, String description, String mimeType) {
30 this.name = name; 32 this.name = name;
31 this.description = description; 33 this.description = description;
32 this.mimeType = mimeType; 34 this.mimeType = mimeType;
35 this.type = "";
33 this.facets = new ArrayList<Facet>(); 36 this.facets = new ArrayList<Facet>();
37 }
38
39
40 public DefaultOutput(
41 String name,
42 String description,
43 String mimeType,
44 String type)
45 {
46 this(name, description, mimeType);
47
48 this.facets = new ArrayList<Facet>();
49 this.type = type;
50 }
51
52
53 public DefaultOutput(
54 String name,
55 String description,
56 String mimeType,
57 List<Facet> facets)
58 {
59 this(name, description, mimeType);
60
61 this.type = "";
62 this.facets = facets;
34 } 63 }
35 64
36 65
37 /** 66 /**
38 * This constructor builds a new Output object that contains facets as well. 67 * This constructor builds a new Output object that contains facets as well.
44 */ 73 */
45 public DefaultOutput( 74 public DefaultOutput(
46 String name, 75 String name,
47 String description, 76 String description,
48 String mimeType, 77 String mimeType,
49 List<Facet> facets) 78 List<Facet> facets,
79 String type)
50 { 80 {
51 this(name, description, mimeType); 81 this(name, description, mimeType, facets);
52 82
53 this.facets = facets; 83 this.type = type;
54 } 84 }
55 85
56 86
57 /** 87 /**
58 * Returns the name of this output. 88 * Returns the name of this output.
82 public String getMimeType() { 112 public String getMimeType() {
83 return mimeType; 113 return mimeType;
84 } 114 }
85 115
86 116
117 public String getType() {
118 return type;
119 }
120
121
87 /** 122 /**
88 * Returns the list of facets supported by this output. 123 * Returns the list of facets supported by this output.
89 * 124 *
90 * @return the list of facets supported by this output. 125 * @return the list of facets supported by this output.
91 */ 126 */

http://dive4elements.wald.intevation.org