www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 107b3064b3a348928708a8caf833b3b8ba43ebdc
parent 4233d2ebbdaa1832a67fd911c6aa351f011dc367
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 30 Jun 2015 00:54:29 -0400

Merge pull request #757 from aurimasv/citeproc-institutional_authors

Fix institutional author export to CiteProc
Diffstat:
Mchrome/content/zotero/xpcom/utilities.js | 7++++++-
Mtest/content/support.js | 17++++++++++++++++-
Mtest/tests/data/allTypesAndFields.js | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/data/citeProcJSExport.js | 102+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/data/itemJSON.js | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/data/translatorExport.js | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/data/translatorExportLegacy.js | 170+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 736 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -1553,7 +1553,12 @@ Zotero.Utilities = { creatorType = CSL_NAMES_MAPPINGS[creatorType]; if(!creatorType) continue; - var nameObj = {'family':creator.lastName, 'given':creator.firstName}; + var nameObj; + if (creator.lastName || creator.firstName) { + nameObj = {'family': creator.lastName, 'given': creator.firstName}; + } else if (creator.name) { + nameObj = {'literal': creator.name}; + } if(cslItem[creatorType]) { cslItem[creatorType].push(nameObj); diff --git a/test/content/support.js b/test/content/support.js @@ -293,6 +293,16 @@ function generateAllTypesAndFieldsData() { lastName: typeName + 'Last' }); } + + // Also add a single-field mode author, which is valid for all types + let primaryCreatorType = Zotero.CreatorTypes.getName( + Zotero.CreatorTypes.getPrimaryIDForType(itemTypes[i].id) + ); + creators.push({ + creatorType: primaryCreatorType, + lastName: 'Institutional Author', + fieldMode: 1 + }); } return data; @@ -315,8 +325,13 @@ function populateDBWithSampleData(data) { let creators = item[itemField]; for (let i=0; i<creators.length; i++) { let creator = new Zotero.Creator(); - creator.firstName = creators[i].firstName; creator.lastName = creators[i].lastName; + if (creators[i].fieldMode) { + creator.fieldMode = creators[i].fieldMode; + } else { + creator.firstName = creators[i].firstName; + } + creator = Zotero.Creators.get(creator.save()); zItem.setCreator(i, creator, creators[i].creatorType); diff --git a/test/tests/data/allTypesAndFields.js b/test/tests/data/allTypesAndFields.js @@ -16,6 +16,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "artist", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -56,6 +61,11 @@ "creatorType": "wordsBy", "firstName": "wordsByFirst", "lastName": "wordsByLast" + }, + { + "creatorType": "performer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -94,6 +104,11 @@ "creatorType": "cosponsor", "firstName": "cosponsorFirst", "lastName": "cosponsorLast" + }, + { + "creatorType": "sponsor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -130,6 +145,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -175,6 +195,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -232,6 +257,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -272,6 +302,11 @@ "creatorType": "counsel", "firstName": "counselFirst", "lastName": "counselLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -305,6 +340,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "programmer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -356,6 +396,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -406,6 +451,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -458,6 +508,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -489,6 +544,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -532,6 +592,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -579,6 +644,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -608,6 +678,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -630,6 +705,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "contributor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -667,6 +747,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -704,6 +789,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "interviewee", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -750,6 +840,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -791,6 +886,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -831,6 +931,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -868,6 +973,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -905,6 +1015,11 @@ "creatorType": "seriesEditor", "firstName": "seriesEditorFirst", "lastName": "seriesEditorLast" + }, + { + "creatorType": "cartographer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -950,6 +1065,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -988,6 +1108,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "inventor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1025,6 +1150,11 @@ "creatorType": "guest", "firstName": "guestFirst", "lastName": "guestLast" + }, + { + "creatorType": "podcaster", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "extra": "Extra", @@ -1052,6 +1182,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "presenter", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1102,6 +1237,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1146,6 +1286,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1179,6 +1324,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1211,6 +1361,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1263,6 +1418,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1313,6 +1473,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1350,6 +1515,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", diff --git a/test/tests/data/citeProcJSExport.js b/test/tests/data/citeProcJSExport.js @@ -17,6 +17,9 @@ { "family": "artistLast", "given": "artistFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -58,6 +61,9 @@ { "family": "performerLast", "given": "performerFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -108,6 +114,9 @@ { "family": "sponsorLast", "given": "sponsorFirst" + }, + { + "literal": "Institutional Author" } ], "authority": "Legislative body", @@ -150,6 +159,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "container-title": "Publication title", @@ -189,6 +201,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -255,6 +270,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -325,6 +343,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "authority": "Court", @@ -368,6 +389,9 @@ { "family": "programmerLast", "given": "programmerFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -414,6 +438,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -479,6 +506,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -545,6 +575,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -600,6 +633,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "id": 48, @@ -643,6 +679,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -709,6 +748,9 @@ { "family": "directorLast", "given": "directorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -749,6 +791,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "container-title": "Publication title", @@ -785,6 +830,9 @@ { "family": "contributorLast", "given": "contributorFirst" + }, + { + "literal": "Institutional Author" } ], "authority": "Legislative body", @@ -829,6 +877,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "id": 53, @@ -871,6 +922,9 @@ { "family": "intervieweeLast", "given": "intervieweeFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -924,6 +978,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -986,6 +1043,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1032,6 +1092,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1086,6 +1149,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1135,6 +1201,9 @@ { "family": "cartographerLast", "given": "cartographerFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1187,6 +1256,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1241,6 +1313,9 @@ { "family": "inventorLast", "given": "inventorFirst" + }, + { + "literal": "Institutional Author" } ], "authority": "Issuing authority", @@ -1294,6 +1369,9 @@ { "family": "podcasterLast", "given": "podcasterFirst" + }, + { + "literal": "Institutional Author" } ], "collection-title": "Series title", @@ -1323,6 +1401,9 @@ { "family": "presenterLast", "given": "presenterFirst" + }, + { + "literal": "Institutional Author" } ], "event": "Meeting name", @@ -1363,6 +1444,9 @@ { "family": "directorLast", "given": "directorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1408,6 +1492,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1463,6 +1550,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "chapter-number": "Session", @@ -1506,6 +1596,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1549,6 +1642,9 @@ { "family": "directorLast", "given": "directorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1595,6 +1691,9 @@ { "family": "directorLast", "given": "directorFirst" + }, + { + "literal": "Institutional Author" } ], "call-number": "Call number", @@ -1639,6 +1738,9 @@ { "family": "authorLast", "given": "authorFirst" + }, + { + "literal": "Institutional Author" } ], "container-title": "Publication title", diff --git a/test/tests/data/itemJSON.js b/test/tests/data/itemJSON.js @@ -18,6 +18,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "artist", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -65,6 +69,10 @@ "creatorType": "wordsBy", "firstName": "wordsByFirst", "lastName": "wordsByLast" + }, + { + "creatorType": "performer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -112,6 +120,10 @@ "creatorType": "cosponsor", "firstName": "cosponsorFirst", "lastName": "cosponsorLast" + }, + { + "creatorType": "sponsor", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -153,6 +165,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -204,6 +220,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -269,6 +289,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -316,6 +340,10 @@ "creatorType": "counsel", "firstName": "counselFirst", "lastName": "counselLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T09:00:22Z", @@ -356,6 +384,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "programmer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -413,6 +445,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -470,6 +506,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -529,6 +569,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -567,6 +611,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -617,6 +665,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -671,6 +723,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -707,6 +763,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -736,6 +796,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "contributor", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -780,6 +844,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -824,6 +892,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "interviewee", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -877,6 +949,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -925,6 +1001,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -972,6 +1052,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1016,6 +1100,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1060,6 +1148,10 @@ "creatorType": "seriesEditor", "firstName": "seriesEditorFirst", "lastName": "seriesEditorLast" + }, + { + "creatorType": "cartographer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1112,6 +1204,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1157,6 +1253,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "inventor", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T09:00:22Z", @@ -1202,6 +1302,10 @@ "creatorType": "guest", "firstName": "guestFirst", "lastName": "guestLast" + }, + { + "creatorType": "podcaster", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T09:00:22Z", @@ -1235,6 +1339,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "presenter", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1293,6 +1401,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1343,6 +1455,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1383,6 +1499,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T09:00:22Z", @@ -1422,6 +1542,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1481,6 +1605,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1538,6 +1666,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1582,6 +1714,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", diff --git a/test/tests/data/translatorExport.js b/test/tests/data/translatorExport.js @@ -19,6 +19,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "artist", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -68,6 +72,10 @@ "creatorType": "wordsBy", "firstName": "wordsByFirst", "lastName": "wordsByLast" + }, + { + "creatorType": "performer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -117,6 +125,10 @@ "creatorType": "cosponsor", "firstName": "cosponsorFirst", "lastName": "cosponsorLast" + }, + { + "creatorType": "sponsor", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -160,6 +172,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -213,6 +229,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -280,6 +300,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -329,6 +353,10 @@ "creatorType": "counsel", "firstName": "counselFirst", "lastName": "counselLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T05:45:15Z", @@ -371,6 +399,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "programmer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -430,6 +462,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -489,6 +525,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -550,6 +590,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -590,6 +634,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -642,6 +690,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -698,6 +750,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -736,6 +792,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -767,6 +827,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "contributor", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -813,6 +877,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -859,6 +927,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "interviewee", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -914,6 +986,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -964,6 +1040,10 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1013,6 +1093,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1059,6 +1143,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1105,6 +1193,10 @@ "creatorType": "seriesEditor", "firstName": "seriesEditorFirst", "lastName": "seriesEditorLast" + }, + { + "creatorType": "cartographer", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1159,6 +1251,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1206,6 +1302,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "inventor", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T05:45:15Z", @@ -1253,6 +1353,10 @@ "creatorType": "guest", "firstName": "guestFirst", "lastName": "guestLast" + }, + { + "creatorType": "podcaster", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T05:45:15Z", @@ -1288,6 +1392,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "presenter", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1348,6 +1456,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1400,6 +1512,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1442,6 +1558,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "dateAdded": "2015-04-12T05:45:15Z", @@ -1483,6 +1603,10 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1544,6 +1668,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1603,6 +1731,10 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "name": "Institutional Author" } ], "date": "1999-12-31", @@ -1649,6 +1781,10 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "name": "Institutional Author" } ], "date": "1999-12-31", diff --git a/test/tests/data/translatorExportLegacy.js b/test/tests/data/translatorExportLegacy.js @@ -19,6 +19,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "artist", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -89,6 +94,11 @@ "creatorType": "wordsBy", "firstName": "wordsByFirst", "lastName": "wordsByLast" + }, + { + "creatorType": "performer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -166,6 +176,11 @@ "creatorType": "cosponsor", "firstName": "cosponsorFirst", "lastName": "cosponsorLast" + }, + { + "creatorType": "sponsor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -234,6 +249,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -305,6 +325,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -399,6 +424,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -477,6 +507,11 @@ "creatorType": "counsel", "firstName": "counselFirst", "lastName": "counselLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -544,6 +579,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "programmer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -628,6 +668,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -715,6 +760,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -805,6 +855,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -864,6 +919,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -931,6 +991,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1016,6 +1081,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1079,6 +1149,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1128,6 +1203,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "contributor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1198,6 +1278,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1258,6 +1343,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "interviewee", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1333,6 +1423,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1411,6 +1506,11 @@ "creatorType": "recipient", "firstName": "recipientFirst", "lastName": "recipientLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1480,6 +1580,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1549,6 +1654,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1617,6 +1727,11 @@ "creatorType": "seriesEditor", "firstName": "seriesEditorFirst", "lastName": "seriesEditorLast" + }, + { + "creatorType": "cartographer", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1697,6 +1812,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1768,6 +1888,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "inventor", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1842,6 +1967,11 @@ "creatorType": "guest", "firstName": "guestFirst", "lastName": "guestLast" + }, + { + "creatorType": "podcaster", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "dateAdded": "2015-04-26 06:40:48", @@ -1896,6 +2026,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "presenter", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -1974,6 +2109,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2054,6 +2194,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2123,6 +2268,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2188,6 +2338,11 @@ "creatorType": "contributor", "firstName": "contributorFirst", "lastName": "contributorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2273,6 +2428,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2360,6 +2520,11 @@ "creatorType": "scriptwriter", "firstName": "scriptwriterFirst", "lastName": "scriptwriterLast" + }, + { + "creatorType": "director", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31", @@ -2434,6 +2599,11 @@ "creatorType": "translator", "firstName": "translatorFirst", "lastName": "translatorLast" + }, + { + "creatorType": "author", + "fieldMode": 1, + "lastName": "Institutional Author" } ], "date": "1999-12-31",