Skip to content
Snippets Groups Projects
Commit fda3e7bc authored by mbrodhu's avatar mbrodhu
Browse files

added "project:" prefix for setSpec for getRecord

parent adc098f0
No related branches found
No related tags found
No related merge requests found
...@@ -126,7 +126,7 @@ public class RecordDelivererDC extends RecordDelivererAbstract { ...@@ -126,7 +126,7 @@ public class RecordDelivererDC extends RecordDelivererAbstract {
} }
record.setMetadata(dublinCoreBuilder.getDC()); record.setMetadata(dublinCoreBuilder.getDC());
} }
String setSpec = DublinCoreFieldLoader.fillList(esResultObject, DARIAHConstants.IDENTIFIER_LIST).get(0); String setSpec = "project:" + DublinCoreFieldLoader.fillList(esResultObject, DARIAHConstants.IDENTIFIER_LIST).get(0);
setRecordHeader(OAIPMHUtilities setRecordHeader(OAIPMHUtilities
.convertDateFormat(dateOfCreation).toString(), identifier, record, dublinCoreBuilder, setSpec); .convertDateFormat(dateOfCreation).toString(), identifier, record, dublinCoreBuilder, setSpec);
} }
......
...@@ -78,7 +78,7 @@ public abstract class RecordListDelivererAbstract implements RecordListDeliverer ...@@ -78,7 +78,7 @@ public abstract class RecordListDelivererAbstract implements RecordListDeliverer
errorValues.add("until"); errorValues.add("until");
} }
if(request.getFrom()!= null && request.getUntil()!=null && OAIPMHUtilities.getFormatOfDate(request.getFrom()).equals(OAIPMHUtilities.getFormatOfDate(request.getFrom()))) { if(request.getFrom()!= null && request.getUntil()!=null && OAIPMHUtilities.getFormatOfDate(request.getFrom()).equals(OAIPMHUtilities.getFormatOfDate(request.getFrom()))) {
errorValues.add("The granularities for from and until doesn't match"); errorValues.add("until, from");
} }
if (errorValues.size() > 0) { if (errorValues.size() > 0) {
result.setError(TGConstants.OAI_BAD_ARGUMENT, "The request includes illegal arguments " result.setError(TGConstants.OAI_BAD_ARGUMENT, "The request includes illegal arguments "
......
...@@ -201,7 +201,7 @@ public class OaiPmhTest { ...@@ -201,7 +201,7 @@ public class OaiPmhTest {
record.setIdentifierField("textgridUri"); record.setIdentifierField("textgridUri");
System.out.println("Test for the verb \"GetRecord\" with succesfull response"); System.out.println("Test for the verb \"GetRecord\" with succesfull response");
String p = this.request.getRequest("GetRecord", "identifier\"id", "oai_dc", "", "", "", ""); String p = this.request.getRequest("GetRecord", "textgrid:11hp0.0", "oai_dc", "", "", "", "");
System.out.println(p); System.out.println(p);
System.out.println("-----------------------------------\n"); System.out.println("-----------------------------------\n");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment