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

Corrected date parse error and set aggregator link to esx-2

parent 76549434
No related branches found
No related tags found
No related merge requests found
......@@ -60,7 +60,7 @@ public class RecordDeliverer {
private DublinCoreBuilder dbc = new DublinCoreBuilder(odt, of);
private OAI_ESClient oaiEsClient;
String aggregatorURL = "http://textgrid-esx1.gwdg.de/1.0/aggregator/teicorpus/";
String aggregatorURL = "http://textgrid-esx2.gwdg.de/1.0/aggregator/teicorpus/";
public RecordDeliverer(OAI_ESClient oaiEsClient){
this.oaiEsClient=oaiEsClient;
......@@ -88,10 +88,10 @@ public class RecordDeliverer {
"edition.source.bibliographicCitation.bibidentifier")
.setId(id);
GetResponse tgObject = recordById.execute().actionGet();
GetResponse tgObject = recordById.execute().actionGet();
if(tgObject.isExists() && tgObject.getField("format").getValue().toString().equals("text/tg.edition+tg.aggregation+xml")){
String workUri = tgObject.getField("edition.isEditionOf").getValue().toString();
......@@ -208,12 +208,12 @@ public class RecordDeliverer {
titles.add(tgObject.getField("title").getValue().toString());
furtherDCElements(workUri);
try {
//try {
recordHeader.setIdentifier(identifier);
recordHeader.setDatestamp(OAIPMHUtillities.datestampAsString(dates.get(0)));
} catch (ParseException e) {
recordHeader.setDatestamp(dates.get(0));
/*} catch (ParseException e) {
log.debug("Could not parse Datestamp out of: " + dates.get(0));
}
}*/
setDCObject(odt, of);
record.setMetadata(dbc.getDC());
......
......@@ -49,7 +49,7 @@ public class RecordListDeliverer {
private OAI_ESClient oaiEsClient;
String aggregatorURL = "http://textgrid-esx1.gwdg.de/1.0/aggregator/teicorpus/";
String aggregatorURL = "http://textgrid-esx2.gwdg.de/1.0/aggregator/teicorpus/";
public RecordListDeliverer(OAI_ESClient oaiEsClient){
this.oaiEsClient=oaiEsClient;
......@@ -73,7 +73,7 @@ public class RecordListDeliverer {
"edition.source.bibliographicCitation.bibidentifier")
.setQuery(queryBuilder)
.setPostFilter(FilterBuilders.existsFilter("edition.isEditionOf"))
.setSize(10000);
.setSize(10);
SearchResponse getRecordListItems = getRecordList.execute().actionGet();
......@@ -218,13 +218,13 @@ public class RecordListDeliverer {
setDCObject(odt, of);
try {
//try {
recordHeader.setIdentifier(identifiers.get(0));
recordHeader.setDatestamp(OAIPMHUtillities.datestampAsString(dates.get(0)));
recordHeader.setDatestamp(dates.get(0));
} catch (ParseException e) {
/* } catch (ParseException e) {
log.debug("Could not parse Datestamp out of: " + dates.get(0));
}
}*/
listClearer();
......
......@@ -139,7 +139,7 @@ public class OaiPmhTest{
@Ignore
public void testGetRequestGetRecordError2() throws ParseException{
System.out.println("Test for the verb \"GetRecord\" with succesfull response");
JAXBElement<OAIPMHType> p = testRequest.getRequest("GetRecord", "vqmx.0", "oai_dc", "", "", "", "");
JAXBElement<OAIPMHType> p = testRequest.getRequest("GetRecord", "wr71.0", "oai_dc", "", "", "", "");
JAXB.marshal(p, System.out);
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