diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/deposit.properties b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/deposit.properties new file mode 100644 index 0000000..dd6c26d --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/deposit.properties @@ -0,0 +1,11 @@ +bag-store.bag-id = 00000000-0000-0000-0000-000000000001 +dataverse.bag-id = urn:uuid:00000000-0000-0000-0000-000000000001 +creation.timestamp = 2024-12-04T15:47:37.604306939+01:00 +deposit.origin = SWORD2 +depositor.userId = user001 +state.label = PUBLISHED +state.description = The deposit was successfully ingested in the Data Station and will be automatically archived. +bag-store.bag-name = revision01 +dataverse.sword-token = sword:00000000-0000-0000-0000-000000000001 +identifier.urn = urn:nbn:nl:ui:13-de0f2b1c-2ffc-429b-93a2-151248406eee +identifier.doi = 10.5072/FK2/UMUCKU diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/README.md b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/README.md new file mode 100644 index 0000000..bf73df1 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/README.md @@ -0,0 +1,28 @@ +revisions +========= + +The bags revision01, revision02 and revision03 demonstrate how deposits can update existing datasets: revision01 creates a new +dataset and revision02 and revision03 create versions 2 and 3. + +Revision01 +---------- +Revision01 has a file (fileD) with accessibleToRights set to RESTRICTED_REQUEST. After revision01 is ingested, the +dataset has File Access Requests enabled. No Terms of Access are filled in. They could be filled in but are +not mandatory, as they can be negotiated via a request. + +Revision02 +---------- +In revision 02 fileD has been further restricted to accessibleToRights NONE. This means that access can no longer be +requested. Since File Access Requests is a dataset-level attribute, this mean that the dataset has been closed for +access requests for all its restricted files in all versions including future versions. Opening it again cannot be +done via automated deposit, and requires manual actions by the administrator. + +An alternative way to close the dataset for file access requests is to set ddm:accessRights in dataset.xml to NO_ACCESS. + +In revision02 the available date is set to 2025. If, by the time you are reading this, this is still in the future, this would +embargo any files added to the new version, either as new files or as replacements for existing files. + +Revision03 +---------- +In revision 03 fileD has been reset to RESTRICTED_REQUEST. As explained in the previous section, this does +NOT enable file access request for the dataset again, because this is a dataset-level attribute. diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bag-info.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bag-info.txt new file mode 100644 index 0000000..de256d0 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bag-info.txt @@ -0,0 +1,3 @@ +Bag-Software-Agent: bagit.py v1.8.1 +Bagging-Date: 2023-02-21 +Payload-Oxum: 104.8 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bagit.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file1.txt new file mode 100644 index 0000000..d88c464 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file1.txt @@ -0,0 +1 @@ +This is file1 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file2.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file2.txt new file mode 100644 index 0000000..d9a0c4d --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file2.txt @@ -0,0 +1 @@ +This is file2 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file3.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file3.txt new file mode 100644 index 0000000..9682004 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file3.txt @@ -0,0 +1 @@ +This is file3 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file4.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file4.txt new file mode 100644 index 0000000..7be7387 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/file4.txt @@ -0,0 +1 @@ +This is file4 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileA.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileA.txt new file mode 100644 index 0000000..c29eeab --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileA.txt @@ -0,0 +1 @@ +This is fileA \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileB.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileB.txt new file mode 100644 index 0000000..b621ba5 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileB.txt @@ -0,0 +1 @@ +This is fileB \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileC.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileC.txt new file mode 100644 index 0000000..679f99c --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileC.txt @@ -0,0 +1 @@ +This is fileC \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileD.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileD.txt new file mode 100644 index 0000000..6f435fd --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/data/subdir/fileD.txt @@ -0,0 +1 @@ +This is fileD \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/manifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/manifest-sha1.txt new file mode 100644 index 0000000..185a331 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/manifest-sha1.txt @@ -0,0 +1,8 @@ +912dcd8724d99d2ecef62f089ef1b81032845db8 data/file1.txt +02f1b44559a4a4e4d213e694fc082f039732ba5d data/file2.txt +5f0de8456a3e55bc316fdde3c10f10b35e69ddf3 data/file3.txt +27d811fcc8a62981486f473f172e201543178146 data/file4.txt +cfb9ed217d610ad6a32487889f6fe5319056ce6c data/subdir/fileA.txt +4e6867e27887a3df45412b557f561a081e516555 data/subdir/fileB.txt +c9ea1142a3c51817bcc163f6efc23dfdb9b195cd data/subdir/fileC.txt +a58371604201655035ff49711e58a4891536f1d6 data/subdir/fileD.txt \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/dataset.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/dataset.xml new file mode 100644 index 0000000..34fcea6 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/dataset.xml @@ -0,0 +1,39 @@ + + + A bag to demonstrate revisions - 1 + + This series of bags demonstrates how to update datasets with new versions + + + + Dr + I + Lastname + + Example Org + + + + 2015-09-09 + 2015-09-09 + D16300 + D16100 + D16200 + D16400 + D16500 + E16000 + OPEN_ACCESS + + + + http://opensource.org/licenses/MIT + I Lastname + 10.17026/dans-z6y-5y2e + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/files.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/files.xml new file mode 100644 index 0000000..217b414 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/metadata/files.xml @@ -0,0 +1,29 @@ + + + + text/plain + + + text/plain + + + text/plain + + + text/plain + + + text/plain + + + text/plain + + + text/plain + + + text/plain + RESTRICTED_REQUEST + + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/tagmanifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/tagmanifest-sha1.txt new file mode 100644 index 0000000..682b4cc --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000001/revision01/tagmanifest-sha1.txt @@ -0,0 +1,4 @@ +f850910760b637cc7d289d1ce89eabe8d50173aa manifest-sha1.txt +e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt +0d59ec57226a827c75ec1457fb243405194f3d07 metadata/dataset.xml +8d0862b0496d4d067bc594651e6e52574b21da42 metadata/files.xml diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/deposit.properties b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/deposit.properties new file mode 100644 index 0000000..d6606ed --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/deposit.properties @@ -0,0 +1,11 @@ +bag-store.bag-id = 00000000-0000-0000-0000-000000000002 +dataverse.bag-id = urn:uuid:00000000-0000-0000-0000-000000000002 +creation.timestamp = 2024-12-04T15:47:47.293558430+01:00 +deposit.origin = SWORD2 +depositor.userId = user001 +state.label = PUBLISHED +state.description = The deposit was successfully ingested in the Data Station and will be automatically archived. +bag-store.bag-name = revision02 +dataverse.sword-token = sword:00000000-0000-0000-0000-000000000001 +identifier.urn = urn:nbn:nl:ui:13-de0f2b1c-2ffc-429b-93a2-151248406eee +identifier.doi = 10.5072/FK2/UMUCKU diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bag-info.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bag-info.txt new file mode 100644 index 0000000..1cd8e55 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bag-info.txt @@ -0,0 +1,4 @@ +Bag-Software-Agent: bagit.py v1.8.1 +Bagging-Date: 2023-02-21 +Is-Version-Of: urn:uuid:00000000-0000-0000-0000-000000000001 +Payload-Oxum: 252.8 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bagit.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file1.txt new file mode 100644 index 0000000..d88c464 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file1.txt @@ -0,0 +1 @@ +This is file1 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file2-renamed.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file2-renamed.txt new file mode 100644 index 0000000..d9a0c4d --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file2-renamed.txt @@ -0,0 +1 @@ +This is file2 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file4.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file4.txt new file mode 100644 index 0000000..0e49f66 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/file4.txt @@ -0,0 +1 @@ +This is file4 with modifications. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/from-root-to-subdir.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/from-root-to-subdir.txt new file mode 100644 index 0000000..abee171 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/from-root-to-subdir.txt @@ -0,0 +1 @@ +This file is moved from root dir to subdir between version 2 and 3. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileA.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileA.txt new file mode 100644 index 0000000..c29eeab --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileA.txt @@ -0,0 +1 @@ +This is fileA \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileB-renamed.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileB-renamed.txt new file mode 100644 index 0000000..b621ba5 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileB-renamed.txt @@ -0,0 +1 @@ +This is fileB \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileD.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileD.txt new file mode 100644 index 0000000..61424df --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/fileD.txt @@ -0,0 +1 @@ +This is fileD with modifications. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/from-subdir-to-root.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/from-subdir-to-root.txt new file mode 100644 index 0000000..7905f20 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/data/subdir/from-subdir-to-root.txt @@ -0,0 +1 @@ +This file is moved from subdir to root dir between version 2 and 3. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/manifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/manifest-sha1.txt new file mode 100644 index 0000000..b49a124 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/manifest-sha1.txt @@ -0,0 +1,8 @@ +38346b95fadd5fce5cc512a8e2b101ec0b4bd766 data/file4.txt +803c3d2458982137364ef85c50f28d904cf8b25e data/subdir/from-subdir-to-root.txt +4e6867e27887a3df45412b557f561a081e516555 data/subdir/fileB-renamed.txt +cfb9ed217d610ad6a32487889f6fe5319056ce6c data/subdir/fileA.txt +271490baca1915b0592d94f2b7b6357fad2b9306 data/from-root-to-subdir.txt +912dcd8724d99d2ecef62f089ef1b81032845db8 data/file1.txt +02f1b44559a4a4e4d213e694fc082f039732ba5d data/file2-renamed.txt +205c6d07fdbc2e456c976f8650da360d2bf68b79 data/subdir/fileD.txt diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/dataset.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/dataset.xml new file mode 100644 index 0000000..3b51c27 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/dataset.xml @@ -0,0 +1,34 @@ + + + A bag to demonstrate revisions - 2 + + Updated description for revision 2 + + + + Dr + I + Lastname + + Example Org + + + + 2020-01-01 + 2025-01-01 + D16300 + OPEN_ACCESS + + + + http://opensource.org/licenses/MIT + I Lastname + 10.17026/dans-z6y-5y2e + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/files.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/files.xml new file mode 100644 index 0000000..7efb877 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/metadata/files.xml @@ -0,0 +1,33 @@ + + + + text/plain + + + text/plain + + + Content of this file has changed + text/plain + + + text/plain + + + text/plain + + + Content of this file has changed + text/plain + NONE + + + I am in a subdir + text/plain + + + I am in the root dir + text/plain + + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/tagmanifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/tagmanifest-sha1.txt new file mode 100644 index 0000000..f57dccd --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000002/revision02/tagmanifest-sha1.txt @@ -0,0 +1,4 @@ +2a05f2af17aceba2307ea93706d83c95dff25511 metadata/dataset.xml +e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt +2206d43e98a0608eec54f2e3feda0dcd0d977eb3 manifest-sha1.txt +389232664ba41566040278ce85d8d8c8e5887a3d metadata/files.xml diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/deposit.properties b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/deposit.properties new file mode 100644 index 0000000..ef50f20 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/deposit.properties @@ -0,0 +1,11 @@ +bag-store.bag-id = 00000000-0000-0000-0000-000000000003 +dataverse.bag-id = urn:uuid:00000000-0000-0000-0000-000000000003 +creation.timestamp = 2024-12-04T15:48:09.387152259+01:00 +deposit.origin = SWORD2 +depositor.userId = user001 +state.label = PUBLISHED +state.description = The deposit was successfully ingested in the Data Station and will be automatically archived. +bag-store.bag-name = revision03 +dataverse.sword-token = sword:00000000-0000-0000-0000-000000000001 +identifier.urn = urn:nbn:nl:ui:13-de0f2b1c-2ffc-429b-93a2-151248406eee +identifier.doi = 10.5072/FK2/UMUCKU diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bag-info.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bag-info.txt new file mode 100644 index 0000000..4f45dc4 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bag-info.txt @@ -0,0 +1,4 @@ +Bag-Software-Agent: bagit.py v1.8.1 +Bagging-Date: 2023-02-21 +Is-Version-Of: urn:uuid:00000000-0000-0000-0000-000000000001 +Payload-Oxum: 299.10 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bagit.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file1.txt new file mode 100644 index 0000000..d88c464 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file1.txt @@ -0,0 +1 @@ +This is file1 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file2-renamed.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file2-renamed.txt new file mode 100644 index 0000000..d9a0c4d --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file2-renamed.txt @@ -0,0 +1 @@ +This is file2 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file3.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file3.txt new file mode 100644 index 0000000..9682004 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file3.txt @@ -0,0 +1 @@ +This is file3 \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file4.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file4.txt new file mode 100644 index 0000000..4d1f644 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/file4.txt @@ -0,0 +1 @@ +This is file 4 with even more modifications. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/from-subdir-to-root.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/from-subdir-to-root.txt new file mode 100644 index 0000000..7905f20 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/from-subdir-to-root.txt @@ -0,0 +1 @@ +This file is moved from subdir to root dir between version 2 and 3. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileA.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileA.txt new file mode 100644 index 0000000..c29eeab --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileA.txt @@ -0,0 +1 @@ +This is fileA \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileB-renamed.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileB-renamed.txt new file mode 100644 index 0000000..b621ba5 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileB-renamed.txt @@ -0,0 +1 @@ +This is fileB \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileC.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileC.txt new file mode 100644 index 0000000..679f99c --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileC.txt @@ -0,0 +1 @@ +This is fileC \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileD.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileD.txt new file mode 100644 index 0000000..5f524a2 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/fileD.txt @@ -0,0 +1 @@ +This is fileD with even more modifications. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/from-root-to-subdir.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/from-root-to-subdir.txt new file mode 100644 index 0000000..abee171 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/data/subdir/from-root-to-subdir.txt @@ -0,0 +1 @@ +This file is moved from root dir to subdir between version 2 and 3. \ No newline at end of file diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/manifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/manifest-sha1.txt new file mode 100644 index 0000000..a7741e0 --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/manifest-sha1.txt @@ -0,0 +1,10 @@ +02f1b44559a4a4e4d213e694fc082f039732ba5d data/file2-renamed.txt +1a0f96d77513d88bef8fa063163044a6ed5f8566 data/file4.txt +64d5460524fd1d5a259ea65d3292383570967b7c data/subdir/fileD.txt +4e6867e27887a3df45412b557f561a081e516555 data/subdir/fileB-renamed.txt +c9ea1142a3c51817bcc163f6efc23dfdb9b195cd data/subdir/fileC.txt +271490baca1915b0592d94f2b7b6357fad2b9306 data/subdir/from-root-to-subdir.txt +cfb9ed217d610ad6a32487889f6fe5319056ce6c data/subdir/fileA.txt +803c3d2458982137364ef85c50f28d904cf8b25e data/from-subdir-to-root.txt +912dcd8724d99d2ecef62f089ef1b81032845db8 data/file1.txt +5f0de8456a3e55bc316fdde3c10f10b35e69ddf3 data/file3.txt diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/dataset.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/dataset.xml new file mode 100644 index 0000000..2dd5e7f --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/dataset.xml @@ -0,0 +1,34 @@ + + + A bag to demonstrate revisions - 3 + + An yet another description for version 3 + + + + Dr + I + Lastname + + Example Org + + + + 2020-01-01 + 2025-01-01 + D16300 + OPEN_ACCESS + + + + http://opensource.org/licenses/MIT + I Lastname + 10.17026/dans-z6y-5y2e + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/files.xml b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/files.xml new file mode 100644 index 0000000..ac1179c --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/metadata/files.xml @@ -0,0 +1,39 @@ + + + + text/plain + + + text/plain + + + text/plain + + + Content of this file has changed again + text/plain + + + text/plain + + + text/plain + + + text/plain + + + Content of this file has changed again + text/plain + RESTRICTED_REQUEST + + + I am in the root dir + text/plain + + + I am in the subdir + text/plain + + + diff --git a/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/tagmanifest-sha1.txt b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/tagmanifest-sha1.txt new file mode 100644 index 0000000..dc22fce --- /dev/null +++ b/src/test/resources/unit-test/update-deposits/00000000-0000-0000-0000-000000000003/revision03/tagmanifest-sha1.txt @@ -0,0 +1,4 @@ +9002fadbf0f10e5a58ebd4d66f8d54a2e41c9214 metadata/dataset.xml +e5d5ae25938cfa37c70a7d948453d69d4d5eeae1 manifest-sha1.txt +24b520e80fbc6dbad56a1149470af3638a8d0e7c metadata/files.xml +e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt