-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added examples with invalid terms and codes
- Loading branch information
1 parent
df490ad
commit 54485fa
Showing
18 changed files
with
440 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/main/resources/example-bags/invalid/invalid-codes/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
4 changes: 4 additions & 0 deletions
4
src/main/resources/example-bags/invalid/invalid-codes/bag-info.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Payload-Oxum: 240.3 | ||
Bagging-Date: 2022-10-23 | ||
Bag-Size: 3.1 MB | ||
Has-Organizational-Identifier: TESTPREFIX:1234 |
2 changes: 2 additions & 0 deletions
2
src/main/resources/example-bags/invalid/invalid-codes/bagit.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BagIt-Version: 0.97 | ||
Tag-File-Character-Encoding: UTF-8 |
1 change: 1 addition & 0 deletions
1
src/main/resources/example-bags/invalid/invalid-codes/data/file1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test file in root of dataset |
1 change: 1 addition & 0 deletions
1
src/main/resources/example-bags/invalid/invalid-codes/data/subdir/file2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test file in subdirectory. |
2 changes: 2 additions & 0 deletions
2
src/main/resources/example-bags/invalid/invalid-codes/manifest-sha1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a5c5c4051724b655863c517a15c56e45753c3e5a data/file1.txt | ||
0d57a5bc9f5af7e8edcc90d64fd3c24dfc23e727 data/subdir/file2.txt |
149 changes: 149 additions & 0 deletions
149
src/main/resources/example-bags/invalid/invalid-codes/metadata/dataset.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
<ddm:DDM | ||
xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
xmlns:dcx-dai="http://easy.dans.knaw.nl/schemas/dcx/dai/" | ||
xmlns:dcx-gml="http://easy.dans.knaw.nl/schemas/dcx/gml/" | ||
xmlns:ddm="http://schemas.dans.knaw.nl/dataset/ddm-v2/" | ||
xmlns:dcterms="http://purl.org/dc/terms/" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:id-type="http://easy.dans.knaw.nl/schemas/vocab/identifier-type/"> | ||
|
||
<ddm:profile> | ||
<dc:title>A bag containing invalid vocab codes</dc:title> | ||
<dcterms:description> | ||
Some of the codes specified for ABR are invalid | ||
</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:ISNI>0000 0001 2281 955X</dcx-dai:ISNI> | ||
<dcx-dai:ORCID>https://orcid.org/0000-0001-9183-9538</dcx-dai:ORCID> | ||
<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>2024-08-28</ddm:created> | ||
<ddm:available>2024-08-28</ddm:available> | ||
<ddm:audience>D13400</ddm:audience> | ||
<ddm:audience>D16300</ddm:audience> | ||
<ddm:accessRights>OPEN_ACCESS</ddm:accessRights> | ||
<ddm:personalData present="No"/> | ||
</ddm:profile> | ||
<ddm:dcmiMetadata> | ||
<dcterms:rightsHolder>I Lastname</dcterms:rightsHolder> | ||
<dcterms:abstract xml:lang="ka">Georgian</dcterms:abstract> | ||
|
||
|
||
<!-- REL001 see profile --> | ||
|
||
<!-- Legacy support: selection by "hasCode" attribute instead of the term URI --> | ||
<ddm:reportNumber | ||
subjectScheme="ABR Rapporten" | ||
schemeURI="https://data.cultureelerfgoed.nl/term/id/abr/7a99aaba-c1e7-49a4-9dd8-d295dbcc870e" | ||
valueCode="CECI.N.EST.PAS.UN.RAPPORT" | ||
reportNo="123-A"> | ||
Not a report | ||
</ddm:reportNumber> | ||
|
||
<!-- Legacy support: selection by "hasCode" attribute instead of the term URI --> | ||
<ddm:acquisitionMethod | ||
subjectScheme="ABR verwervingswijzen" | ||
schemeURI="https://data.cultureelerfgoed.nl/term/id/abr/554ca1ec-3ed8-42d3-ae4b-47bcb848b238" | ||
valueCode="NOT.A.VALID.AQC.METHOD"> | ||
Not a valid acquisition method | ||
</ddm:acquisitionMethod> | ||
|
||
<!-- Legacy support: selection by "hasCode" attribute instead of the term URI --> | ||
<ddm:subject | ||
subjectScheme="ABR Complextypen" | ||
schemeURI="https://data.cultureelerfgoed.nl/term/id/abr/e9546020-4b28-4819-b0c2-29e7c864c5c0" | ||
valueCode="INVAL.COMPLEX.TYPE"> | ||
Not a valid complex type | ||
</ddm:subject> | ||
|
||
<!-- Legacy support: selection by "hasCode" attribute instead of the term URI --> | ||
<ddm:subject | ||
subjectScheme="ABR Artefacten" | ||
schemeURI="https://data.cultureelerfgoed.nl/term/id/abr/22cbb070-6542-48f0-8afe-7d98d398cc0b" | ||
valueCode="OBJECT.INVALID"> | ||
Not a valid artifact | ||
</ddm:subject> | ||
|
||
<!-- Legacy support: selection by "hasCode" attribute instead of the term URI --> | ||
<ddm:temporal | ||
subjectScheme="ABR Periodes" | ||
schemeURI="https://data.cultureelerfgoed.nl/term/id/abr/9b688754-1315-484b-9c89-8817e87c1e84" | ||
valueCode="MIDDLE.EARTH.3RD.AGE"> | ||
Not a valid period | ||
</ddm:temporal> | ||
|
||
<!-- TS001 --> | ||
<dcterms:temporal>Het Romeinse Rijk</dcterms:temporal> | ||
<dcterms:temporal>De Oudheid</dcterms:temporal> | ||
|
||
<!-- TS002 --> | ||
<dcx-gml:spatial srsName="http://www.opengis.net/def/crs/EPSG/0/28992"> | ||
<Point xmlns="http://www.opengis.net/gml"> | ||
<pos>126466 529006</pos> | ||
</Point> | ||
</dcx-gml:spatial> | ||
|
||
<!-- TS003, defaults to latitude/longitude--> | ||
<dcx-gml:spatial> | ||
<Point xmlns="http://www.opengis.net/gml"> | ||
<pos>52.078663 4.288788</pos> | ||
</Point> | ||
</dcx-gml:spatial> | ||
|
||
<!-- TS004 --> | ||
<dcx-gml:spatial> | ||
<boundedBy xmlns="http://www.opengis.net/gml"> | ||
<Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/28992"> | ||
<lowerCorner>102000 335000</lowerCorner> | ||
<upperCorner>140000 628000</upperCorner> | ||
</Envelope> | ||
</boundedBy> | ||
</dcx-gml:spatial> | ||
|
||
<!-- TS005 --> | ||
<dcx-gml:spatial> | ||
<boundedBy xmlns="http://www.opengis.net/gml"> | ||
<Envelope srsName="http://www.opengis.net/def/crs/EPSG/0/4326"> | ||
<lowerCorner>51.46343658020442 3.5621054065986075</lowerCorner> | ||
<upperCorner>53.23074335194507 6.563118076315912</upperCorner> | ||
</Envelope> | ||
</boundedBy> | ||
</dcx-gml:spatial> | ||
|
||
<!-- Not RD or lat/lon, so should be ignored --> | ||
<dcx-gml:spatial> | ||
<boundedBy xmlns="http://www.opengis.net/gml"> | ||
<Envelope srsName="XXX"> | ||
<lowerCorner>1 2</lowerCorner> | ||
<upperCorner>3 4</upperCorner> | ||
</Envelope> | ||
</boundedBy> | ||
</dcx-gml:spatial> | ||
|
||
<!-- TS006, note that the text must exactly match the vocabulary term, so South-Africa will be handled by TS007 --> | ||
<dcterms:spatial>South Africa</dcterms:spatial> | ||
<dcterms:spatial>Japan</dcterms:spatial> | ||
|
||
<!-- TS007, not in the controlled list, so mapped to the free text field --> | ||
<dcterms:spatial>Roman Empire</dcterms:spatial> | ||
|
||
<!--TRM001 --> | ||
<dcterms:license xsi:type="dcterms:URI">http://opensource.org/licenses/MIT</dcterms:license> | ||
|
||
<!-- TRM002 see example restricted-files-no-access-request --> | ||
|
||
<!-- TRM005 and TRM006 --> | ||
<dcterms:accessRights>Restricted files accessible under the following conditions: ...</dcterms:accessRights> | ||
|
||
<!-- VLT005A --> | ||
<dcterms:identifier xsi:type="id-type:DOI">10.17026/dans-z6y-5y2e</dcterms:identifier> | ||
|
||
</ddm:dcmiMetadata> | ||
</ddm:DDM> |
27 changes: 27 additions & 0 deletions
27
src/main/resources/example-bags/invalid/invalid-codes/metadata/files.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?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/"> | ||
<!-- TRM004 applies because no accessibleToRights NONE is present and ddm:accessRights in dataset.xml is set to OPEN_ACCESS --> | ||
<file filepath="data/file1.txt"> | ||
<!-- FIL004 --> | ||
<dcterms:description>A file with a simple description</dcterms:description> | ||
</file> | ||
<file filepath="data/subdir/file2.txt"> | ||
<!-- TRM006 (see also TRM006 in dataset.xml) --> | ||
<accessibleToRights>RESTRICTED_REQUEST</accessibleToRights> | ||
</file> | ||
<!-- FIL001, FIL002, FIL003 --> | ||
<!-- This is tested in the example 'forbidden-chars-in-filepath', because it requires a file system that supports non-ascii characters in filenames. | ||
<file filepath="data/subdir_υποφάκελο/c:a*q?d"l<g>p|s;h#.txt"> | ||
<dcterms:description>A file with a problematic name</dcterms:description> | ||
</file> | ||
--> | ||
<!-- FIL005, FIL006 see examples 'default-open' and 'default-restricted' --> | ||
|
||
<!-- FIL008 see example 'embargoed' --> | ||
|
||
<!-- | ||
An extra, unrestricted (FIL007), uncompressed zip file called original-metadata.zip with no embargo (FIL009) is created, | ||
containing dataset.xml and files.xml. | ||
--> | ||
</files> | ||
|
5 changes: 5 additions & 0 deletions
5
src/main/resources/example-bags/invalid/invalid-codes/tagmanifest-sha1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
7e9cb7c9bcb9402ca1b68fb9b80114a520427d65 metadata/dataset.xml | ||
33d507e3ced80f1b83f8e73ae780e870e159de9a metadata/files.xml | ||
e2924b081506bac23f5fffe650ad1848a1c8ac1d bagit.txt | ||
fcebcebafb062a34ecee8f475cfa81cb745fbed6 manifest-sha1.txt | ||
f1532a6307e82f76b7911304a6c16a4b15414e4b README.md |
5 changes: 5 additions & 0 deletions
5
src/main/resources/example-bags/invalid/invalid-terms/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
4 changes: 4 additions & 0 deletions
4
src/main/resources/example-bags/invalid/invalid-terms/bag-info.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Payload-Oxum: 240.3 | ||
Bagging-Date: 2022-10-23 | ||
Bag-Size: 3.1 MB | ||
Has-Organizational-Identifier: TESTPREFIX:1234 |
2 changes: 2 additions & 0 deletions
2
src/main/resources/example-bags/invalid/invalid-terms/bagit.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BagIt-Version: 0.97 | ||
Tag-File-Character-Encoding: UTF-8 |
1 change: 1 addition & 0 deletions
1
src/main/resources/example-bags/invalid/invalid-terms/data/file1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test file in root of dataset |
1 change: 1 addition & 0 deletions
1
src/main/resources/example-bags/invalid/invalid-terms/data/subdir/file2.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test file in subdirectory. |
2 changes: 2 additions & 0 deletions
2
src/main/resources/example-bags/invalid/invalid-terms/manifest-sha1.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a5c5c4051724b655863c517a15c56e45753c3e5a data/file1.txt | ||
0d57a5bc9f5af7e8edcc90d64fd3c24dfc23e727 data/subdir/file2.txt |
Oops, something went wrong.