1 |
46537
|
alessia.ba
|
package eu.dnetlib;
|
2 |
|
|
|
3 |
|
|
import org.springframework.beans.factory.annotation.Value;
|
4 |
48399
|
claudio.at
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
5 |
|
|
import org.springframework.core.io.ClassPathResource;
|
6 |
|
|
import org.springframework.core.io.Resource;
|
7 |
|
|
import org.springframework.stereotype.Component;
|
8 |
46537
|
alessia.ba
|
|
9 |
|
|
/**
|
10 |
|
|
* Created by Alessia Bardi on 31/03/17.
|
11 |
|
|
*
|
12 |
|
|
* @author Alessia Bardi
|
13 |
|
|
*/
|
14 |
48399
|
claudio.at
|
@Component
|
15 |
|
|
@ConfigurationProperties(prefix = "openaire.exporter")
|
16 |
48332
|
claudio.at
|
public class OpenaireExporterConfig {
|
17 |
46537
|
alessia.ba
|
|
18 |
48399
|
claudio.at
|
// ISLOOKUP
|
19 |
|
|
private ClassPathResource findSolrIndexUrl;
|
20 |
|
|
private ClassPathResource findIndexDsInfo;
|
21 |
|
|
private String isLookupUrl;
|
22 |
|
|
private int requestWorkers = 100;
|
23 |
|
|
private int requestTimeout = 10;
|
24 |
46537
|
alessia.ba
|
|
25 |
48399
|
claudio.at
|
private Datasource datasource;
|
26 |
|
|
private Project project;
|
27 |
|
|
private Jdbc jdbc;
|
28 |
|
|
private Swagger swagger;
|
29 |
48975
|
claudio.at
|
private Vocabularies vocabularies;
|
30 |
48332
|
claudio.at
|
|
31 |
48399
|
claudio.at
|
public static class Datasource {
|
32 |
|
|
// MONGODB
|
33 |
|
|
private String mongoHost;
|
34 |
|
|
private int mongoPort;
|
35 |
|
|
private String mongoCollectionName;
|
36 |
|
|
private String mongoDbName;
|
37 |
|
|
private int mongoConnectionsPerHost;
|
38 |
|
|
private int mongoQueryLimit;
|
39 |
48362
|
claudio.at
|
|
40 |
48399
|
claudio.at
|
public String getMongoHost() {
|
41 |
|
|
return mongoHost;
|
42 |
|
|
}
|
43 |
|
|
|
44 |
|
|
public void setMongoHost(final String mongoHost) {
|
45 |
|
|
this.mongoHost = mongoHost;
|
46 |
|
|
}
|
47 |
|
|
|
48 |
|
|
public int getMongoPort() {
|
49 |
|
|
return mongoPort;
|
50 |
|
|
}
|
51 |
|
|
|
52 |
|
|
public void setMongoPort(final int mongoPort) {
|
53 |
|
|
this.mongoPort = mongoPort;
|
54 |
|
|
}
|
55 |
|
|
|
56 |
|
|
public String getMongoCollectionName() {
|
57 |
|
|
return mongoCollectionName;
|
58 |
|
|
}
|
59 |
|
|
|
60 |
|
|
public void setMongoCollectionName(final String mongoCollectionName) {
|
61 |
|
|
this.mongoCollectionName = mongoCollectionName;
|
62 |
|
|
}
|
63 |
|
|
|
64 |
|
|
public String getMongoDbName() {
|
65 |
|
|
return mongoDbName;
|
66 |
|
|
}
|
67 |
|
|
|
68 |
|
|
public void setMongoDbName(final String mongoDbName) {
|
69 |
|
|
this.mongoDbName = mongoDbName;
|
70 |
|
|
}
|
71 |
|
|
|
72 |
|
|
public int getMongoConnectionsPerHost() {
|
73 |
|
|
return mongoConnectionsPerHost;
|
74 |
|
|
}
|
75 |
|
|
|
76 |
|
|
public void setMongoConnectionsPerHost(final int mongoConnectionsPerHost) {
|
77 |
|
|
this.mongoConnectionsPerHost = mongoConnectionsPerHost;
|
78 |
|
|
}
|
79 |
|
|
|
80 |
|
|
public int getMongoQueryLimit() {
|
81 |
|
|
return mongoQueryLimit;
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
public void setMongoQueryLimit(final int mongoQueryLimit) {
|
85 |
|
|
this.mongoQueryLimit = mongoQueryLimit;
|
86 |
|
|
}
|
87 |
48362
|
claudio.at
|
}
|
88 |
|
|
|
89 |
48399
|
claudio.at
|
public static class Project {
|
90 |
|
|
|
91 |
48625
|
claudio.at
|
private int flushSize;
|
92 |
48399
|
claudio.at
|
private String tsvFields;
|
93 |
|
|
private Resource projectsFundingQueryTemplate;
|
94 |
|
|
private Resource dspaceTemplate;
|
95 |
|
|
private Resource dspaceHeadTemplate;
|
96 |
|
|
private Resource dspaceTailTemplate;
|
97 |
|
|
private Resource eprintsTemplate;
|
98 |
|
|
|
99 |
48625
|
claudio.at
|
public int getFlushSize() {
|
100 |
|
|
return flushSize;
|
101 |
48399
|
claudio.at
|
}
|
102 |
|
|
|
103 |
48625
|
claudio.at
|
public void setFlushSize(final int flushSize) {
|
104 |
|
|
this.flushSize = flushSize;
|
105 |
48399
|
claudio.at
|
}
|
106 |
|
|
|
107 |
|
|
public String getTsvFields() {
|
108 |
|
|
return tsvFields;
|
109 |
|
|
}
|
110 |
|
|
|
111 |
|
|
public void setTsvFields(final String tsvFields) {
|
112 |
|
|
this.tsvFields = tsvFields;
|
113 |
|
|
}
|
114 |
|
|
|
115 |
|
|
public Resource getProjectsFundingQueryTemplate() {
|
116 |
|
|
return projectsFundingQueryTemplate;
|
117 |
|
|
}
|
118 |
|
|
|
119 |
|
|
public void setProjectsFundingQueryTemplate(final Resource projectsFundingQueryTemplate) {
|
120 |
|
|
this.projectsFundingQueryTemplate = projectsFundingQueryTemplate;
|
121 |
|
|
}
|
122 |
|
|
|
123 |
|
|
public Resource getDspaceTemplate() {
|
124 |
|
|
return dspaceTemplate;
|
125 |
|
|
}
|
126 |
|
|
|
127 |
|
|
public void setDspaceTemplate(final Resource dspaceTemplate) {
|
128 |
|
|
this.dspaceTemplate = dspaceTemplate;
|
129 |
|
|
}
|
130 |
|
|
|
131 |
|
|
public Resource getDspaceHeadTemplate() {
|
132 |
|
|
return dspaceHeadTemplate;
|
133 |
|
|
}
|
134 |
|
|
|
135 |
|
|
public void setDspaceHeadTemplate(final Resource dspaceHeadTemplate) {
|
136 |
|
|
this.dspaceHeadTemplate = dspaceHeadTemplate;
|
137 |
|
|
}
|
138 |
|
|
|
139 |
|
|
public Resource getDspaceTailTemplate() {
|
140 |
|
|
return dspaceTailTemplate;
|
141 |
|
|
}
|
142 |
|
|
|
143 |
|
|
public void setDspaceTailTemplate(final Resource dspaceTailTemplate) {
|
144 |
|
|
this.dspaceTailTemplate = dspaceTailTemplate;
|
145 |
|
|
}
|
146 |
|
|
|
147 |
|
|
public Resource getEprintsTemplate() {
|
148 |
|
|
return eprintsTemplate;
|
149 |
|
|
}
|
150 |
|
|
|
151 |
|
|
public void setEprintsTemplate(final Resource eprintsTemplate) {
|
152 |
|
|
this.eprintsTemplate = eprintsTemplate;
|
153 |
|
|
}
|
154 |
48332
|
claudio.at
|
}
|
155 |
|
|
|
156 |
48399
|
claudio.at
|
public static class Jdbc {
|
157 |
|
|
|
158 |
|
|
// JDBC
|
159 |
|
|
@Value("${spring.datasource.driverClassName}")
|
160 |
|
|
private String driverClassName;
|
161 |
|
|
|
162 |
|
|
private String url;
|
163 |
|
|
private String user;
|
164 |
|
|
private String pwd;
|
165 |
|
|
private int minIdle;
|
166 |
|
|
private int maxidle;
|
167 |
|
|
private int maxRows;
|
168 |
|
|
|
169 |
|
|
public String getDriverClassName() {
|
170 |
|
|
return driverClassName;
|
171 |
|
|
}
|
172 |
|
|
|
173 |
|
|
public String getUrl() {
|
174 |
|
|
return url;
|
175 |
|
|
}
|
176 |
|
|
|
177 |
|
|
public void setUrl(final String url) {
|
178 |
|
|
this.url = url;
|
179 |
|
|
}
|
180 |
|
|
|
181 |
|
|
public String getUser() {
|
182 |
|
|
return user;
|
183 |
|
|
}
|
184 |
|
|
|
185 |
|
|
public void setUser(final String user) {
|
186 |
|
|
this.user = user;
|
187 |
|
|
}
|
188 |
|
|
|
189 |
|
|
public String getPwd() {
|
190 |
|
|
return pwd;
|
191 |
|
|
}
|
192 |
|
|
|
193 |
|
|
public void setPwd(final String pwd) {
|
194 |
|
|
this.pwd = pwd;
|
195 |
|
|
}
|
196 |
|
|
|
197 |
|
|
public int getMinIdle() {
|
198 |
|
|
return minIdle;
|
199 |
|
|
}
|
200 |
|
|
|
201 |
|
|
public void setMinIdle(final int minIdle) {
|
202 |
|
|
this.minIdle = minIdle;
|
203 |
|
|
}
|
204 |
|
|
|
205 |
|
|
public int getMaxidle() {
|
206 |
|
|
return maxidle;
|
207 |
|
|
}
|
208 |
|
|
|
209 |
|
|
public void setMaxidle(final int maxidle) {
|
210 |
|
|
this.maxidle = maxidle;
|
211 |
|
|
}
|
212 |
|
|
|
213 |
|
|
public int getMaxRows() {
|
214 |
|
|
return maxRows;
|
215 |
|
|
}
|
216 |
|
|
|
217 |
|
|
public void setMaxRows(final int maxRows) {
|
218 |
|
|
this.maxRows = maxRows;
|
219 |
|
|
}
|
220 |
46537
|
alessia.ba
|
}
|
221 |
|
|
|
222 |
48399
|
claudio.at
|
public static class Swagger {
|
223 |
|
|
private String apiTitle;
|
224 |
|
|
private String apiDescription;
|
225 |
|
|
private String apiLicense;
|
226 |
|
|
private String apiLicenseUrl;
|
227 |
|
|
private String apiContactName;
|
228 |
|
|
private String apiContactUrl;
|
229 |
|
|
private String apiContactEmail;
|
230 |
|
|
|
231 |
|
|
public String getApiTitle() {
|
232 |
|
|
return apiTitle;
|
233 |
|
|
}
|
234 |
|
|
|
235 |
|
|
public void setApiTitle(final String apiTitle) {
|
236 |
|
|
this.apiTitle = apiTitle;
|
237 |
|
|
}
|
238 |
|
|
|
239 |
|
|
public String getApiDescription() {
|
240 |
|
|
return apiDescription;
|
241 |
|
|
}
|
242 |
|
|
|
243 |
|
|
public void setApiDescription(final String apiDescription) {
|
244 |
|
|
this.apiDescription = apiDescription;
|
245 |
|
|
}
|
246 |
|
|
|
247 |
|
|
public String getApiLicense() {
|
248 |
|
|
return apiLicense;
|
249 |
|
|
}
|
250 |
|
|
|
251 |
|
|
public void setApiLicense(final String apiLicense) {
|
252 |
|
|
this.apiLicense = apiLicense;
|
253 |
|
|
}
|
254 |
|
|
|
255 |
|
|
public String getApiLicenseUrl() {
|
256 |
|
|
return apiLicenseUrl;
|
257 |
|
|
}
|
258 |
|
|
|
259 |
|
|
public void setApiLicenseUrl(final String apiLicenseUrl) {
|
260 |
|
|
this.apiLicenseUrl = apiLicenseUrl;
|
261 |
|
|
}
|
262 |
|
|
|
263 |
|
|
public String getApiContactName() {
|
264 |
|
|
return apiContactName;
|
265 |
|
|
}
|
266 |
|
|
|
267 |
|
|
public void setApiContactName(final String apiContactName) {
|
268 |
|
|
this.apiContactName = apiContactName;
|
269 |
|
|
}
|
270 |
|
|
|
271 |
|
|
public String getApiContactUrl() {
|
272 |
|
|
return apiContactUrl;
|
273 |
|
|
}
|
274 |
|
|
|
275 |
|
|
public void setApiContactUrl(final String apiContactUrl) {
|
276 |
|
|
this.apiContactUrl = apiContactUrl;
|
277 |
|
|
}
|
278 |
|
|
|
279 |
|
|
public String getApiContactEmail() {
|
280 |
|
|
return apiContactEmail;
|
281 |
|
|
}
|
282 |
|
|
|
283 |
|
|
public void setApiContactEmail(final String apiContactEmail) {
|
284 |
|
|
this.apiContactEmail = apiContactEmail;
|
285 |
|
|
}
|
286 |
48332
|
claudio.at
|
}
|
287 |
46537
|
alessia.ba
|
|
288 |
48975
|
claudio.at
|
public static class Vocabularies {
|
289 |
|
|
private String countriesEndpoint;
|
290 |
|
|
|
291 |
|
|
public String getCountriesEndpoint() {
|
292 |
|
|
return countriesEndpoint;
|
293 |
|
|
}
|
294 |
|
|
|
295 |
|
|
public void setCountriesEndpoint(final String countriesEndpoint) {
|
296 |
|
|
this.countriesEndpoint = countriesEndpoint;
|
297 |
|
|
}
|
298 |
|
|
}
|
299 |
|
|
|
300 |
48399
|
claudio.at
|
public ClassPathResource getFindSolrIndexUrl() {
|
301 |
|
|
return findSolrIndexUrl;
|
302 |
|
|
}
|
303 |
|
|
|
304 |
|
|
public void setFindSolrIndexUrl(final ClassPathResource findSolrIndexUrl) {
|
305 |
|
|
this.findSolrIndexUrl = findSolrIndexUrl;
|
306 |
|
|
}
|
307 |
|
|
|
308 |
|
|
public ClassPathResource getFindIndexDsInfo() {
|
309 |
|
|
return findIndexDsInfo;
|
310 |
|
|
}
|
311 |
|
|
|
312 |
|
|
public void setFindIndexDsInfo(final ClassPathResource findIndexDsInfo) {
|
313 |
|
|
this.findIndexDsInfo = findIndexDsInfo;
|
314 |
|
|
}
|
315 |
|
|
|
316 |
|
|
public String getIsLookupUrl() {
|
317 |
|
|
return isLookupUrl;
|
318 |
|
|
}
|
319 |
|
|
|
320 |
|
|
public void setIsLookupUrl(final String isLookupUrl) {
|
321 |
|
|
this.isLookupUrl = isLookupUrl;
|
322 |
|
|
}
|
323 |
|
|
|
324 |
|
|
public int getRequestWorkers() {
|
325 |
|
|
return requestWorkers;
|
326 |
|
|
}
|
327 |
|
|
|
328 |
|
|
public void setRequestWorkers(final int requestWorkers) {
|
329 |
|
|
this.requestWorkers = requestWorkers;
|
330 |
|
|
}
|
331 |
|
|
|
332 |
|
|
public int getRequestTimeout() {
|
333 |
|
|
return requestTimeout;
|
334 |
|
|
}
|
335 |
|
|
|
336 |
|
|
public void setRequestTimeout(final int requestTimeout) {
|
337 |
|
|
this.requestTimeout = requestTimeout;
|
338 |
|
|
}
|
339 |
|
|
|
340 |
|
|
public Datasource getDatasource() {
|
341 |
|
|
return datasource;
|
342 |
|
|
}
|
343 |
|
|
|
344 |
|
|
public void setDatasource(final Datasource datasource) {
|
345 |
|
|
this.datasource = datasource;
|
346 |
|
|
}
|
347 |
|
|
|
348 |
|
|
public Project getProject() {
|
349 |
|
|
return project;
|
350 |
|
|
}
|
351 |
|
|
|
352 |
|
|
public void setProject(final Project project) {
|
353 |
|
|
this.project = project;
|
354 |
|
|
}
|
355 |
|
|
|
356 |
|
|
public Jdbc getJdbc() {
|
357 |
|
|
return jdbc;
|
358 |
|
|
}
|
359 |
|
|
|
360 |
|
|
public void setJdbc(final Jdbc jdbc) {
|
361 |
|
|
this.jdbc = jdbc;
|
362 |
|
|
}
|
363 |
|
|
|
364 |
|
|
public Swagger getSwagger() {
|
365 |
|
|
return swagger;
|
366 |
|
|
}
|
367 |
|
|
|
368 |
|
|
public void setSwagger(final Swagger swagger) {
|
369 |
|
|
this.swagger = swagger;
|
370 |
|
|
}
|
371 |
48975
|
claudio.at
|
|
372 |
|
|
public Vocabularies getVocabularies() {
|
373 |
|
|
return vocabularies;
|
374 |
|
|
}
|
375 |
|
|
|
376 |
|
|
public void setVocabularies(final Vocabularies vocabularies) {
|
377 |
|
|
this.vocabularies = vocabularies;
|
378 |
|
|
}
|
379 |
|
|
|
380 |
46537
|
alessia.ba
|
}
|