Mercurial > dive4elements > river
comparison artifacts/src/main/java/org/dive4elements/river/themes/Theme.java @ 9555:ef5754ba5573
Implemented legend aggregation based on type of themes.
Added theme-editor style configuration for aggregated legend entries.
Only configured themes get aggregated.
author | gernotbelger |
---|---|
date | Tue, 23 Oct 2018 16:26:48 +0200 |
parents | af13ceeba52a |
children |
comparison
equal
deleted
inserted
replaced
9554:33ce8eba9806 | 9555:ef5754ba5573 |
---|---|
7 */ | 7 */ |
8 | 8 |
9 package org.dive4elements.river.themes; | 9 package org.dive4elements.river.themes; |
10 | 10 |
11 import org.w3c.dom.Document; | 11 import org.w3c.dom.Document; |
12 import org.w3c.dom.Node; | |
13 | |
14 | 12 |
15 /** | 13 /** |
16 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 14 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
17 */ | 15 */ |
18 public interface Theme { | 16 public interface Theme { |
19 | |
20 /** | |
21 * Method to initialize the theme. | |
22 * | |
23 * @param config The configuration node. | |
24 */ | |
25 void init(Node config); | |
26 | |
27 | 17 |
28 /** | 18 /** |
29 * Returns the name of the theme. | 19 * Returns the name of the theme. |
30 * | 20 * |
31 * @return the name of the theme. | 21 * @return the name of the theme. |
32 */ | 22 */ |
33 String getName(); | 23 String getName(); |
34 | 24 |
35 | |
36 /** | |
37 * Returns the description of the theme. | |
38 * | |
39 * @return the description of the theme. | |
40 */ | |
41 String getDescription(); | 25 String getDescription(); |
42 | |
43 | |
44 String getFacet(); | |
45 | 26 |
46 void setFacet(String facet); | 27 void setFacet(String facet); |
47 | 28 |
48 int getIndex(); | |
49 | |
50 void setIndex(int index); | 29 void setIndex(int index); |
51 | |
52 | |
53 /** | |
54 * Adds a new attribute. | |
55 * | |
56 * @param name The name of the attribute. | |
57 * @param value The value of the attribute. | |
58 */ | |
59 void addAttribute(String name, String value); | |
60 | |
61 | |
62 /** | |
63 * Returns the value of a specific attribute. | |
64 * | |
65 * @param name the name of the attribute. | |
66 * | |
67 * @return the value of the attribute <i>name</i>. | |
68 */ | |
69 String getAttribute(String name); | |
70 | |
71 | |
72 /** | |
73 * Adds a new field to the theme. | |
74 * | |
75 * @param name The name of the field. | |
76 * @param field The field. | |
77 */ | |
78 void addField(String name, ThemeField field); | |
79 | |
80 | |
81 /** | |
82 * Sets the value of an field. | |
83 * | |
84 * @param name The name of the field. | |
85 * @param value The new value of the field. | |
86 */ | |
87 void setFieldValue(String name, Object value); | |
88 | |
89 | |
90 /** | |
91 * Returns the field specified by name. | |
92 * | |
93 * @param name The name of the desired field. | |
94 * | |
95 * @return an field. | |
96 */ | |
97 ThemeField getField(String name); | |
98 | |
99 | |
100 /** | |
101 * Returns the typename of a field. | |
102 * | |
103 * @param name the name of the field. | |
104 * | |
105 * @return the typename of a field. | |
106 */ | |
107 String getFieldType(String name); | |
108 | |
109 | |
110 /** | |
111 * Returns the value of a field. | |
112 * | |
113 * @param name The name of the field. | |
114 * | |
115 * @return the value of a field. | |
116 */ | |
117 Object getFieldValue(String name); | |
118 | |
119 | 30 |
120 /** | 31 /** |
121 * Dumps the theme to XML. | 32 * Dumps the theme to XML. |
122 * | 33 * |
123 * @return a document. | 34 * @return a document. |
124 */ | 35 */ |
125 Document toXML(); | 36 Document toXML(); |
126 } | 37 } |
127 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |