Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
janvanmansum committed Dec 4, 2024
1 parent 823eae4 commit 7930345
Show file tree
Hide file tree
Showing 48 changed files with 350 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bag-Software-Agent: bagit.py v1.8.1 <https://github.com/LibraryOfCongress/bagit-python>
Bagging-Date: 2023-02-21
Payload-Oxum: 104.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BagIt-Version: 0.97
Tag-File-Character-Encoding: UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileA
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileB
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileC
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileD
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<ddm:DDM
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcx-dai="http://easy.dans.knaw.nl/schemas/dcx/dai/"
xmlns:ddm="http://schemas.dans.knaw.nl/dataset/ddm-v2/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:id-type="http://easy.dans.knaw.nl/schemas/vocab/identifier-type/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ddm:profile>
<dc:title>A bag to demonstrate revisions - 1</dc:title>
<dcterms:description>
This series of bags demonstrates how to update datasets with new versions
</dcterms:description>
<dcx-dai:creatorDetails>
<dcx-dai:author>
<dcx-dai:titles>Dr</dcx-dai:titles>
<dcx-dai:initials>I</dcx-dai:initials>
<dcx-dai:surname>Lastname</dcx-dai:surname>
<dcx-dai:organization>
<dcx-dai:name xml:lang="en">Example Org</dcx-dai:name>
</dcx-dai:organization>
</dcx-dai:author>
</dcx-dai:creatorDetails>
<ddm:created>2015-09-09</ddm:created>
<ddm:available>2015-09-09</ddm:available>
<ddm:audience>D16300</ddm:audience>
<ddm:audience>D16100</ddm:audience>
<ddm:audience>D16200</ddm:audience>
<ddm:audience>D16400</ddm:audience>
<ddm:audience>D16500</ddm:audience>
<ddm:audience>E16000</ddm:audience>
<ddm:accessRights>OPEN_ACCESS</ddm:accessRights>
<ddm:personalData present="No"/>
</ddm:profile>
<ddm:dcmiMetadata>
<dcterms:license xsi:type="dcterms:URI">http://opensource.org/licenses/MIT</dcterms:license>
<dcterms:rightsHolder>I Lastname</dcterms:rightsHolder>
<dcterms:identifier xsi:type="id-type:DOI">10.17026/dans-z6y-5y2e</dcterms:identifier>
</ddm:dcmiMetadata>
</ddm:DDM>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<files xmlns="http://easy.dans.knaw.nl/schemas/bag/metadata/files/" xmlns:dcterms="http://purl.org/dc/terms/">
<file filepath="data/file1.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/file2.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/file3.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/file4.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileA.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileB.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileC.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileD.txt">
<dcterms:format>text/plain</dcterms:format>
<accessibleToRights>RESTRICTED_REQUEST</accessibleToRights>
</file>
</files>

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
f850910760b637cc7d289d1ce89eabe8d50173aa manifest-sha1.txt
e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt
0d59ec57226a827c75ec1457fb243405194f3d07 metadata/dataset.xml
8d0862b0496d4d067bc594651e6e52574b21da42 metadata/files.xml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bag-Software-Agent: bagit.py v1.8.1 <https://github.com/LibraryOfCongress/bagit-python>
Bagging-Date: 2023-02-21
Is-Version-Of: urn:uuid:00000000-0000-0000-0000-000000000001
Payload-Oxum: 252.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BagIt-Version: 0.97
Tag-File-Character-Encoding: UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file4 with modifications.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is moved from root dir to subdir between version 2 and 3.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileA
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileB
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileD with modifications.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is moved from subdir to root dir between version 2 and 3.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<ddm:DDM
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcx-dai="http://easy.dans.knaw.nl/schemas/dcx/dai/"
xmlns:ddm="http://schemas.dans.knaw.nl/dataset/ddm-v2/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:id-type="http://easy.dans.knaw.nl/schemas/vocab/identifier-type/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ddm:profile>
<dc:title>A bag to demonstrate revisions - 2</dc:title>
<dcterms:description>
Updated description for revision 2
</dcterms:description>
<dcx-dai:creatorDetails>
<dcx-dai:author>
<dcx-dai:titles>Dr</dcx-dai:titles>
<dcx-dai:initials>I</dcx-dai:initials>
<dcx-dai:surname>Lastname</dcx-dai:surname>
<dcx-dai:organization>
<dcx-dai:name xml:lang="en">Example Org</dcx-dai:name>
</dcx-dai:organization>
</dcx-dai:author>
</dcx-dai:creatorDetails>
<ddm:created>2020-01-01</ddm:created>
<ddm:available>2025-01-01</ddm:available>
<ddm:audience>D16300</ddm:audience>
<ddm:accessRights>OPEN_ACCESS</ddm:accessRights>
<ddm:personalData present="No"/>
</ddm:profile>
<ddm:dcmiMetadata>
<dcterms:license xsi:type="dcterms:URI">http://opensource.org/licenses/MIT</dcterms:license>
<dcterms:rightsHolder>I Lastname</dcterms:rightsHolder>
<dcterms:identifier xsi:type="id-type:DOI">10.17026/dans-z6y-5y2e</dcterms:identifier>
</ddm:dcmiMetadata>
</ddm:DDM>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<files xmlns="http://easy.dans.knaw.nl/schemas/bag/metadata/files/" xmlns:dcterms="http://purl.org/dc/terms/">
<file filepath="data/file1.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/file2-renamed.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/file4.txt">
<dcterms:description>Content of this file has changed</dcterms:description>
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileA.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileB-renamed.txt">
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/subdir/fileD.txt">
<dcterms:description>Content of this file has changed</dcterms:description>
<dcterms:format>text/plain</dcterms:format>
<accessibleToRights>NONE</accessibleToRights>
</file>
<file filepath="data/subdir/from-subdir-to-root.txt">
<dcterms:description>I am in a subdir</dcterms:description>
<dcterms:format>text/plain</dcterms:format>
</file>
<file filepath="data/from-root-to-subdir.txt">
<dcterms:description>I am in the root dir</dcterms:description>
<dcterms:format>text/plain</dcterms:format>
</file>
</files>

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
2a05f2af17aceba2307ea93706d83c95dff25511 metadata/dataset.xml
e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt
2206d43e98a0608eec54f2e3feda0dcd0d977eb3 manifest-sha1.txt
389232664ba41566040278ce85d8d8c8e5887a3d metadata/files.xml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bag-Software-Agent: bagit.py v1.8.1 <https://github.com/LibraryOfCongress/bagit-python>
Bagging-Date: 2023-02-21
Is-Version-Of: urn:uuid:00000000-0000-0000-0000-000000000001
Payload-Oxum: 299.10
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BagIt-Version: 0.97
Tag-File-Character-Encoding: UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file3
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is file 4 with even more modifications.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is moved from subdir to root dir between version 2 and 3.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileA
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileB
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileC
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is fileD with even more modifications.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file is moved from root dir to subdir between version 2 and 3.
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<ddm:DDM
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dcx-dai="http://easy.dans.knaw.nl/schemas/dcx/dai/"
xmlns:ddm="http://schemas.dans.knaw.nl/dataset/ddm-v2/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:id-type="http://easy.dans.knaw.nl/schemas/vocab/identifier-type/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ddm:profile>
<dc:title>A bag to demonstrate revisions - 3</dc:title>
<dcterms:description>
An yet another description for version 3
</dcterms:description>
<dcx-dai:creatorDetails>
<dcx-dai:author>
<dcx-dai:titles>Dr</dcx-dai:titles>
<dcx-dai:initials>I</dcx-dai:initials>
<dcx-dai:surname>Lastname</dcx-dai:surname>
<dcx-dai:organization>
<dcx-dai:name xml:lang="en">Example Org</dcx-dai:name>
</dcx-dai:organization>
</dcx-dai:author>
</dcx-dai:creatorDetails>
<ddm:created>2020-01-01</ddm:created>
<ddm:available>2025-01-01</ddm:available>
<ddm:audience>D16300</ddm:audience>
<ddm:accessRights>OPEN_ACCESS</ddm:accessRights>
<ddm:personalData present="No"/>
</ddm:profile>
<ddm:dcmiMetadata>
<dcterms:license xsi:type="dcterms:URI">http://opensource.org/licenses/MIT</dcterms:license>
<dcterms:rightsHolder>I Lastname</dcterms:rightsHolder>
<dcterms:identifier xsi:type="id-type:DOI">10.17026/dans-z6y-5y2e</dcterms:identifier>
</ddm:dcmiMetadata>
</ddm:DDM>
Loading

0 comments on commit 7930345

Please sign in to comment.