-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add tests for DDI exports for datasets with PermaLinks
- Loading branch information
Showing
5 changed files
with
377 additions
and
0 deletions.
There are no files selected for viewing
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
92 changes: 92 additions & 0 deletions
92
src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-perma-w-separator.json
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,92 @@ | ||
{ | ||
"id": 10, | ||
"identifier": "123456789", | ||
"persistentUrl": "https://example.org/citation?persistentId=PERM2-123456789", | ||
"protocol": "perma", | ||
"authority": "PERM2", | ||
"separator": "-", | ||
"datasetVersion": { | ||
"id": 1, | ||
"versionNumber": 1, | ||
"versionMinorNumber": 0, | ||
"versionState": "RELEASED", | ||
"productionDate": "Production Date", | ||
"lastUpdateTime": "2015-09-29T17:47:35Z", | ||
"releaseTime": "2015-09-29T17:47:35Z", | ||
"createTime": "2015-09-24T16:47:50Z", | ||
"metadataBlocks": { | ||
"citation": { | ||
"displayName": "Citation Metadata", | ||
"fields": [ | ||
{ | ||
"typeName": "title", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce Goose" | ||
}, | ||
{ | ||
"typeName": "author", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"authorName": { | ||
"typeName": "authorName", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce, Sabrina" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "datasetContact", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"datasetContactEmail": { | ||
"typeName": "datasetContactEmail", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "[email protected]" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "dsDescription", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"dsDescriptionValue": { | ||
"typeName": "dsDescriptionValue", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "What the Spruce Goose was really made of." | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "subject", | ||
"multiple": true, | ||
"typeClass": "controlledVocabulary", | ||
"value": [ | ||
"Other" | ||
] | ||
}, | ||
{ | ||
"typeName": "depositor", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce, Sabrina" | ||
} | ||
] | ||
} | ||
}, | ||
"files": [], | ||
"citation": "Spruce, Sabrina, 2015, \"Spruce Goose\", https://example.org/citation?persistentId=PERM2-123456789, Root Dataverse, V1" | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-perma-w-separator.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,50 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<codeBook xmlns="ddi:codebook:2_5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ddi:codebook:2_5 http://www.ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/codebook.xsd" version="2.5"> | ||
<docDscr> | ||
<citation> | ||
<titlStmt> | ||
<titl>Spruce Goose</titl> | ||
<IDNo agency="perma">perma:PERM2-123456789</IDNo> | ||
</titlStmt> | ||
<distStmt/> | ||
<verStmt source="archive"> | ||
<version date="2015-09-29" type="RELEASED">1</version> | ||
</verStmt> | ||
<biblCit>Spruce, Sabrina, 2015, "Spruce Goose", https://example.org/citation?persistentId=PERM2-123456789, Root Dataverse, V1</biblCit> | ||
</citation> | ||
</docDscr> | ||
<stdyDscr> | ||
<citation> | ||
<titlStmt> | ||
<titl>Spruce Goose</titl> | ||
<IDNo agency="perma">perma:PERM2-123456789</IDNo> | ||
</titlStmt> | ||
<rspStmt> | ||
<AuthEnty>Spruce, Sabrina</AuthEnty> | ||
</rspStmt> | ||
<prodStmt/> | ||
<distStmt> | ||
<depositr>Spruce, Sabrina</depositr> | ||
</distStmt> | ||
<holdings URI="https://example.org/citation?persistentId=perma:PERM2-123456789"/> | ||
</citation> | ||
<stdyInfo> | ||
<subject> | ||
<keyword xml:lang="en">Other</keyword> | ||
</subject> | ||
<abstract>What the Spruce Goose was really made of.</abstract> | ||
<sumDscr/> | ||
</stdyInfo> | ||
<method> | ||
<dataColl> | ||
<sources/> | ||
</dataColl> | ||
<anlyInfo/> | ||
</method> | ||
<dataAccs> | ||
<setAvail/> | ||
<useStmt/> | ||
</dataAccs> | ||
<othrStdyMat/> | ||
</stdyDscr> | ||
</codeBook> |
92 changes: 92 additions & 0 deletions
92
src/test/java/edu/harvard/iq/dataverse/export/ddi/dataset-perma.json
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,92 @@ | ||
{ | ||
"id": 10, | ||
"identifier": "123456789", | ||
"persistentUrl": "https://example.org/citation?persistentId=PERM123456789", | ||
"protocol": "perma", | ||
"authority": "PERM", | ||
"separator": "", | ||
"datasetVersion": { | ||
"id": 1, | ||
"versionNumber": 1, | ||
"versionMinorNumber": 0, | ||
"versionState": "RELEASED", | ||
"productionDate": "Production Date", | ||
"lastUpdateTime": "2015-09-29T17:47:35Z", | ||
"releaseTime": "2015-09-29T17:47:35Z", | ||
"createTime": "2015-09-24T16:47:50Z", | ||
"metadataBlocks": { | ||
"citation": { | ||
"displayName": "Citation Metadata", | ||
"fields": [ | ||
{ | ||
"typeName": "title", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce Goose" | ||
}, | ||
{ | ||
"typeName": "author", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"authorName": { | ||
"typeName": "authorName", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce, Sabrina" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "datasetContact", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"datasetContactEmail": { | ||
"typeName": "datasetContactEmail", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "[email protected]" | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "dsDescription", | ||
"multiple": true, | ||
"typeClass": "compound", | ||
"value": [ | ||
{ | ||
"dsDescriptionValue": { | ||
"typeName": "dsDescriptionValue", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "What the Spruce Goose was really made of." | ||
} | ||
} | ||
] | ||
}, | ||
{ | ||
"typeName": "subject", | ||
"multiple": true, | ||
"typeClass": "controlledVocabulary", | ||
"value": [ | ||
"Other" | ||
] | ||
}, | ||
{ | ||
"typeName": "depositor", | ||
"multiple": false, | ||
"typeClass": "primitive", | ||
"value": "Spruce, Sabrina" | ||
} | ||
] | ||
} | ||
}, | ||
"files": [], | ||
"citation": "Spruce, Sabrina, 2015, \"Spruce Goose\", https://example.org/citation?persistentId=PERM123456789, Root Dataverse, V1" | ||
} | ||
} |
Oops, something went wrong.