1 package fr.ifremer.quadrige3.batch.shape.config;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 import org.nuiton.config.ConfigOptionDef;
27
28 import java.io.File;
29
30 import static org.nuiton.i18n.I18n.n;
31
32
33
34
35
36
37 public enum ShapeConfigurationOption implements ConfigOptionDef {
38
39
40
41
42
43 INPUT_SHAPES_DIRECTORY(
44 "quadrige3.batch.shape.input.directory",
45 n("quadrige3.batch.shape.config.input.directory.description"),
46 "${quadrige3.data.directory}/shapes_input",
47 File.class),
48
49 OUTPUT_SHAPES_DIRECTORY(
50 "quadrige3.batch.shape.output.directory",
51 n("quadrige3.batch.shape.config.output.directory.description"),
52 "${quadrige3.data.directory}/shapes_output",
53 File.class),
54
55
56
57
58
59 SHAPE_ATTRIBUTE_ID(
60 "quadrige3.batch.shape.attribute.id",
61 n("quadrige3.batch.shape.config.attribute.id.description"),
62 "ID_LDS",
63 String.class),
64
65 SHAPE_ATTRIBUTE_LABEL(
66 "quadrige3.batch.shape.attribute.label",
67 n("quadrige3.batch.shape.config.attribute.label.description"),
68 "MNE_LDS",
69 String.class),
70
71 SHAPE_ATTRIBUTE_NAME(
72 "quadrige3.batch.shape.attribute.name",
73 n("quadrige3.batch.shape.config.attribute.name.description"),
74 "LIB_LDS",
75 String.class),
76
77 SHAPE_ATTRIBUTE_BATHY(
78 "quadrige3.batch.shape.attribute.bathy",
79 n("quadrige3.batch.shape.config.attribute.bathy.description"),
80 "BAT_LDS",
81 String.class),
82
83 SHAPE_ATTRIBUTE_COMMENT(
84 "quadrige3.batch.shape.attribute.comment",
85 n("quadrige3.batch.shape.config.attribute.comment.description"),
86 "COM_LDS",
87 String.class),
88
89 SHAPE_ATTRIBUTE_POS_SYSTEM_ID (
90 "quadrige3.batch.shape.attribute.posSystemId",
91 n("quadrige3.batch.shape.config.attribute.posSystemId.description"),
92 "POS_LDS",
93 String.class),
94
95
96 SHAPE_ATTRIBUTE_UT_FORMAT (
97 "quadrige3.batch.shape.attribute.utFormat",
98 n("quadrige3.batch.shape.config.attribute.utFormat.description"),
99 "UT_LDS",
100 String.class),
101
102 SHAPE_ATTRIBUTE_DAYLIGHT_SAVING_TIME (
103 "quadrige3.batch.shape.attribute.daylightSavingTime",
104 n("quadrige3.batch.shape.config.attribute.daylightSavingTime.description"),
105 "CUT_LDS",
106 String.class),
107
108 ;
109
110
111 private final String key;
112
113
114 private final String description;
115
116
117 private final Class<?> type;
118
119
120 private String defaultValue;
121
122
123 private boolean isTransient;
124
125
126 private boolean isFinal;
127
128 ShapeConfigurationOption(String key,
129 String description,
130 String defaultValue,
131 Class<?> type,
132 boolean isTransient) {
133 this.key = key;
134 this.description = description;
135 this.defaultValue = defaultValue;
136 this.type = type;
137 this.isTransient = isTransient;
138 this.isFinal = isTransient;
139 }
140
141 ShapeConfigurationOption(String key,
142 String description,
143 String defaultValue,
144 Class<?> type) {
145 this(key, description, defaultValue, type, true);
146 }
147
148
149 @Override
150 public String getKey() {
151 return key;
152 }
153
154
155 @Override
156 public Class<?> getType() {
157 return type;
158 }
159
160
161 @Override
162 public String getDescription() {
163 return description;
164 }
165
166
167 @Override
168 public String getDefaultValue() {
169 return defaultValue;
170 }
171
172
173 @Override
174 public boolean isTransient() {
175 return isTransient;
176 }
177
178
179 @Override
180 public boolean isFinal() {
181 return isFinal;
182 }
183
184
185 @Override
186 public void setDefaultValue(String defaultValue) {
187 this.defaultValue = defaultValue;
188 }
189
190
191 @Override
192 public void setTransient(boolean newValue) {
193
194 }
195
196
197 @Override
198 public void setFinal(boolean newValue) {
199
200 }
201 }