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

deliver aggregator url and delete creator as contributor

parent 4ba88eac
No related branches found
No related tags found
No related merge requests found
...@@ -60,6 +60,7 @@ public class RecordDeliverer { ...@@ -60,6 +60,7 @@ public class RecordDeliverer {
private DublinCoreBuilder dbc = new DublinCoreBuilder(odt, of); private DublinCoreBuilder dbc = new DublinCoreBuilder(odt, of);
private OAI_ESClient oaiEsClient; private OAI_ESClient oaiEsClient;
String aggregatorURL = "http://textgrid-esx1.gwdg.de/1.0/aggregator/teicorpus/";
public RecordDeliverer(OAI_ESClient oaiEsClient){ public RecordDeliverer(OAI_ESClient oaiEsClient){
this.oaiEsClient=oaiEsClient; this.oaiEsClient=oaiEsClient;
...@@ -101,9 +102,9 @@ public class RecordDeliverer { ...@@ -101,9 +102,9 @@ public class RecordDeliverer {
*/ */
//System.out.println(hit.getFields().get("textgridUri").values().get(0).toString()); //System.out.println(hit.getFields().get("textgridUri").values().get(0).toString());
if(tgObject.getField("edition.agent.value")!=null){ if(tgObject.getField("edition.agent.value")!=null){
String contributorUnformatted = tgObject.getField("edition.agent.value").getValue().toString(); //String contributorUnformatted = tgObject.getField("edition.agent.value").getValue().toString();
contributors.add(tgObject.getField("dataContributor").getValue().toString()); contributors.add(tgObject.getField("dataContributor").getValue().toString());
contributors.add(contributorUnformatted); //contributors.add(contributorUnformatted);
} }
...@@ -149,6 +150,7 @@ public class RecordDeliverer { ...@@ -149,6 +150,7 @@ public class RecordDeliverer {
if(tgObject.getField("relations.isDerivedFrom")!=null){ if(tgObject.getField("relations.isDerivedFrom")!=null){
relations.add(tgObject.getField("relations.isDerivedFrom").getValue().toString()); relations.add(tgObject.getField("relations.isDerivedFrom").getValue().toString());
} }
relations.add(aggregatorURL.concat(tgObject.getField("textgridUri").getValue().toString()));
/* /*
* DC-Rights * DC-Rights
......
...@@ -49,6 +49,8 @@ public class RecordListDeliverer { ...@@ -49,6 +49,8 @@ public class RecordListDeliverer {
private OAI_ESClient oaiEsClient; private OAI_ESClient oaiEsClient;
String aggregatorURL = "http://textgrid-esx1.gwdg.de/1.0/aggregator/teicorpus/";
public RecordListDeliverer(OAI_ESClient oaiEsClient){ public RecordListDeliverer(OAI_ESClient oaiEsClient){
this.oaiEsClient=oaiEsClient; this.oaiEsClient=oaiEsClient;
} }
...@@ -106,9 +108,9 @@ public class RecordListDeliverer { ...@@ -106,9 +108,9 @@ public class RecordListDeliverer {
*/ */
//System.out.println(hit.getFields().get("textgridUri").values().get(0).toString()); //System.out.println(hit.getFields().get("textgridUri").values().get(0).toString());
if(hit.getFields().get("edition.agent.value")!=null){ if(hit.getFields().get("edition.agent.value")!=null){
String contributorUnformatted = hit.getFields().get("edition.agent.value").values().get(0).toString(); //String contributorUnformatted = hit.getFields().get("edition.agent.value").values().get(0).toString();
contributors.add(hit.getFields().get("dataContributor").values().get(0).toString()); contributors.add(hit.getFields().get("dataContributor").values().get(0).toString());
contributors.add(contributorUnformatted); //contributors.add(contributorUnformatted);
} }
...@@ -156,6 +158,8 @@ public class RecordListDeliverer { ...@@ -156,6 +158,8 @@ public class RecordListDeliverer {
relations.add(hit.getFields().get("relations.isDerivedFrom").values().get(0).toString()); relations.add(hit.getFields().get("relations.isDerivedFrom").values().get(0).toString());
} }
relations.add(aggregatorURL.concat(hit.getFields().get("textgridUri").values().get(0).toString()));
/* /*
* DC-Rights * DC-Rights
*/ */
......
...@@ -29,7 +29,7 @@ public class OaiPmhTest{ ...@@ -29,7 +29,7 @@ public class OaiPmhTest{
} }
@Test /*@Test
@Ignore @Ignore
public void testListRecords() throws ParseException{ public void testListRecords() throws ParseException{
...@@ -46,10 +46,10 @@ public class OaiPmhTest{ ...@@ -46,10 +46,10 @@ public class OaiPmhTest{
JAXBElement<OAIPMHType> r = testRequest.getRequest("ListMetadataFormats", "wr67.0", "", "", "", "", ""); JAXBElement<OAIPMHType> r = testRequest.getRequest("ListMetadataFormats", "wr67.0", "", "", "", "", "");
JAXB.marshal(r, System.out); JAXB.marshal(r, System.out);
System.out.println("-----------------------------------\n"); System.out.println("-----------------------------------\n");
} }*/
@Test @Test
@Ignore //@Ignore
public void testDateNow() throws DatatypeConfigurationException{ public void testDateNow() throws DatatypeConfigurationException{
System.out.println("---------------Now Version-----------------"); System.out.println("---------------Now Version-----------------");
XMLGregorianCalendar nowTest = OAIPMHUtillities.getXMLGregorianCalendarNow(); XMLGregorianCalendar nowTest = OAIPMHUtillities.getXMLGregorianCalendarNow();
...@@ -58,7 +58,7 @@ public class OaiPmhTest{ ...@@ -58,7 +58,7 @@ public class OaiPmhTest{
} }
@Test @Test
@Ignore //@Ignore
public void testDateGregorianType() throws ParseException, DatatypeConfigurationException{ public void testDateGregorianType() throws ParseException, DatatypeConfigurationException{
String dateformatbefore = "2012-02-06T20:48:39.614+01:00"; String dateformatbefore = "2012-02-06T20:48:39.614+01:00";
...@@ -70,7 +70,7 @@ public class OaiPmhTest{ ...@@ -70,7 +70,7 @@ public class OaiPmhTest{
} }
@Test @Test
@Ignore //@Ignore
public void testDateStringType() throws ParseException, DatatypeConfigurationException{ public void testDateStringType() throws ParseException, DatatypeConfigurationException{
String dateformatbefore = "2012-02-06T20:48:39.614+01:00"; String dateformatbefore = "2012-02-06T20:48:39.614+01:00";
...@@ -82,7 +82,7 @@ public class OaiPmhTest{ ...@@ -82,7 +82,7 @@ public class OaiPmhTest{
} }
@Test @Test
@Ignore //@Ignore
public void testListSets() throws ParseException{ public void testListSets() throws ParseException{
JAXBElement<OAIPMHType> r = testRequest.getRequest("ListSets", "", "", "", "", "", ""); JAXBElement<OAIPMHType> r = testRequest.getRequest("ListSets", "", "", "", "", "", "");
...@@ -90,17 +90,17 @@ public class OaiPmhTest{ ...@@ -90,17 +90,17 @@ public class OaiPmhTest{
System.out.println("-----------------------------------\n"); System.out.println("-----------------------------------\n");
} }
@Test /*@Test
@Ignore @Ignore
public void testListIdentifiers() throws ParseException{ public void testListIdentifiers() throws ParseException{
JAXBElement<OAIPMHType> r = testRequest.getRequest("ListIdentifiers", "", "oai_dc", "", "", "", ""); JAXBElement<OAIPMHType> r = testRequest.getRequest("ListIdentifiers", "", "oai_dc", "", "", "", "");
JAXB.marshal(r, System.out); JAXB.marshal(r, System.out);
System.out.println("-----------------------------------\n"); System.out.println("-----------------------------------\n");
} }*/
@Test @Test
@Ignore //@Ignore
public void testGetRequestIdentify() throws ParseException{ public void testGetRequestIdentify() throws ParseException{
System.out.println("Test for the verb \"Identify\" with succesfull response"); System.out.println("Test for the verb \"Identify\" with succesfull response");
...@@ -110,7 +110,7 @@ public class OaiPmhTest{ ...@@ -110,7 +110,7 @@ public class OaiPmhTest{
} }
@Test @Test
@Ignore //@Ignore
public void testGetRequestIdentifyVerbError() throws ParseException{ public void testGetRequestIdentifyVerbError() throws ParseException{
JAXBElement<OAIPMHType> t = testRequest.getRequest("Identify", "", "a", "", "", "", ""); JAXBElement<OAIPMHType> t = testRequest.getRequest("Identify", "", "a", "", "", "", "");
JAXB.marshal(t, System.out); JAXB.marshal(t, System.out);
...@@ -118,7 +118,7 @@ public class OaiPmhTest{ ...@@ -118,7 +118,7 @@ public class OaiPmhTest{
} }
@Test @Test
@Ignore //@Ignore
public void testGetRequestIdentifyArgumentError() throws ParseException{ public void testGetRequestIdentifyArgumentError() throws ParseException{
System.out.println("Test for the verb \"Identify\" with error response"); System.out.println("Test for the verb \"Identify\" with error response");
JAXBElement<OAIPMHType> z = testRequest.getRequest("Identify", "a", "", "", "", "a", ""); JAXBElement<OAIPMHType> z = testRequest.getRequest("Identify", "a", "", "", "", "a", "");
...@@ -136,7 +136,7 @@ public class OaiPmhTest{ ...@@ -136,7 +136,7 @@ public class OaiPmhTest{
} }
@Test @Test
//@Ignore @Ignore
public void testGetRequestGetRecordError2() throws ParseException{ public void testGetRequestGetRecordError2() throws ParseException{
System.out.println("Test for the verb \"GetRecord\" with succesfull response"); 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", "vqmx.0", "oai_dc", "", "", "", "");
...@@ -146,7 +146,7 @@ public class OaiPmhTest{ ...@@ -146,7 +146,7 @@ public class OaiPmhTest{
} }
@Test @Test
//@Ignore @Ignore
public void testGetRequestGetRecordError3() throws ParseException{ public void testGetRequestGetRecordError3() throws ParseException{
System.out.println("Test for the verb \"GetRecord\" with succesfull response"); System.out.println("Test for the verb \"GetRecord\" with succesfull response");
JAXBElement<OAIPMHType> p = testRequest.getRequest("GetRecord", "", "", "", "", "", ""); JAXBElement<OAIPMHType> p = testRequest.getRequest("GetRecord", "", "", "", "", "", "");
......
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