Skip to content
Snippets Groups Projects
Commit a31b0986 authored by Stefan E. Funk's avatar Stefan E. Funk
Browse files

removed more sysouts.

parent 8b153619
No related branches found
Tags v5.0.0
No related merge requests found
......@@ -234,9 +234,9 @@ public class RecordDeliverer {
public void putContentIntoDCFieldLists(GetResponse responseWorkValues, GetResponse relatedWorkObject) {
this.contributors = DublinCoreFieldLoader.setContributor(responseWorkValues, this.contributorList);
this.formats = DublinCoreFieldLoader.setFormat(responseWorkValues,this.formatList);
for(String bla : identifierList){
System.out.println("BLA: " + bla);
}
// for(String bla : identifierList){
// System.out.println("BLA: " + bla);
// }
this.identifiers = DublinCoreFieldLoader.setIdentifier(responseWorkValues, this.identifierList);
this.languages = DublinCoreFieldLoader.setLanguage(responseWorkValues,this.languageList);
this.publishers = DublinCoreFieldLoader.setPublisher(responseWorkValues, this.publisherList);
......
......@@ -361,7 +361,8 @@ public class RecordListDeliverer {
QueryBuilder matchQuery = QueryBuilders.matchPhraseQuery(queryField, valueField);
QueryBuilder boolQuery = QueryBuilders.boolQuery().must(rangeQuery).must(matchQuery);
query = boolQuery;
System.out.println(query);
// System.out.println(query);
} else {
query = rangeQuery;
......@@ -399,9 +400,9 @@ public class RecordListDeliverer {
e.printStackTrace();
}
if (this.textgrid == true)
if (this.identifiers.isEmpty()) {
System.out.println("HEADER IDENTIFIER: " + headerIdentifier);
}
// if (this.identifiers.isEmpty()) {
// System.out.println("HEADER IDENTIFIER: " + headerIdentifier);
// }
identifierForHeader = this.identifiers.get(0);
if (identifierForHeader.startsWith("https://textgridrep.org/")) {
identifierForHeader = identifierForHeader.replaceFirst("https://textgridrep.org/", "");
......
......@@ -18,15 +18,13 @@ import info.textgrid.utils.httpclient.TGHttpResponse;
* Some online tests for the DARIAH-DE Repository OAIMPH service.
* </p>
*
* @author Stefan E. Funk (SUB Göttingen)
* @author Stefan E. Funk, SUB Göttingen
*/
public class OaiPmhDariahdeOnlineTests {
// The OAIPMH host to be tested.
// private static String host =
// "http://trep.de.dariah.eu/1.0/oaipmh/";
private static String host = "https://repository.de.dariah.eu/1.0/oaipmh/";
private static String host = "http://trep.de.dariah.eu/1.0/oaipmh/";
// private static String host = "https://repository.de.dariah.eu/1.0/oaipmh/";
// Some output finals.
private static final String ERROR = ">>> ERROR";
......@@ -35,7 +33,7 @@ public class OaiPmhDariahdeOnlineTests {
// Time to wait between the single queries using resumption tokens in
// milliseconds.
private static final Long TIME = 30000l;
private static final Long TIME = 1000l;
// **
// PREPARATIONS
......@@ -155,7 +153,8 @@ public class OaiPmhDariahdeOnlineTests {
String verb = "ListSets";
// Testing for set: Bahnsen 1670_Erschließung_20161017.xlsx
String shouldContain = "<setSpec>hdl:21.11113/0000-000B-CAD1-5</setSpec>";
String shouldContainREPOSITORY = "<setSpec>hdl:21.11113/0000-000B-CAD1-5</setSpec>";
String shouldContainTREP = "<setSpec>hdl:21.T11991/0000-0008-4C20-F</setSpec>";
System.out.println(TESTING + "#LISTSETS");
......@@ -164,9 +163,12 @@ public class OaiPmhDariahdeOnlineTests {
String response = IOUtils.readStringFromStream(httpResponse.getInputstream());
if (status != HttpStatus.SC_OK || !response.contains(shouldContain)) {
if (status != HttpStatus.SC_OK
|| !response.contains(shouldContainREPOSITORY) && !response.contains(shouldContainTREP)) {
System.err.println("\tstatus: " + status);
System.err.println(ERROR + ": response should contain '" + shouldContain + "'");
System.err.println(ERROR + ": response should contain (repository) '"
+ shouldContainREPOSITORY + "' or (trep) '" + shouldContainTREP + "'");
System.err.println(response);
assertTrue(false);
}
......
......@@ -23,9 +23,8 @@ import info.textgrid.utils.httpclient.TGHttpResponse;
public class OaiPmhTextgridOnlineTests {
// The OAIPMH host to be tested.
// private static String host =
// "http://textgrid-esx1.gwdg.de/1.0/tgoaipmh/";
private static String host = "https://textgridlab.org/1.0/tgoaipmh/";
private static String host = "http://textgrid-esx1.gwdg.de/1.0/tgoaipmh/";
// private static String host = "https://textgridlab.org/1.0/tgoaipmh/";
// Some output finals.
private static final String ERROR = ">>> ERROR";
......@@ -154,7 +153,9 @@ public class OaiPmhTextgridOnlineTests {
String verb = "ListSets";
// Testing for set: Digital Bibliothek.
String shouldContain = "<setSpec>project:TGPR-372fe6dc-57f2-6cd4-01b5-2c4bbefcfd3c</setSpec>";
String shouldContainTEXTGRIDLABORG =
"<setSpec>project:TGPR-372fe6dc-57f2-6cd4-01b5-2c4bbefcfd3c</setSpec>";
String shouldContainDEFTEXTGRIDLABORG = "<setSpec>project:</setSpec>";
System.out.println(TESTING + "#LISTSETS");
......@@ -163,9 +164,13 @@ public class OaiPmhTextgridOnlineTests {
String response = IOUtils.readStringFromStream(httpResponse.getInputstream());
if (status != HttpStatus.SC_OK || !response.contains(shouldContain)) {
if (status != HttpStatus.SC_OK || !response.contains(shouldContainTEXTGRIDLABORG)
&& !response.contains(shouldContainDEFTEXTGRIDLABORG)) {
System.err.println("\tstatus: " + status);
System.err.println(ERROR + ": response should contain '" + shouldContain + "'");
System.err.println(
ERROR + ": response should contain (textgridlab.org) '" + shouldContainTEXTGRIDLABORG
+ "' or (dev.textgridlab.org) '" + shouldContainDEFTEXTGRIDLABORG + "'");
System.err.println(response);
assertTrue(false);
}
......
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