1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package net.sumaris.rdf.config;
24
25 import org.nuiton.config.ConfigOptionDef;
26
27 import java.io.File;
28 import java.net.URI;
29 import java.net.URL;
30
31 import static org.nuiton.i18n.I18n.n;
32
33 public enum RdfConfigurationOption implements ConfigOptionDef {
34
35 RDF_ENABLE(
36 "rdf.enable",
37 n("sumaris.config.option.rdf.enable.description"),
38 "false",
39 Boolean.class,
40 false),
41
42
43 RDF_MODEL_DATE(
44 "rdf.model.version",
45 n("sumaris.config.option.rdf.model.version.description"),
46 "2019-11-20",
47 String.class,
48 false),
49
50 RDF_MODEL_PREFIX(
51 "rdf.model.uri",
52 n("sumaris.config.option.rdf.model.uri.description"),
53 "${server.url}/ontologies",
54 String.class,
55 false),
56
57 RDF_MODEL_LANGUAGE(
58 "rdf.model.language",
59 n("sumaris.config.option.rdf.model.language.description"),
60 "en",
61 String.class,
62 false),
63
64 RDF_MODEL_DESCRIPTION(
65 "rdf.model.description",
66 n("sumaris.config.option.rdf.model.description.description"),
67 "A representation of the ${sumaris.name} model",
68 String.class,
69 false),
70
71 RDF_MODEL_COMMENT(
72 "rdf.model.comment",
73 n("sumaris.config.option.rdf.model.comment.description"),
74 "Please see full documentation at ${sumaris.site.doc.url}",
75 String.class,
76 false),
77
78 RDF_MODEL_LICENSE (
79 "rdf.model.license",
80 n("sumaris.config.option.rdf.model.license.description"),
81 "http://www.gnu.org/licenses/gpl-3.0.html",
82 String.class,
83 false),
84
85 RDF_MODEL_AUTHORS (
86 "rdf.model.authors",
87 n("sumaris.config.option.rdf.model.authors.description"),
88 "${sumaris.organizationName}",
89 String.class,
90 false),
91 ;
92
93
94 private final String key;
95
96
97 private final String description;
98
99
100 private final Class<?> type;
101
102
103 private String defaultValue;
104
105
106 private boolean isTransient;
107
108
109 private boolean isFinal;
110
111 RdfConfigurationOption(String key,
112 String description,
113 String defaultValue,
114 Class<?> type,
115 boolean isTransient) {
116 this.key = key;
117 this.description = description;
118 this.defaultValue = defaultValue;
119 this.type = type;
120 this.isTransient = isTransient;
121 this.isFinal = isTransient;
122 }
123
124 RdfConfigurationOption(String key,
125 String description,
126 String defaultValue,
127 Class<?> type) {
128 this(key, description, defaultValue, type, true);
129 }
130
131
132 @Override
133 public String getKey() {
134 return key;
135 }
136
137
138 @Override
139 public Class<?> getType() {
140 return type;
141 }
142
143
144 @Override
145 public String getDescription() {
146 return description;
147 }
148
149
150 @Override
151 public String getDefaultValue() {
152 return defaultValue;
153 }
154
155
156 @Override
157 public boolean isTransient() {
158 return isTransient;
159 }
160
161
162 @Override
163 public boolean isFinal() {
164 return isFinal;
165 }
166
167
168 @Override
169 public void setDefaultValue(String defaultValue) {
170 this.defaultValue = defaultValue;
171 }
172
173
174 @Override
175 public void setTransient(boolean newValue) {
176
177 }
178
179
180 @Override
181 public void setFinal(boolean newValue) {
182
183 }
184
185 }