diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java index 266dd0e4f17e9b268115b861c47de273e062add6..361277d3be94123c45627f93fb3493636cf573d6 100644 --- a/oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java +++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OaipmhUtilities.java @@ -7,9 +7,11 @@ import java.math.BigInteger; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.Instant; +import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; @@ -138,14 +140,40 @@ public class OaipmhUtilities { /** * <p> * Converting a given string representing a date value into the date format required for OAIPMH - * and give it back as string. + * and give it back as string.<br/> + * The original date time string may here be tg datestamps from tg metadata + * (2012-02-10T23:45:00.507+01:00), or dh datestamps from dcterms metadata + * (2018-05-22T17:52:48.626). * </p> * * @param originalDateTimeString * @return */ - public static String getUTCDateAsString(String originalDateTimeString) { - return UTC_FORMATTER.format(Instant.from(OffsetDateTime.parse(originalDateTimeString))); + public static String getUTCDateAsString(final String originalDateTimeString) { + + String result; + + log.fine("original DateTimeString: " + originalDateTimeString); + + Instant instant; + try { + OffsetDateTime odt = OffsetDateTime.parse(originalDateTimeString); + instant = Instant.from(odt); + } + + // NOTE We are missing to set time zones on dcterms date fields in administrative metadata! + // Workaround for all DARIAH-DE Repository dates so far (until fix) is using LocalDateTime here + // with ZoneId CET, what has been local time zone until now! + catch (DateTimeParseException e) { + LocalDateTime ldt = LocalDateTime.parse(originalDateTimeString); + instant = ldt.atZone(ZoneId.of("CET")).toInstant(); + } + + result = UTC_FORMATTER.format(instant); + + log.fine("parsed to UTC: " + result); + + return result; } /** diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java index f1168648d88880882aa266b7629bff7f6fff53cb..d24ad5cca16562d34c31107ed3708bb90d0d5570 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/TestOaipmhUtilities.java @@ -2,6 +2,8 @@ package info.textgrid.middleware.test; import static org.junit.Assert.assertTrue; import java.text.ParseException; +import java.time.LocalDateTime; +import java.time.ZoneId; import java.util.ArrayList; import java.util.List; import javax.xml.datatype.DatatypeConfigurationException; @@ -187,7 +189,7 @@ public class TestOaipmhUtilities { * @throws DatatypeConfigurationException */ @Test - public void testGetUTCDateAsString() throws DatatypeConfigurationException { + public void testGetUTCDateAsStringTG() throws DatatypeConfigurationException { String tgDateStamp = "2012-02-10T23:45:00.507+01:00"; String expectedUTCDate = "2012-02-10T22:45:00Z"; @@ -198,6 +200,24 @@ public class TestOaipmhUtilities { } } + /** + * @throws DatatypeConfigurationException + */ + @Test + public void testGetUTCDateAsStringDH() throws DatatypeConfigurationException { + + String tgDateStamp = "2012-02-10T23:45:00.507"; + // Maybe not a real test, because we should test with an expected string, cannot be done, + // because we have different local time zones on server and develop machines. + String expectedUTCDate = OaipmhUtilities.UTC_FORMATTER + .format(LocalDateTime.parse(tgDateStamp).atZone(ZoneId.of("CET")).toInstant()); + String utcDate = OaipmhUtilities.getUTCDateAsString(tgDateStamp); + + if (!utcDate.equals(expectedUTCDate)) { + assertTrue(utcDate + " != " + expectedUTCDate, false); + } + } + /** * @throws ParseException * @throws DatatypeConfigurationException diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/OaipmhUtilitiesOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/OaipmhUtilitiesOnline.java index 41fd21481c2701907f1b349961237f94e4d72e80..af7a2b1b1c1e584af043e462fbc825a5622f797c 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/OaipmhUtilitiesOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/OaipmhUtilitiesOnline.java @@ -105,7 +105,7 @@ public class OaipmhUtilitiesOnline { */ public static Response getOAIHttpResponse(Client theClient, String theQuery) throws IOException { - return getHttpResponse(theClient, NO_THREAD_NAME, OAI_PATH, theQuery); + return getHttpResponse(theClient, "[" + NO_THREAD_NAME + "] ", OAI_PATH, theQuery); } /** diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/dh/TestDHOaipmhOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/dh/TestDHOaipmhOnline.java index 4611d5510ea81cc3a90755547bbfb01aefee6608..8de5543840971b7119cd326ef8de2f9c663e34fe 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/dh/TestDHOaipmhOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/dh/TestDHOaipmhOnline.java @@ -26,7 +26,7 @@ import info.textgrid.middleware.test.online.OaipmhUtilitiesOnline; * Please set PROPERTIES_FILE and TEST_ALL_PAGES <b>HERE</b>! * </p> * - * @author Stefan E. Funk, SUB Göttingen + * @author Stefan E. Funk, SUB Göttingen // */ @Ignore public class TestDHOaipmhOnline { @@ -35,8 +35,8 @@ public class TestDHOaipmhOnline { // FINALS // ** - private static final String PROPERTIES_FILE = "oaipmh.test.repository-de-dariah-eu.properties"; - // private static final String PROPERTIES_FILE = "oaipmh.test.trep-de-dariah-eu.properties"; + // private static final String PROPERTIES_FILE = "oaipmh.test.repository-de-dariah-eu.properties"; + private static final String PROPERTIES_FILE = "oaipmh.test.trep-de-dariah-eu.properties"; // ** // STATICS @@ -171,7 +171,7 @@ public class TestDHOaipmhOnline { public void testRootWithSlash() throws IOException { String url = "oai/"; - String shouldContain = "DARIAH-DE Repository"; + String shouldContain = "Illegal OAI verb"; testRootURL(url, shouldContain); } @@ -183,7 +183,7 @@ public class TestDHOaipmhOnline { public void testRootWithoutSlash() throws IOException { String url = "oai"; - String shouldContain = "DARIAH-DE Repository"; + String shouldContain = "Illegal OAI verb"; testRootURL(url, shouldContain); } @@ -239,7 +239,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsOAIDC() throws IOException { + public void testListRecordsDC() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTRECORDS"); @@ -253,7 +253,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsSetOAIDC() throws IOException { + public void testListRecordsSetDC() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTRECORDS"); @@ -271,7 +271,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsSetOAIDCDifferentPrefixes() throws IOException { + public void testListRecordsSetDCDifferentPrefixes() throws IOException { String uri = checkListRecordsDCSet; @@ -313,7 +313,7 @@ public class TestDHOaipmhOnline { */ @Test @Ignore - public void testListRecordsSetOAIDCStarPrefix() throws IOException { + public void testListRecordsSetDCStarPrefix() throws IOException { // TODO Un-ignore if identifier check is implemented! @@ -337,7 +337,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCFromUntil() throws IOException { + public void testListRecordsDCFromUntil() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTRECORDS"); @@ -353,7 +353,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsDATASITE() throws IOException { + public void testListRecordsDatacite() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTRECORDS"); @@ -367,7 +367,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListRecordsDATASITEFromUntil() throws IOException { + public void testListRecordsDataciteFromUntil() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTRECORDS"); @@ -382,7 +382,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testGetRecordOAIDC() throws IOException { + public void testGetRecordDC() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#GETRECORD"); @@ -397,7 +397,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testGetRecordDATASITE() throws IOException { + public void testGetRecordDatacite() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#GETRECORD"); @@ -412,7 +412,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListIdentifiersOAIDC() throws IOException { + public void testListIdentifiersDC() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTIDENTIFIERS"); @@ -426,7 +426,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListIdentifiersSetOAIDC() throws IOException { + public void testListIdentifiersSetDC() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTIDENTIFIERS"); @@ -443,7 +443,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListIdentifiersSetOAIDCDifferentPrefixes() throws IOException { + public void testListIdentifiersSetDCDifferentPrefixes() throws IOException { String uri = checkListIdentifiersSet; @@ -513,7 +513,7 @@ public class TestDHOaipmhOnline { * @throws IOException */ @Test - public void testListIdentifiersDATASITE() throws IOException { + public void testListIdentifiersDatacite() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING + "#LISTIDENTIFIERS"); diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGBasicsOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGBasicsOnline.java index 4aab59a73055632f965207923fc5f3dbdc191d53..e973cf74b07aefc4d63842168180e8b5da6f7317 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGBasicsOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGBasicsOnline.java @@ -127,7 +127,6 @@ public class TestTGBasicsOnline { System.out.println(OaipmhUtilitiesOnline.TESTING + "testRootUrl()"); - // TODO Still hard coded in OAIPMH service! String shouldContain = TestTGBasicsOnline.oaipmhEndpoint; Response httpResponse = OaipmhUtilitiesOnline.getOAIHttpResponse(oaipmhWebClient, "/"); @@ -152,7 +151,6 @@ public class TestTGBasicsOnline { System.out.println(OaipmhUtilitiesOnline.TESTING + "testIdentify()"); - // TODO Still hard coded in OAIPMH service! String shouldContain = TestTGBasicsOnline.oaipmhEndpoint; Response httpResponse = OaipmhUtilitiesOnline.getOAIHttpResponse(oaipmhWebClient, diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGGetRecordOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGGetRecordOnline.java index 8c2831ddde2f66a37645d66faf119859329c4cbe..8ab2bd50affe18417ac96aa9561c774f369fafc7 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGGetRecordOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGGetRecordOnline.java @@ -36,7 +36,7 @@ import info.textgrid.middleware.test.online.OaipmhUtilitiesOnline; * * @author Stefan E. Funk, SUB Göttingen */ -@Ignore + @Ignore public class TestTGGetRecordOnline { // ** @@ -227,10 +227,10 @@ public class TestTGGetRecordOnline { * @throws DatatypeConfigurationException */ @Test - public void testGetRecordIDIOMMETSImage() + public void testGetRecordIdiomMETSImage() throws IOException, ParseException, DatatypeConfigurationException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testGetRecordIDIOMMETS_Image()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testGetRecordIdiomMETS_Image()"); String query = "verb=" + OaipmhUtilitiesOnline.VERB_GET_RECORD + "&identifier=" + checkGetRecordIdiomImage diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListIdentifiersOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListIdentifiersOnline.java index 3a373f61077851782feecad0ced0600693584051..eafa85251e169a4a2406c8296d265cb46a22cedb 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListIdentifiersOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListIdentifiersOnline.java @@ -140,9 +140,9 @@ public class TestTGListIdentifiersOnline { * @throws IOException */ @Test - public void testListIdentifiersIDIOMMETSAllPages() throws IOException { + public void testListIdentifiersIdiomMETSAllPages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersIDIOMMETSAllPages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersIdiomMETSAllPages()"); if (OaipmhUtilitiesOnline.TEST_ALL_PAGES) { OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, @@ -166,9 +166,9 @@ public class TestTGListIdentifiersOnline { * @throws IOException */ @Test - public void testListIdentifiersIDIOMMETSMorePages() throws IOException { + public void testListIdentifiersIdiomMETSMorePages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersIDIOMMETSMorePages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersIdiomMETSMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_IDENTIFIERS, @@ -188,11 +188,11 @@ public class TestTGListIdentifiersOnline { * @throws IOException */ @Test(expected = IOException.class) - public void testListIdentifiersIDIOMMETSSomePagesAndMetadataFormatWithRestok() + public void testListIdentifiersIdiomMETSSomePagesAndMetadataFormatWithRestok() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING - + "testListIdentifiersIDIOMMETSSomePagesAndMetadataFormatWithRestok()"); + + "testListIdentifiersIdiomMETSSomePagesAndMetadataFormatWithRestok()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_IDENTIFIERS, @@ -211,10 +211,10 @@ public class TestTGListIdentifiersOnline { * @throws IOException */ @Test - public void testListIdentifiersDATACITEMorePages() throws IOException { + public void testListIdentifiersDataciteMorePages() throws IOException { System.out - .println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersDATACITEMorePages()"); + .println(OaipmhUtilitiesOnline.TESTING + "testListIdentifiersDataciteMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_IDENTIFIERS, @@ -236,11 +236,11 @@ public class TestTGListIdentifiersOnline { * @throws InterruptedException */ @Test - public void testListIdentifiersConcurrentlyIDIOMMETSMorePages() + public void testListIdentifiersConcurrentlyIdiomMETSMorePages() throws IOException, InterruptedException, ExecutionException { System.out.println( - OaipmhUtilitiesOnline.TESTING + "testListIdentifiersConcurrentlyIDIOMMETSMorePages()"); + OaipmhUtilitiesOnline.TESTING + "testListIdentifiersConcurrentlyIdiomMETSMorePages()"); ExecutorService executor = Executors.newFixedThreadPool(3); @@ -320,12 +320,12 @@ public class TestTGListIdentifiersOnline { * @throws ExecutionException */ @Test - public void testRestokConcurrentlyListIdentifiersIDIOMMETS() + public void testRestokConcurrentlyListIdentifiersIdiomMETS() throws InterruptedException, ExecutionException { System.out .println( - OaipmhUtilitiesOnline.TESTING + "testRestokConcurrentlyListIdentifiersIDIOM()"); + OaipmhUtilitiesOnline.TESTING + "testRestokConcurrentlyListIdentifiersIdiom()"); ExecutorService executor = Executors.newFixedThreadPool(3); @@ -363,12 +363,12 @@ public class TestTGListIdentifiersOnline { * @throws ExecutionException */ @Test - public void testRestokConcurrentlyListIdentifiersDATACITE() + public void testRestokConcurrentlyListIdentifiersDatacite() throws InterruptedException, ExecutionException { System.out .println( - OaipmhUtilitiesOnline.TESTING + "testRestokConcurrentlyListIdentifiersDATACITE()"); + OaipmhUtilitiesOnline.TESTING + "testRestokConcurrentlyListIdentifiersDatacite()"); ExecutorService executor = Executors.newFixedThreadPool(3); @@ -405,12 +405,12 @@ public class TestTGListIdentifiersOnline { * @throws ExecutionException */ @Test - public void testRestokConcurrentlyListIdentifiersDCAndIDIOMMETS() + public void testRestokConcurrentlyListIdentifiersDCAndIdiomMETS() throws InterruptedException, ExecutionException { System.out.println( OaipmhUtilitiesOnline.TESTING - + "testRestokConcurrentlyListIdentifiersDCAndIDIOMMets()"); + + "testRestokConcurrentlyListIdentifiersDCAndIdiomMets()"); ExecutorService executor = Executors.newFixedThreadPool(3); diff --git a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListRecordsOnline.java b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListRecordsOnline.java index 500dae534dfabdc131b22c39537f444b63b780a8..f7e6120b29773e9e7df58247a9d49958e1eba7f2 100644 --- a/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListRecordsOnline.java +++ b/oaipmh-core/src/test/java/info/textgrid/middleware/test/online/tg/TestTGListRecordsOnline.java @@ -41,10 +41,10 @@ public class TestTGListRecordsOnline { private static String checkListRecordsDCSet; private static String checkListRecordsDCFrom; private static String checkListRecordsDCUntil; - private static String checkListRecordsDATACITEFrom; - private static String checkListRecordsDATACITEUntil; - private static String checkListRecordsIDIOMFrom; - private static String checkListRecordsIDIOMUntil; + private static String checkListRecordsDataciteFrom; + private static String checkListRecordsDataciteUntil; + private static String checkListRecordsIdiomFrom; + private static String checkListRecordsIdiomUntil; // ** // PREPARATIONS @@ -67,11 +67,11 @@ public class TestTGListRecordsOnline { checkListRecordsDCFrom = p.getProperty("checkListRecordsDCFrom"); checkListRecordsDCUntil = p.getProperty("checkListRecordsDCUntil"); - checkListRecordsDATACITEFrom = p.getProperty("checkListRecordsDATACITEFrom"); - checkListRecordsDATACITEUntil = p.getProperty("checkListRecordsDATACITEUntil"); + checkListRecordsDataciteFrom = p.getProperty("checkListRecordsDataciteFrom"); + checkListRecordsDataciteUntil = p.getProperty("checkListRecordsDataciteUntil"); - checkListRecordsIDIOMFrom = p.getProperty("checkListRecordsIDIOMFrom"); - checkListRecordsIDIOMUntil = p.getProperty("checkListRecordsIDIOMUntil"); + checkListRecordsIdiomFrom = p.getProperty("checkListRecordsIdiomFrom"); + checkListRecordsIdiomUntil = p.getProperty("checkListRecordsIdiomUntil"); // Get web client from endpoint. oaipmhWebClient = OaipmhUtilitiesOnline.getOAIPMHWEebClient(oaipmhEndpoint); @@ -109,9 +109,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCMorePages() throws IOException { + public void testListRecordsDCMorePages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsOAIDCMorePages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDCMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -131,9 +131,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCSetMorePages() throws IOException { + public void testListRecordsDCSetMorePages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsOAIDCSetMorePages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDCSetMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -153,10 +153,10 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCSetMorePagesNoProjectPrefix() throws IOException { + public void testListRecordsDCSetMorePagesNoProjectPrefix() throws IOException { System.out.println( - OaipmhUtilitiesOnline.TESTING + "testListRecordsOAIDCSetMorePagesNoProjectPrefix()"); + OaipmhUtilitiesOnline.TESTING + "testListRecordsDCSetMorePagesNoProjectPrefix()"); String setWithoutProjectPRefix = checkListRecordsDCSet.replace("project:", ""); @@ -178,9 +178,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCAllPages() throws IOException { + public void testListRecordsDCAllPages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsOAIDCAllPages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDCAllPages()"); if (OaipmhUtilitiesOnline.TEST_ALL_PAGES) { @@ -205,9 +205,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsOAIDCMorePagesFromUntil() throws IOException { + public void testListRecordsDCMorePagesFromUntil() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsOAIDCMorePagesFromUntil()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDCMorePagesFromUntil()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -227,10 +227,10 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test(expected = IOException.class) - public void testListRecordsIDIOMMETSSomePagesAndMetadataFormatWithRestok() throws IOException { + public void testListRecordsIdiomMETSSomePagesAndMetadataFormatWithRestok() throws IOException { System.out.println(OaipmhUtilitiesOnline.TESTING - + "testListRecordsIDIOMMETSSomePagesAndMetadataFormatWithRestok()"); + + "testListRecordsIdiomMETSSomePagesAndMetadataFormatWithRestok()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -249,9 +249,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsIDIOMMETSAllPages() throws IOException { + public void testListRecordsIdiomMETSAllPages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIDIOMMETSAllPages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIdiomMETSAllPages()"); if (OaipmhUtilitiesOnline.TEST_ALL_PAGES) { @@ -279,10 +279,10 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsIDIOMMETSMorePagesFromUntil() throws IOException { + public void testListRecordsIdiomMETSMorePagesFromUntil() throws IOException { System.out - .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIDIOMMETSMorePagesFromUntil()"); + .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIdiomMETSMorePagesFromUntil()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -290,8 +290,8 @@ public class TestTGListRecordsOnline { OaipmhUtilitiesOnline.OAI_IDIOMMETS_PREFIX, 6, 30, OaipmhUtilitiesOnline.NO_THREAD_NAME, - checkListRecordsIDIOMFrom, - checkListRecordsIDIOMUntil, + checkListRecordsIdiomFrom, + checkListRecordsIdiomUntil, OaipmhUtilitiesOnline.NO_METADATA_FORMAT_WITH_RESTOK, OaipmhUtilitiesOnline.NO_ERROR_EXPECTED); @@ -302,10 +302,10 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsIDIOMMETSMorePages() throws IOException { + public void testListRecordsIdiomMETSMorePages() throws IOException { System.out - .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIDIOMMETSMorePages()"); + .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsIdiomMETSMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -325,9 +325,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsDATACITEMorePages() throws IOException { + public void testListRecordsDataciteMorePages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDATACITEMorePages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDataciteMorePages()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -347,9 +347,9 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsDATACITEAllPages() throws IOException { + public void testListRecordsDataciteAllPages() throws IOException { - System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDATACITEAllPages()"); + System.out.println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDataciteAllPages()"); if (OaipmhUtilitiesOnline.TEST_ALL_PAGES) { OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, @@ -373,10 +373,10 @@ public class TestTGListRecordsOnline { * @throws IOException */ @Test - public void testListRecordsDATACITEMorePagesFromUntil() throws IOException { + public void testListRecordsDataciteMorePagesFromUntil() throws IOException { System.out - .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDATACITEMorePagesFromUntil()"); + .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsDataciteMorePagesFromUntil()"); OaipmhUtilitiesOnline.examineTGList(oaipmhWebClient, OaipmhUtilitiesOnline.VERB_LIST_RECORDS, @@ -384,8 +384,8 @@ public class TestTGListRecordsOnline { OaipmhUtilitiesOnline.OAI_DATACITE_PREFIX, 15, 100, OaipmhUtilitiesOnline.NO_THREAD_NAME, - checkListRecordsDATACITEFrom, - checkListRecordsDATACITEUntil, + checkListRecordsDataciteFrom, + checkListRecordsDataciteUntil, OaipmhUtilitiesOnline.NO_METADATA_FORMAT_WITH_RESTOK, OaipmhUtilitiesOnline.NO_ERROR_EXPECTED); @@ -398,11 +398,11 @@ public class TestTGListRecordsOnline { * @throws InterruptedException */ @Test - public void testListRecordsConcurrentlyIDIOMMETSMorePages() + public void testListRecordsConcurrentlyIdiomMETSMorePages() throws IOException, InterruptedException, ExecutionException { System.out - .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsConcurrentlyIDIOMMETSMorePages()"); + .println(OaipmhUtilitiesOnline.TESTING + "testListRecordsConcurrentlyIdiomMETSMorePages()"); ExecutorService executor = Executors.newFixedThreadPool(3); @@ -535,11 +535,11 @@ public class TestTGListRecordsOnline { * @throws ExecutionException */ @Test - public void testListRecordsRestokConcurrentlyDCAndIDIOMMETS() + public void testListRecordsRestokConcurrentlyDCAndIdiomMETS() throws InterruptedException, ExecutionException { System.out.println( - OaipmhUtilitiesOnline.TESTING + "testListRecordsRestokConcurrentlyDCAndIDIOMMets()"); + OaipmhUtilitiesOnline.TESTING + "testListRecordsRestokConcurrentlyDCAndIdiomMets()"); ExecutorService executor = Executors.newFixedThreadPool(3); diff --git a/oaipmh-core/src/test/resources/oaipmh.test.repository-de-dariah-eu.properties b/oaipmh-core/src/test/resources/oaipmh.test.repository-de-dariah-eu.properties index 7534039393293335e7e435875e7661aab675c9c2..4b164ad580002a763750a0dfe254e46a8fe3f0cc 100644 --- a/oaipmh-core/src/test/resources/oaipmh.test.repository-de-dariah-eu.properties +++ b/oaipmh-core/src/test/resources/oaipmh.test.repository-de-dariah-eu.properties @@ -12,11 +12,11 @@ expectedGetRecordDatacite = <datacite:alternateIdentifier alternateIdentifierTyp checkListRecordsDCSet = hdl:21.11113/0000-000B-C8F2-2 checkListRecordsDCSetExpectedPages = 4 -checkListRecordsDCFrom = 2018-07-02T16:00 -checkListRecordsDCUntil = 2018-07-02T23:00 +checkListRecordsDCFrom = 2018-07-02T16:00:00 +checkListRecordsDCUntil = 2018-07-02T23:00:00 -checkListRecordsDataciteFrom = 2021-03-23T11:00 -checkListRecordsDataciteUntil = 2021-07-23T11:00 +checkListRecordsDataciteFrom = 2021-03-23T11:00:00 +checkListRecordsDataciteUntil = 2021-07-23T11:00:00 # ListIdentifiers checkListIdentifiersSet = hdl:21.11113/0000-000B-C8F2-2 diff --git a/oaipmh-core/src/test/resources/oaipmh.test.textgridlab-org.properties b/oaipmh-core/src/test/resources/oaipmh.test.textgridlab-org.properties index 398b7683df35e4e90f28a8377756c9ebc318411f..6dece62ca225ac77c34546a97966d2eaf98c1664 100644 --- a/oaipmh-core/src/test/resources/oaipmh.test.textgridlab-org.properties +++ b/oaipmh-core/src/test/resources/oaipmh.test.textgridlab-org.properties @@ -25,8 +25,8 @@ checkListRecordsDCSet = project:TGPR-372fe6dc-57f2-6cd4-01b5-2c4bbefcfd3c checkListRecordsDCFrom = 2012-01-04T01:00:00 checkListRecordsDCUntil = 2012-01-04T12:00:00 -checkListRecordsIdiomFrom = 2020-11-27T15:00 -checkListRecordsIdiomUntil = 2021-11-27T20:00 +checkListRecordsIdiomFrom = 2020-11-27T15:00:00 +checkListRecordsIdiomUntil = 2021-11-27T20:00:00 checkListRecordsDataciteFrom = 2012-01-04T01:00:00 checkListRecordsDataciteUntil = 2012-01-04T12:00:00 diff --git a/oaipmh-core/src/test/resources/oaipmh.test.trep-de-dariah-eu.properties b/oaipmh-core/src/test/resources/oaipmh.test.trep-de-dariah-eu.properties index 32f1bf6d18f72a6a29fff1b1179721b1e1766aab..bc08bdc1360daa0fdde8078642ec0cc217e74130 100644 --- a/oaipmh-core/src/test/resources/oaipmh.test.trep-de-dariah-eu.properties +++ b/oaipmh-core/src/test/resources/oaipmh.test.trep-de-dariah-eu.properties @@ -12,11 +12,11 @@ expectedGetRecordDatacite = <datacite:alternateIdentifier alternateIdentifierTyp checkListRecordsDCSet = hdl:21.T11991/0000-001C-2AA6-8 checkListRecordsDCSetExpectedPages = 4 -checkListRecordsDCFrom = 2018-07-02T16:00 -checkListRecordsDCUntil = 2018-07-02T23:00 +checkListRecordsDCFrom = 2018-07-02T16:00:00 +checkListRecordsDCUntil = 2018-07-02T23:00:00 -checkListRecordsDataciteFrom = 2018-07-02T16:00 -checkListRecordsDataciteUntil = 2018-07-02T23:00 +checkListRecordsDataciteFrom = 2018-07-02T16:00:00 +checkListRecordsDataciteUntil = 2018-07-02T23:00:00 # ListIdentifiers checkListIdentifiersSet = hdl:21.T11991/0000-001C-2AA6-8