From 54485fa2520c9188f30a38413e7a7ef5cbf17752 Mon Sep 17 00:00:00 2001 From: Jan van Mansum Date: Wed, 28 Aug 2024 15:49:35 +0200 Subject: [PATCH] Added examples with invalid terms and codes --- .../invalid/invalid-codes/README.md | 5 + .../invalid/invalid-codes/bag-info.txt | 4 + .../invalid/invalid-codes/bagit.txt | 2 + .../invalid/invalid-codes/data/file1.txt | 1 + .../invalid-codes/data/subdir/file2.txt | 1 + .../invalid/invalid-codes/manifest-sha1.txt | 2 + .../invalid-codes/metadata/dataset.xml | 149 +++++++++++++ .../invalid/invalid-codes/metadata/files.xml | 27 +++ .../invalid-codes/tagmanifest-sha1.txt | 5 + .../invalid/invalid-terms/README.md | 5 + .../invalid/invalid-terms/bag-info.txt | 4 + .../invalid/invalid-terms/bagit.txt | 2 + .../invalid/invalid-terms/data/file1.txt | 1 + .../invalid-terms/data/subdir/file2.txt | 1 + .../invalid/invalid-terms/manifest-sha1.txt | 2 + .../invalid-terms/metadata/dataset.xml | 197 ++++++++++++++++++ .../invalid/invalid-terms/metadata/files.xml | 27 +++ .../invalid-terms/tagmanifest-sha1.txt | 5 + 18 files changed, 440 insertions(+) create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/README.md create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/bag-info.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/bagit.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/data/file1.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/data/subdir/file2.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/manifest-sha1.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/metadata/dataset.xml create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/metadata/files.xml create mode 100644 src/main/resources/example-bags/invalid/invalid-codes/tagmanifest-sha1.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/README.md create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/bag-info.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/bagit.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/data/file1.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/data/subdir/file2.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/manifest-sha1.txt create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/metadata/dataset.xml create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/metadata/files.xml create mode 100644 src/main/resources/example-bags/invalid/invalid-terms/tagmanifest-sha1.txt diff --git a/src/main/resources/example-bags/invalid/invalid-codes/README.md b/src/main/resources/example-bags/invalid/invalid-codes/README.md new file mode 100644 index 0000000..8ad3801 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/README.md @@ -0,0 +1,5 @@ +all-mappings +============ + +This bags contains one or more examples of each [mapping rule](https://docs.google.com/spreadsheets/d/1G5YHSDg3a91nI9NgRjbz11iRFU9qgnNkde6K84j1NWI/). +The codes in the comments reference the rule identifiers in the spreadsheet. \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-codes/bag-info.txt b/src/main/resources/example-bags/invalid/invalid-codes/bag-info.txt new file mode 100644 index 0000000..27fb5e7 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/bag-info.txt @@ -0,0 +1,4 @@ +Payload-Oxum: 240.3 +Bagging-Date: 2022-10-23 +Bag-Size: 3.1 MB +Has-Organizational-Identifier: TESTPREFIX:1234 diff --git a/src/main/resources/example-bags/invalid/invalid-codes/bagit.txt b/src/main/resources/example-bags/invalid/invalid-codes/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/src/main/resources/example-bags/invalid/invalid-codes/data/file1.txt b/src/main/resources/example-bags/invalid/invalid-codes/data/file1.txt new file mode 100644 index 0000000..31beb17 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/data/file1.txt @@ -0,0 +1 @@ +Test file in root of dataset \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-codes/data/subdir/file2.txt b/src/main/resources/example-bags/invalid/invalid-codes/data/subdir/file2.txt new file mode 100644 index 0000000..15528f4 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/data/subdir/file2.txt @@ -0,0 +1 @@ +Test file in subdirectory. \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-codes/manifest-sha1.txt b/src/main/resources/example-bags/invalid/invalid-codes/manifest-sha1.txt new file mode 100644 index 0000000..6de22e0 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/manifest-sha1.txt @@ -0,0 +1,2 @@ +a5c5c4051724b655863c517a15c56e45753c3e5a data/file1.txt +0d57a5bc9f5af7e8edcc90d64fd3c24dfc23e727 data/subdir/file2.txt diff --git a/src/main/resources/example-bags/invalid/invalid-codes/metadata/dataset.xml b/src/main/resources/example-bags/invalid/invalid-codes/metadata/dataset.xml new file mode 100644 index 0000000..e612a0c --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/metadata/dataset.xml @@ -0,0 +1,149 @@ + + + + A bag containing invalid vocab codes + + Some of the codes specified for ABR are invalid + + + + Dr + I + Lastname + 0000 0001 2281 955X + https://orcid.org/0000-0001-9183-9538 + + Example Org + + + + 2024-08-28 + 2024-08-28 + D13400 + D16300 + OPEN_ACCESS + + + + I Lastname + Georgian + + + + + + + Not a report + + + + + Not a valid acquisition method + + + + + Not a valid complex type + + + + + Not a valid artifact + + + + + Not a valid period + + + + Het Romeinse Rijk + De Oudheid + + + + + 126466 529006 + + + + + + + 52.078663 4.288788 + + + + + + + + 102000 335000 + 140000 628000 + + + + + + + + + 51.46343658020442 3.5621054065986075 + 53.23074335194507 6.563118076315912 + + + + + + + + + 1 2 + 3 4 + + + + + + South Africa + Japan + + + Roman Empire + + + http://opensource.org/licenses/MIT + + + + + Restricted files accessible under the following conditions: ... + + + 10.17026/dans-z6y-5y2e + + + diff --git a/src/main/resources/example-bags/invalid/invalid-codes/metadata/files.xml b/src/main/resources/example-bags/invalid/invalid-codes/metadata/files.xml new file mode 100644 index 0000000..1455279 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/metadata/files.xml @@ -0,0 +1,27 @@ + + + + + + A file with a simple description + + + + RESTRICTED_REQUEST + + + + + + + + + + diff --git a/src/main/resources/example-bags/invalid/invalid-codes/tagmanifest-sha1.txt b/src/main/resources/example-bags/invalid/invalid-codes/tagmanifest-sha1.txt new file mode 100644 index 0000000..1e565af --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-codes/tagmanifest-sha1.txt @@ -0,0 +1,5 @@ +7e9cb7c9bcb9402ca1b68fb9b80114a520427d65 metadata/dataset.xml +33d507e3ced80f1b83f8e73ae780e870e159de9a metadata/files.xml +e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt +fcebcebafb062a34ecee8f475cfa81cb745fbed6 manifest-sha1.txt +f1532a6307e82f76b7911304a6c16a4b15414e4b README.md diff --git a/src/main/resources/example-bags/invalid/invalid-terms/README.md b/src/main/resources/example-bags/invalid/invalid-terms/README.md new file mode 100644 index 0000000..8ad3801 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/README.md @@ -0,0 +1,5 @@ +all-mappings +============ + +This bags contains one or more examples of each [mapping rule](https://docs.google.com/spreadsheets/d/1G5YHSDg3a91nI9NgRjbz11iRFU9qgnNkde6K84j1NWI/). +The codes in the comments reference the rule identifiers in the spreadsheet. \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-terms/bag-info.txt b/src/main/resources/example-bags/invalid/invalid-terms/bag-info.txt new file mode 100644 index 0000000..27fb5e7 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/bag-info.txt @@ -0,0 +1,4 @@ +Payload-Oxum: 240.3 +Bagging-Date: 2022-10-23 +Bag-Size: 3.1 MB +Has-Organizational-Identifier: TESTPREFIX:1234 diff --git a/src/main/resources/example-bags/invalid/invalid-terms/bagit.txt b/src/main/resources/example-bags/invalid/invalid-terms/bagit.txt new file mode 100644 index 0000000..c4aebb4 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/bagit.txt @@ -0,0 +1,2 @@ +BagIt-Version: 0.97 +Tag-File-Character-Encoding: UTF-8 diff --git a/src/main/resources/example-bags/invalid/invalid-terms/data/file1.txt b/src/main/resources/example-bags/invalid/invalid-terms/data/file1.txt new file mode 100644 index 0000000..31beb17 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/data/file1.txt @@ -0,0 +1 @@ +Test file in root of dataset \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-terms/data/subdir/file2.txt b/src/main/resources/example-bags/invalid/invalid-terms/data/subdir/file2.txt new file mode 100644 index 0000000..15528f4 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/data/subdir/file2.txt @@ -0,0 +1 @@ +Test file in subdirectory. \ No newline at end of file diff --git a/src/main/resources/example-bags/invalid/invalid-terms/manifest-sha1.txt b/src/main/resources/example-bags/invalid/invalid-terms/manifest-sha1.txt new file mode 100644 index 0000000..6de22e0 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/manifest-sha1.txt @@ -0,0 +1,2 @@ +a5c5c4051724b655863c517a15c56e45753c3e5a data/file1.txt +0d57a5bc9f5af7e8edcc90d64fd3c24dfc23e727 data/subdir/file2.txt diff --git a/src/main/resources/example-bags/invalid/invalid-terms/metadata/dataset.xml b/src/main/resources/example-bags/invalid/invalid-terms/metadata/dataset.xml new file mode 100644 index 0000000..e51a821 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/metadata/dataset.xml @@ -0,0 +1,197 @@ + + + + A bag containing invalid vocab terms + + Some of the terms specified for ABR and DANS Collections are invalid. + + + + Dr + I + Lastname + 0000 0001 2281 955X + https://orcid.org/0000-0001-9183-9538 + + Example Org + + + + 2024-08-28 + 2024-08-28 + D13400 + D16300 + OPEN_ACCESS + + + + I Lastname + Georgian + + + + + + + + + Fantastic report + + + + + Not a report + + + + + + Not a valid acquisition method + + + + + + + + Not a valid complex type + + + + + Not a valid complex type + + + + + + + Not a valid artifact + + + + + + Not a valid artifact + + + + + + Not a valid artifact + + + + + + Not a valid period + + + + + Het Romeinse Rijk + De Oudheid + + + + + 126466 529006 + + + + + + + 52.078663 4.288788 + + + + + + + + 102000 335000 + 140000 628000 + + + + + + + + + 51.46343658020442 3.5621054065986075 + 53.23074335194507 6.563118076315912 + + + + + + + + + 1 2 + 3 4 + + + + + + South Africa + Japan + + + Roman Empire + + + http://opensource.org/licenses/MIT + + + + + Restricted files accessible under the following conditions: ... + + + 10.17026/dans-z6y-5y2e + + + diff --git a/src/main/resources/example-bags/invalid/invalid-terms/metadata/files.xml b/src/main/resources/example-bags/invalid/invalid-terms/metadata/files.xml new file mode 100644 index 0000000..1455279 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/metadata/files.xml @@ -0,0 +1,27 @@ + + + + + + A file with a simple description + + + + RESTRICTED_REQUEST + + + + + + + + + + diff --git a/src/main/resources/example-bags/invalid/invalid-terms/tagmanifest-sha1.txt b/src/main/resources/example-bags/invalid/invalid-terms/tagmanifest-sha1.txt new file mode 100644 index 0000000..77c4a81 --- /dev/null +++ b/src/main/resources/example-bags/invalid/invalid-terms/tagmanifest-sha1.txt @@ -0,0 +1,5 @@ +3f8d298632083b92c86a7442b91244afcafa1add metadata/dataset.xml +33d507e3ced80f1b83f8e73ae780e870e159de9a metadata/files.xml +e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt +fcebcebafb062a34ecee8f475cfa81cb745fbed6 manifest-sha1.txt +f1532a6307e82f76b7911304a6c16a4b15414e4b README.md