enabled sets in validation request + changed metadata prefix for Data guidelines + fixed bug in fair profile condition
This commit is contained in:
parent
3bb02b30e2
commit
634361302c
|
@ -182,8 +182,7 @@ public class ValidationController {
|
|||
public ValidationJob validateWithApacheCamel(@RequestParam(name = "guidelines") String guidelinesProfileName,
|
||||
@RequestParam(name = "baseUrl", defaultValue = "http://repositorium.sdum.uminho.pt/oai/request") String baseURL, //not in use now
|
||||
@RequestParam(name="numberOfRecords", defaultValue = "10") int numberOfRecords,
|
||||
@RequestParam(name="set", required = false) String set//, //not in use now
|
||||
//@RequestParam(name="metadataPrefix", defaultValue = "oai_dc") String metadataPrefix
|
||||
@RequestParam(name="set", required = false) String set
|
||||
) {
|
||||
|
||||
AbstractOpenAireProfile profile = initializeOpenAireProfile(guidelinesProfileName);
|
||||
|
@ -214,16 +213,15 @@ public class ValidationController {
|
|||
RouteBuilder oaiPmhRouteBuilder;
|
||||
|
||||
if (fairProfile == null) {
|
||||
System.out.println("HEREEEE");
|
||||
oaiPmhRouteBuilder =
|
||||
new SimpleOaiPmhRoute("oaipmh://" + baseURL + "?verb=ListRecords&metadataPrefix=" + metadataPrefix,
|
||||
profile, validationJob, numberOfRecords, uuid.toString());
|
||||
new SimpleOaiPmhRoute("oaipmh://" + baseURL + "?verb=ListRecords&metadataPrefix="
|
||||
+ metadataPrefix + "&set=" + set, profile, validationJob, numberOfRecords, uuid.toString());
|
||||
} else {
|
||||
System.out.println("THERE");
|
||||
|
||||
oaiPmhRouteBuilder =
|
||||
new FairOaiPmhRoute2("oaipmh://" + baseURL + "?verb=ListRecords&metadataPrefix=" + metadataPrefix,
|
||||
profile, validationJob, numberOfRecords, uuid.toString());
|
||||
new FairOaiPmhRoute2("oaipmh://" + baseURL + "?verb=ListRecords&metadataPrefix="
|
||||
+ metadataPrefix + "&set=" + set, profile, validationJob, numberOfRecords, uuid.toString());
|
||||
}
|
||||
|
||||
camelContext.addRoutes(oaiPmhRouteBuilder);
|
||||
|
@ -388,7 +386,7 @@ public class ValidationController {
|
|||
private String initializeMetadataPrefix(String guidelinesProfileName) {
|
||||
|
||||
if (guidelinesProfileName.equals("OpenAIRE Guidelines for Data Archives Profile v2")) {
|
||||
return "oai_openaire";
|
||||
return "oai_datacite";
|
||||
|
||||
} else if (guidelinesProfileName.equals("OpenAIRE Guidelines for Literature Repositories Profile v3")) {
|
||||
return "oai_dc";
|
||||
|
@ -402,7 +400,7 @@ public class ValidationController {
|
|||
|
||||
|
||||
private AbstractOpenAireProfile initializeFairProfile(String guidelinesProfileName) {
|
||||
if (guidelinesProfileName.equals("dataArchiveGuidelinesV2Profile")) {
|
||||
if (guidelinesProfileName.equals("OpenAIRE Guidelines for Data Archives Profile v2")) {
|
||||
return new FAIR_Data_GuidelinesProfile();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue