Mercurial > dive4elements > framework
annotate 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 |
rev | line source |
---|---|
209
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.artifactdatabase.state; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
3 import java.util.ArrayList; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
4 import java.util.List; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
5 |
209
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 /** |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 * The default implementation of an Output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 * |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 */ |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 public class DefaultOutput implements Output { |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 protected String name; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 protected String description; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 protected String mimeType; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
20 protected List<Facet> facets; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
21 |
209
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 /** |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 * The default constructor that instantiates a new DefaultOutput object. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 * |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 * @param name The name of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 * @param description The description of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 * @param mimeType The mimetype of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 */ |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 public DefaultOutput(String name, String description, String mimeType) { |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 this.name = name; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 this.description = description; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 this.mimeType = mimeType; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 } |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 /** |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
38 * This constructor builds a new Output object that contains facets as well. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
39 * |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
40 * @param name The name of this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
41 * @param description The description of this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
42 * @param mimeType The mimetype of this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
43 * @param facets The list of facets supported by this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
44 */ |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
45 public DefaultOutput( |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
46 String name, |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
47 String description, |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
48 String mimeType, |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
49 List<Facet> facets) |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
50 { |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
51 this(name, description, mimeType); |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
52 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
53 this.facets = facets; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
54 } |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
55 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
56 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
57 /** |
209
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 * Returns the name of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 * |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 * @return the name of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 */ |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public String getName() { |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 return name; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 } |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 /** |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 * Returns the description of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 * |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 * @return the description of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 */ |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 public String getDescription() { |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 return description; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 } |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 /** |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 * Returns the mimetype of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 * |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 * @return the mimetype of this output. |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 */ |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 public String getMimeType() { |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 return mimeType; |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 } |
226
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
85 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
86 |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
87 /** |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
88 * Returns the list of facets supported by this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
89 * |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
90 * @return the list of facets supported by this output. |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
91 */ |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
92 public List<Facet> getFacets() { |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
93 return facets; |
41404961c804
Added support for facets - facets of output modes are read from configuration now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
209
diff
changeset
|
94 } |
209
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 } |
1a3fb29b8b2e
Enhanced the abstract state: the output modes are read now.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |