1
|
package gr.uoa.di.validatorweb.actions.registration.dnet;
|
2
|
|
3
|
import eu.dnetlib.domain.data.Repository;
|
4
|
import eu.dnetlib.domain.data.RepositoryInterface;
|
5
|
import eu.dnetlib.domain.enabling.Vocabulary;
|
6
|
import gr.uoa.di.driver.enabling.vocabulary.VocabularyLoader;
|
7
|
import gr.uoa.di.validator.dao.JobForRegistration;
|
8
|
import gr.uoa.di.validatorweb.actions.BaseValidatorAction;
|
9
|
import gr.uoa.di.validatorweb.api.RepoExtAPI;
|
10
|
import gr.uoa.di.validatorweb.configs.Constants;
|
11
|
import gr.uoa.di.validatorweb.configs.Timezone;
|
12
|
|
13
|
import java.util.ArrayList;
|
14
|
import java.util.List;
|
15
|
import java.util.Locale;
|
16
|
import java.util.Map;
|
17
|
import java.util.UUID;
|
18
|
|
19
|
import org.apache.log4j.Logger;
|
20
|
import org.apache.struts2.interceptor.SessionAware;
|
21
|
|
22
|
import se.kb.oai.pmh.Identification;
|
23
|
import se.kb.oai.pmh.OaiPmhServer;
|
24
|
|
25
|
import com.opensymphony.xwork2.Action;
|
26
|
import com.unboundid.util.Base64;
|
27
|
|
28
|
public class RepoRegistration extends BaseValidatorAction implements SessionAware {
|
29
|
|
30
|
private static final long serialVersionUID = -2912240396302341015L;
|
31
|
private static Logger logger = Logger.getLogger(RepoRegistration.class);
|
32
|
|
33
|
private VocabularyLoader vocabularyLoader = null;
|
34
|
private Map<String, Object> session;
|
35
|
private List<String> adminEmails;
|
36
|
private Repository repo;
|
37
|
private List<RepositoryInterface> interfaces, interfacesToRegister = new ArrayList<RepositoryInterface>();;
|
38
|
private PubFileInterface pubFileIface;
|
39
|
|
40
|
private String customTypology;
|
41
|
private String mode;
|
42
|
private String id;
|
43
|
|
44
|
public String aggregatorName;
|
45
|
|
46
|
private boolean usingOpenDoar;
|
47
|
|
48
|
private List<String> typologies;
|
49
|
private List<String> countries;
|
50
|
private List<Timezone> timezones;
|
51
|
|
52
|
public String execute() {
|
53
|
this.clearErrorsAndMessages();
|
54
|
logger.debug("mode: " + mode + " usingOpenDoar:" + usingOpenDoar + " repoId " + repo.getId());
|
55
|
String importResult = null;
|
56
|
String activationId = UUID.randomUUID().toString();
|
57
|
String repoType = "repository";
|
58
|
if (mode.equalsIgnoreCase("opendoar"))
|
59
|
repoType = "literature repository";
|
60
|
else if (mode.equalsIgnoreCase("re3data"))
|
61
|
repoType = "data repository";
|
62
|
else if (mode.equalsIgnoreCase("journal"))
|
63
|
repoType = "journal";
|
64
|
else if (mode.equalsIgnoreCase("aggregator"))
|
65
|
repoType = "aggregator";
|
66
|
|
67
|
try{
|
68
|
repo.setCountryCode(getCountryCode(repo.getCountryName()));
|
69
|
|
70
|
repo.setActivationId(activationId);
|
71
|
repo.setRegisteredBy((String) session.get(Constants.loggedInField));
|
72
|
repo.setInterfaces(interfaces);
|
73
|
|
74
|
repo.setInterfaces(this.interfaces);
|
75
|
|
76
|
if (this.isModeOpenAIRE()) {
|
77
|
if (mode.equals("opendoar") || mode.equals("re3data")) {
|
78
|
repo.setProvenanceActionClass("sysimport:crosswalk:entityregistry");
|
79
|
repo.setId(this.id);
|
80
|
importResult = getRepoAPI().storeRepository(repo,mode,interfacesToRegister);
|
81
|
}
|
82
|
if (mode.equals("journal")) {
|
83
|
repo.setProvenanceActionClass("user:insert");
|
84
|
repo.setCollectedFrom("infrastruct_::openaire");
|
85
|
repo.setDatasourceClass("pubsrepository::journal");
|
86
|
if(repo.getIssn() != null && repo.getIssn().length() == 0)
|
87
|
repo.setIssn(Base64.encode(repo.getOfficialName()).substring(0,8));
|
88
|
repo.setId("openaire____::issn" + repo.getIssn());
|
89
|
repo.setNamespacePrefix("issn" + repo.getIssn());
|
90
|
logger.debug("RegisteredBy: " + repo.getRegisteredBy());
|
91
|
importResult = getRepoAPI().storeRepository(repo,"journal",interfacesToRegister);
|
92
|
}
|
93
|
else if (mode.equals("aggregator")) {
|
94
|
repo.setProvenanceActionClass("user:insert");
|
95
|
repo.setCollectedFrom("infrastruct_::openaire");
|
96
|
repo.setDatasourceClass("aggregator::pubsrepository::unknown");
|
97
|
repo.setId("openaire____::" + Base64.encode(repo.getOfficialName()));
|
98
|
repo.setNamespacePrefix(repo.getOfficialName().toLowerCase().replace(" ", "_"));
|
99
|
if (repo.getNamespacePrefix().length() > 12) {
|
100
|
repo.setNamespacePrefix(repo.getNamespacePrefix().substring(0,12));
|
101
|
} else {
|
102
|
while (repo.getNamespacePrefix().length() < 12)
|
103
|
repo.setNamespacePrefix(repo.getNamespacePrefix().concat("_"));
|
104
|
}
|
105
|
importResult = getRepoAPI().storeRepository(repo,"aggregator",interfacesToRegister);
|
106
|
}
|
107
|
}
|
108
|
if (importResult != null)
|
109
|
this.addActionMessage(importResult);
|
110
|
|
111
|
if (pubFileIface != null && pubFileIface.getAllow()) {
|
112
|
RepositoryInterface fileIface = new RepositoryInterface();
|
113
|
fileIface.setBaseUrl("none");
|
114
|
fileIface.setContentDescription("file::hybrid");
|
115
|
fileIface.setCompliance("files");
|
116
|
fileIface.setTypology("pubsrepository::unknown");
|
117
|
fileIface.setRemovable(true);
|
118
|
fileIface.setId("api_________::" + repo.getId() + "::" + "files");
|
119
|
fileIface.getAccessParams().put("methodology", pubFileIface.getMethodology());
|
120
|
// fileIface.getExtraFields().put("allow", "yes");
|
121
|
if (pubFileIface.getMethodology().equals("files_from_api")) {
|
122
|
fileIface.setAccessProtocol(pubFileIface.getProtocol());
|
123
|
|
124
|
fileIface.getAccessParams().put("url", pubFileIface.getUrl());
|
125
|
fileIface.getAccessParams().put("username", pubFileIface.getUsername());
|
126
|
fileIface.getAccessParams().put("password", pubFileIface.getPassword());
|
127
|
fileIface.getExtraFields().put("file_naming_convention", pubFileIface.getConvention());
|
128
|
} else if (pubFileIface.getMethodology().equals("files_from_metadata")) {
|
129
|
fileIface.setAccessProtocol("files_from_metadata");
|
130
|
fileIface.getAccessParams().put("xpath",pubFileIface.getXpath());
|
131
|
}
|
132
|
//
|
133
|
logger.debug("source: " + pubFileIface.getMethodology());
|
134
|
logger.debug("protocol: " + pubFileIface.getProtocol());
|
135
|
logger.debug("username: " + pubFileIface.getUsername());
|
136
|
logger.debug("password: " + pubFileIface.getPassword());
|
137
|
logger.debug("url: " + pubFileIface.getUrl());
|
138
|
logger.debug("convention: " + pubFileIface.getConvention());
|
139
|
getRepoAPI().insertPubFileInterface(repo.getId(), fileIface);
|
140
|
}
|
141
|
|
142
|
} catch (Exception e) {
|
143
|
logger.error("error storing " + repo.getOfficialName() + "in openaire db", e);
|
144
|
if (importResult == null)
|
145
|
this.addActionError(this.getText("generic.error"));
|
146
|
else
|
147
|
this.addActionError(importResult);
|
148
|
reportException(e);
|
149
|
return "exception";
|
150
|
}
|
151
|
|
152
|
logger.debug("interfacesToRegister : " + interfacesToRegister.size());
|
153
|
if (interfacesToRegister.size() > 0) {
|
154
|
try {
|
155
|
// Map <String, String> compMap;
|
156
|
// compMap = getRepoAPI().getRepoCompatibility(repo.getOfficialName(), repo.getId());
|
157
|
if (!this.getOpenAIREValidator().userOverridesRepoRegistration((String) session.get(Constants.loggedInField))) {
|
158
|
logger.debug("User is not regRepoOverrrider");
|
159
|
//FOR TESTING
|
160
|
// this.adminEmails.clear();
|
161
|
// this.adminEmails.add((String) session.get(Constants.loggedInField));
|
162
|
//FOR TESTING
|
163
|
|
164
|
for (RepositoryInterface iFace : interfacesToRegister) {
|
165
|
if(iFace.getAccessSet() == null || iFace.getAccessSet().isEmpty()) {
|
166
|
logger.debug("updating set to none");
|
167
|
iFace.setAccessSet("none");
|
168
|
}
|
169
|
this.printInterface(iFace);
|
170
|
// logger.debug("current ComplianceEname: "+ iFace.getComplianceName());
|
171
|
// logger.debug("current ComplianceCode: "+ iFace.getCompliance());
|
172
|
// logger.debug("desired Compliance: "+ iFace.getDesiredCompatibilityLevel());
|
173
|
// if ((this.getDbMode().equalsIgnoreCase("direct") && !compMap.containsKey(iFace.getDesiredCompatibilityLevel()))
|
174
|
// || (this.getDbMode().equalsIgnoreCase("dms") && (!(iFace.getDesiredCompatibilityLevel().equalsIgnoreCase(getComplianceCode(iFace.getCompliance()))) &&
|
175
|
// !(iFace.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0_data") && getComplianceCode(iFace.getCompliance()).equalsIgnoreCase("openaire2.0"))))){
|
176
|
if (this.getDbMode().equalsIgnoreCase("dms") && (!(iFace.getDesiredCompatibilityLevel().equalsIgnoreCase(iFace.getCompliance())) &&
|
177
|
!(iFace.getDesiredCompatibilityLevel().equalsIgnoreCase("openaire2.0_data") && iFace.getCompliance().equalsIgnoreCase("openaire2.0")))){
|
178
|
logger.debug("initiating preregistration validations on repo :" + iFace.getBaseUrl() + "for set: " + iFace.getAccessSet() + " and compliance: " + iFace.getDesiredCompatibilityLevel());
|
179
|
JobForRegistration job = new JobForRegistration();
|
180
|
job.setActivation_id(UUID.randomUUID().toString());
|
181
|
job.setAdmin_emails(this.adminEmails);
|
182
|
job.setBaseurl(iFace.getBaseUrl());
|
183
|
job.setDatasource_id(repo.getId());
|
184
|
job.setDesired_compatiblity_level(iFace.getDesiredCompatibilityLevel());
|
185
|
job.setInterface_id(iFace.getId());
|
186
|
job.setInterface_id_old(null);
|
187
|
job.setOfficial_name(repo.getOfficialName());
|
188
|
job.setRepo_type(repoType);
|
189
|
job.setUser((String) session.get(Constants.loggedInField));
|
190
|
job.setValidation_set(iFace.getAccessSet());
|
191
|
job.setPurpose("register");
|
192
|
this.printInterface(iFace);
|
193
|
this.getOpenAIREValidator().storeJobForRegistration(job);
|
194
|
this.getOpenAIREValidator().preRegistrationValidations(job);
|
195
|
} else {
|
196
|
logger.debug("repo :" + iFace.getBaseUrl() + " for : " + iFace.getAccessSet() + " is already compliant on desiredcompliance: " + iFace.getCompliance());
|
197
|
List<String> rec = new ArrayList<String>();
|
198
|
rec.add((String) session.get(Constants.loggedInField));
|
199
|
String msgUpgrade = "";
|
200
|
if (iFace.getCompliance() != null && !mode.equalsIgnoreCase("re3data") && !iFace.getCompliance().equalsIgnoreCase("openaire3.0"))
|
201
|
msgUpgrade = "\n\n Please consider to upgrade to OpenAIRE Guidelines v3. Link: https://guidelines.openaire.eu/wiki/OpenAIRE_Guidelines:_For_Literature_repositories";
|
202
|
|
203
|
this.getEmailer().sendMail(rec, "Request to Join OpenAIRE - Test Results [" + repo.getOfficialName() + "]", "Your " + repoType + " is already \"" + iFace.getDesiredCompatibilityLevel() + "\" compliant. As a result, there is no need to run registration test for url: " + iFace.getBaseUrl() + " and set: " + iFace.getAccessSet() + " ." + msgUpgrade, false, null);
|
204
|
}
|
205
|
}
|
206
|
String validationStarted = "Compatibility test(s) for the " + repoType + " you wish to add have automatically started . You will be notified via email with further instructions when the test(s) has finished. For this " + repoType + " to be added in the OpenAIRE compliant list, the test must be successful.";
|
207
|
this.addActionMessage(validationStarted);
|
208
|
// this.addActionMessage(this.getText("repoRegistration.validationStarted"));
|
209
|
this.addActionMessage("Administrator email:" + this.adminEmails.get(0));
|
210
|
this.addActionMessage((this.getText("general.unblock") + " " + this.getEmailer().getFrom()));
|
211
|
List<String> recipients = new ArrayList<String>();
|
212
|
recipients.addAll(this.adminEmails);
|
213
|
this.getEmailer().sendMail(recipients, "Request to Join OpenAIRE - Confirmation [" + repo.getOfficialName() + "]", "A request has been sent to add '" + repo.getOfficialName() + "' " + repoType + " to the OpenAIRE compliant list. If you have any questions you can communicate with the user that made the request using this email: " + (String) session.get(Constants.loggedInField), false, null);
|
214
|
recipients.clear();
|
215
|
recipients.add((String) session.get(Constants.loggedInField));
|
216
|
this.getEmailer().sendMail(recipients, "Request to Join OpenAIRE - Confirmation [" + repo.getOfficialName() + "]", "A request has been sent to add '" + repo.getOfficialName() + "' " + repoType + " to the OpenAIRE compliant list. The neccessary compatibility tests will begin shortly", true, null);
|
217
|
} else {
|
218
|
logger.debug("User is regRepoOverrider");
|
219
|
List<String> recipients = new ArrayList<String>();
|
220
|
recipients.add((String) session.get(Constants.loggedInField));
|
221
|
this.getEmailer().sendMail(recipients, "Request to Join OpenAIRE [" + repo.getOfficialName() + "]", "A request has been sent to add '" + repo.getOfficialName() + "' to the OpenAIRE compliant list. Since you are logged-in as administrator, registration tests are bypassed.", false, null);
|
222
|
|
223
|
this.addActionMessage((this.getText("repoRegistration.overriden.successful")));
|
224
|
for (RepositoryInterface iFace : repo.getInterfaces()) {
|
225
|
getRepoAPI().updateRepositoryInterfaceCompliance(repo.getOfficialName(), repo.getId(), iFace.getId(), iFace.getDesiredCompatibilityLevel(),iFace.getAccessSet(),iFace.getBaseUrl(), iFace.getExtraFields().get("oldId")); }
|
226
|
}
|
227
|
} catch (Exception e) {
|
228
|
logger.error("error registering repo " + repo.getOfficialName(), e);
|
229
|
this.addActionError(this.getText("generic.error"));
|
230
|
reportException(e);
|
231
|
return "exception";
|
232
|
}
|
233
|
}
|
234
|
return Action.SUCCESS;
|
235
|
}
|
236
|
|
237
|
private String getCountryCode(String countryName) {
|
238
|
Vocabulary countries = vocabularyLoader.getVocabulary("dnet:countries", Locale.ENGLISH, Locale.ROOT);
|
239
|
|
240
|
return countries.getEncoding(countryName);
|
241
|
}
|
242
|
|
243
|
// private String getComplianceCode(String complianceName) {
|
244
|
// Vocabulary compatibilityLevels = vocabularyLoader.getVocabulary("dnet:compatibilityLevel", Locale.ENGLISH, Locale.ROOT);
|
245
|
//
|
246
|
// return compatibilityLevels.getEncoding(complianceName);
|
247
|
// }
|
248
|
|
249
|
public void validate() {
|
250
|
this.clearErrorsAndMessages();
|
251
|
|
252
|
typologies = Constants.typologies;
|
253
|
countries = vocabularyLoader.getVocabulary("dnet:countries", Locale.ENGLISH, Locale.ROOT).getEnglishNames();
|
254
|
timezones = Constants.timezones;
|
255
|
|
256
|
if (mode.equals("journal")){
|
257
|
logger.debug("issn length: " + repo.getIssn().length());
|
258
|
if (RepoExtAPI.FieldInEmpty(repo.getIssn()))
|
259
|
this.addFieldError("issn", this.getText("compulsoryField"));
|
260
|
if (repo.getIssn().length() != 8)
|
261
|
this.addFieldError("issn", "Length has to be 8 characters");
|
262
|
if (!RepoExtAPI.FieldInEmpty(repo.getEissn()) && repo.getEissn().length() != 8)
|
263
|
this.addFieldError("eissn", "Length has to be 8 characters");
|
264
|
if (!RepoExtAPI.FieldInEmpty(repo.getLissn()) && repo.getLissn().length() != 8)
|
265
|
this.addFieldError("lissn", "Length has to be 8 characters");
|
266
|
|
267
|
}
|
268
|
if (!RepoExtAPI.FieldInEmpty(customTypology)) {
|
269
|
repo.setTypology(customTypology);
|
270
|
}
|
271
|
if (RepoExtAPI.FieldInEmpty(repo.getTypology())) {
|
272
|
this.addFieldError("typology", this.getText("compulsoryField"));
|
273
|
}
|
274
|
if (RepoExtAPI.FieldInEmpty(repo.getOfficialName())) {
|
275
|
this.addFieldError("officialName", this.getText("compulsoryField"));
|
276
|
}
|
277
|
if (RepoExtAPI.FieldInEmpty(repo.getEnglishName())) {
|
278
|
this.addFieldError("englishName", this.getText("compulsoryField"));
|
279
|
}
|
280
|
if (RepoExtAPI.FieldInEmpty(repo.getCountryName())) {
|
281
|
this.addFieldError("countryName", this.getText("compulsoryField"));
|
282
|
}
|
283
|
if (RepoExtAPI.FieldInEmpty(repo.getWebsiteUrl())) {
|
284
|
this.addFieldError("websiteUrl", this.getText("compulsoryField"));
|
285
|
}
|
286
|
if (RepoExtAPI.FieldInEmpty(repo.getOrganization())) {
|
287
|
this.addFieldError("organization", this.getText("compulsoryField"));
|
288
|
}
|
289
|
if (RepoExtAPI.FieldInEmpty(repo.getContactEmail())) {
|
290
|
this.addFieldError("contactEmail", this.getText("compulsoryField"));
|
291
|
}
|
292
|
if (RepoExtAPI.FieldInEmpty(repo.getLatitude().toString())) {
|
293
|
this.addFieldError("latitude", this.getText("compulsoryField"));
|
294
|
}
|
295
|
if (RepoExtAPI.FieldInEmpty(repo.getLongitude().toString())) {
|
296
|
this.addFieldError("longitude", this.getText("compulsoryField"));
|
297
|
}
|
298
|
|
299
|
this.adminEmails = new ArrayList<String>();
|
300
|
for (RepositoryInterface iFace : this.interfaces) {
|
301
|
// if(!iFace.isDeleteApi()) {
|
302
|
logger.debug("checking baseurl: " + iFace.getBaseUrl());
|
303
|
Identification identify;
|
304
|
OaiPmhServer harvester = new OaiPmhServer(iFace.getBaseUrl());
|
305
|
try {
|
306
|
identify = harvester.identify();
|
307
|
} catch (Exception e) {
|
308
|
logger.error("error getting mails from url: " + iFace.getBaseUrl(), e);
|
309
|
this.addFieldError("baseUrl", "BaseUrl: " + iFace.getBaseUrl() + " is invalid.");
|
310
|
// this.addActionError(this.getText("invalidBaseUrl"));
|
311
|
return;
|
312
|
}
|
313
|
/* try {
|
314
|
SetsList setList = harvester.listSets();
|
315
|
ResumptionToken token = setList.getResumptionToken();
|
316
|
List<Set> sets = new ArrayList<Set>();
|
317
|
sets.addAll(setList.asList());
|
318
|
while (token != null) {
|
319
|
setList = harvester.listSets(token);
|
320
|
token = setList.getResumptionToken();
|
321
|
sets.addAll(setList.asList());
|
322
|
}
|
323
|
|
324
|
List<String> ret = new ArrayList<String>();
|
325
|
for (Set set : sets) {
|
326
|
ret.add(set.getSpec().trim());
|
327
|
}
|
328
|
if (!ret.contains(iFace.getAccessSet()))
|
329
|
this.addFieldError("validationSet", "Set: " + iFace.getAccessSet() + " is not exposed by the repository. \n Please make sure that 'ListSets' verb is configured correctly on your server as well as that the exposed sets list includes this set.");
|
330
|
} catch (Exception e) {
|
331
|
logger.error("error getting sets from url: " + iFace.getBaseUrl(), e);
|
332
|
continue;
|
333
|
}
|
334
|
*/
|
335
|
this.adminEmails.addAll(RepoExtAPI.removeMailTo(identify.getAdminEmails()));
|
336
|
// }
|
337
|
}
|
338
|
logger.debug("admin mails ok");
|
339
|
if (this.adminEmails.size() == 0) {
|
340
|
logger.debug("adminMail: " + repo.getContactEmail());
|
341
|
this.adminEmails.add(repo.getContactEmail());
|
342
|
// this.addActionError(this.getText("noAdminEmail"));
|
343
|
// return;
|
344
|
}
|
345
|
logger.debug("admin mail ok");
|
346
|
|
347
|
// try {
|
348
|
// String aggName = null;
|
349
|
// if((aggName = getRepoAPI().getNameOfAggregator(officialName)) != null) {
|
350
|
// this.addActionError(this.getText("registration.noAggregated")+": "+aggName);
|
351
|
// return;
|
352
|
// }
|
353
|
// } catch(Exception e) {
|
354
|
// this.addActionError(this.getText("uknownError"));
|
355
|
// reportException(e);
|
356
|
// logger.error("", e);
|
357
|
// return;
|
358
|
// }
|
359
|
}
|
360
|
|
361
|
public List<String> getAdminEmails() {
|
362
|
return adminEmails;
|
363
|
}
|
364
|
|
365
|
public void setAdminEmails(List<String> adminEmails) {
|
366
|
this.adminEmails = adminEmails;
|
367
|
}
|
368
|
|
369
|
public List<String> getTypologies() {
|
370
|
return typologies;
|
371
|
}
|
372
|
|
373
|
public void setTypologies(List<String> typologies) {
|
374
|
this.typologies = typologies;
|
375
|
}
|
376
|
|
377
|
public List<String> getCountries() {
|
378
|
return countries;
|
379
|
}
|
380
|
|
381
|
public void setCountries(List<String> countries) {
|
382
|
this.countries = countries;
|
383
|
}
|
384
|
|
385
|
public List<Timezone> getTimezones() {
|
386
|
return timezones;
|
387
|
}
|
388
|
|
389
|
public void setTimezones(List<Timezone> timezones) {
|
390
|
this.timezones = timezones;
|
391
|
}
|
392
|
|
393
|
public void setCustomTypology(String customTypology) {
|
394
|
this.customTypology = customTypology;
|
395
|
}
|
396
|
|
397
|
public String getCustomTypology() {
|
398
|
return customTypology;
|
399
|
}
|
400
|
|
401
|
@Override
|
402
|
public void setSession(Map<String, Object> session) {
|
403
|
this.session = session;
|
404
|
}
|
405
|
|
406
|
public void setUsingOpenDoar(boolean usingOpenDoar) {
|
407
|
this.usingOpenDoar = usingOpenDoar;
|
408
|
}
|
409
|
|
410
|
public boolean isUsingOpenDoar() {
|
411
|
return usingOpenDoar;
|
412
|
}
|
413
|
|
414
|
public String getAggregatorName() {
|
415
|
return aggregatorName;
|
416
|
}
|
417
|
|
418
|
public void setAggregatorName(String aggregatorName) {
|
419
|
this.aggregatorName = aggregatorName;
|
420
|
}
|
421
|
|
422
|
public VocabularyLoader getVocabularyLoader() {
|
423
|
return vocabularyLoader;
|
424
|
}
|
425
|
|
426
|
public void setVocabularyLoader(VocabularyLoader vocabularyLoader) {
|
427
|
this.vocabularyLoader = vocabularyLoader;
|
428
|
}
|
429
|
|
430
|
public Repository getRepo() {
|
431
|
return repo;
|
432
|
}
|
433
|
|
434
|
public void setRepo(Repository repo) {
|
435
|
this.repo = repo;
|
436
|
}
|
437
|
|
438
|
public String getMode() {
|
439
|
return mode;
|
440
|
}
|
441
|
|
442
|
public void setMode(String mode) {
|
443
|
this.mode = mode;
|
444
|
}
|
445
|
|
446
|
public List<RepositoryInterface> getInterfaces() {
|
447
|
return interfaces;
|
448
|
}
|
449
|
|
450
|
public void setInterfaces(List<RepositoryInterface> interfaces) {
|
451
|
this.interfaces = interfaces;
|
452
|
}
|
453
|
|
454
|
public String getId() {
|
455
|
return id;
|
456
|
}
|
457
|
|
458
|
public void setId(String id) {
|
459
|
this.id = id;
|
460
|
}
|
461
|
|
462
|
public PubFileInterface getPubFileIface() {
|
463
|
return pubFileIface;
|
464
|
}
|
465
|
|
466
|
public void setPubFileIface(PubFileInterface pubFileIface) {
|
467
|
this.pubFileIface = pubFileIface;
|
468
|
}
|
469
|
|
470
|
private void printInterface(RepositoryInterface iFace) {
|
471
|
logger.debug("baseUrl: " + iFace.getBaseUrl());
|
472
|
logger.debug("format: " + iFace.getAccessFormat());
|
473
|
logger.debug("typology: " + iFace.getTypology());
|
474
|
logger.debug("set: " + iFace.getAccessSet());
|
475
|
logger.debug("des_comp_level: " + iFace.getDesiredCompatibilityLevel());
|
476
|
logger.debug("cur_comp_level: " + iFace.getCompliance());
|
477
|
logger.debug("protocol: " + iFace.getAccessProtocol());
|
478
|
logger.debug("api_id: " + iFace.getId());
|
479
|
logger.debug("removable: " + iFace.isRemovable());
|
480
|
logger.debug("deleteApi: " + iFace.isDeleteApi());
|
481
|
}
|
482
|
}
|