www

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

commit 4b995dd467b8e51e4e05c8673a7205cbff22be30
parent 28301ea45fe8709b2553a4792232ae45a6f25f55
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue, 26 May 2015 17:21:30 -0400

Merge pull request #659 from aurimasv/csl-json-export

Another regression from f0bd1e77ffab6dbc7fbd600dc1acc11844aa2e02
Diffstat:
Mchrome/content/zotero/xpcom/cite.js | 3+++
Mchrome/content/zotero/xpcom/data/item.js | 192++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mchrome/content/zotero/xpcom/data/itemFields.js | 3++-
Mchrome/content/zotero/xpcom/date.js | 23+++++++++++++++++++++++
Mchrome/content/zotero/xpcom/translation/translate.js | 4++++
Mchrome/content/zotero/xpcom/translation/translate_item.js | 47++++++-----------------------------------------
Mchrome/content/zotero/xpcom/utilities.js | 84++++++++++++++++++++++++++++---------------------------------------------------
Mchrome/content/zotero/xpcom/utilities_internal.js | 134++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mtest/components/zotero-unit.js | 3+++
Mtest/content/runtests.js | 81+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
Mtest/content/support.js | 327++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Mtest/runtests.sh | 39++++++++++++++++++++++++---------------
Atest/tests/data/allTypesAndFields.js | 1367+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atest/tests/data/citeProcJSExport.js | 1669+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atest/tests/data/empty.pdf | 0
Atest/tests/data/itemJSON.js | 1605+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atest/tests/data/journalArticle.js | 56++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atest/tests/data/translatorExport.js | 1673+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Atest/tests/data/translatorExportLegacy.js | 2476+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/support.js | 183++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Atest/tests/translateTest.js | 578+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mtest/tests/utilities.js | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22 files changed, 10524 insertions(+), 124 deletions(-)

diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js @@ -524,6 +524,9 @@ Zotero.Cite.System.prototype = { var cslItem = Zotero.Utilities.itemToCSLJSON(zoteroItem); + // TEMP: citeproc-js currently expects the id property to be the item DB id + cslItem.id = zoteroItem.id; + if (!Zotero.Prefs.get("export.citePaperJournalArticleURL")) { var itemType = Zotero.ItemTypes.getName(zoteroItem.itemTypeID); // don't return URL or accessed information for journal articles if a diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -4918,6 +4918,196 @@ Zotero.Item.prototype.serialize = function(mode) { return arr; } +/** + * Serializes Zotero Item into Zotero web server API JSON format + * + * @param {Object} options + * mode {String}: [new|full|patch] "new" is default. "full" mode includes all + * fields even if empty. "patch" returns only fields that are different from + * those in patchBase + * patchBase {Object}: Item in API JSON format to be compared to in + * "patch" mode. Required if "patch" mode is specified + */ +Zotero.Item.prototype.toJSON = function(options) { + if (this.id || this.key) { + if (!this._primaryDataLoaded) { + this.loadPrimaryData(true); + } + + if (this.id) { + if (!this._itemDataLoaded) this._loadItemData(); + if (this.isRegularItem() && !this._creatorsLoaded) this._loadCreators(); + if (!this._relatedItemsLoaded) this._loadRelatedItems(); + } + } + + if (this.hasChanged()) { + throw new Error("Cannot generate JSON from changed item"); + } + + options = options || {}; + let mode = options.mode || 'new'; + let patchBase = options.patchBase; + + if (mode == 'patch') { + if (!patchBase) { + throw new Error('Cannot use "patch" mode if patchBase not provided'); + } + } + else if (patchBase) { + Zotero.debug('Zotero.Item.toJSON: ignoring provided patchBase in "' + mode + '" mode', 2); + } + + let obj = { + key: this.key || false, + version: 1, + itemType: Zotero.ItemTypes.getName(this.itemTypeID), + tags: [], + collections: [], + relations: {} + }; + + // Type-specific fields + for (let i in this._itemData) { + let val = '' + this.getField(i); + if (val !== '' || mode == 'full') { + let name = Zotero.ItemFields.getName(i); + if (name == 'version') { + // Changed in API v3 to avoid clash with 'version' above + // Remove this after https://github.com/zotero/zotero/issues/670 + name = 'versionNumber'; + } + + if (name == 'accessDate') { + val = Zotero.Date.dateToISO(Zotero.Date.sqlToDate(val)); + } + + obj[name] = val; + } + } + + if (this.isRegularItem()) { + // Creators + obj.creators = []; + let creators = this.getCreators(); + for (let i=0; i<creators.length; i++) { + let creator = creators[i].ref; + let creatorObj = { + creatorType: Zotero.CreatorTypes.getName(creators[i].creatorTypeID) + }; + + if (creator.fieldMode == 1) { + creatorObj.name = creator.lastName; + } else { + creatorObj.lastName = creator.lastName; + creatorObj.firstName = creator.firstName; + } + + obj.creators.push(creatorObj); + } + } + else { + // Notes or Attachments + let parent = this.getSourceKey(); + if (parent || mode == 'full') { + obj.parentItem = parent ? parent : false; + } + + // Notes and embedded attachment notes + let note = this.getNote(); + if (note !== "" || mode == 'full') { + obj.note = note; + } + } + + // Attachment fields + if (this.isAttachment()) { + obj.linkMode = ['imported_file','imported_url','linked_file','linked_url'][this.attachmentLinkMode]; + obj.contentType = this.attachmentMIMEType; + obj.charset = this.attachmentCharset; + obj.path = this.attachmentPath; + } + + // Tags + let tags = this.getTags(); + for (let i=0; i<tags.length; i++) { + let tag = { + tag: tags[i].name + }; + if (tags[i].type) tag.type = tags[i].type + + obj.tags.push(tag); + } + + // Collections + if (this.id) { + let collections = this.getCollections(); + for (let i=0; i<collections.length; i++) { + let collection = Zotero.Collections.get(collections[i]); + obj.collections.push(collection.key); + } + } + + // Relations + if (this.key) { + // Relations other than through the "Related" tab + let itemURI = Zotero.URI.getItemURI(this), + rels = Zotero.Relations.getByURIs(itemURI); + for (let i=0; i<rels.length; i++) { + let rel = rels[i].load(); + obj.relations[rel.predicate] = rel.object; + } + + // Related items (in both directions) + let relatedItems = this._getRelatedItemsBidirectional(); + let pred = 'dc:relation'; + for (let i=0; i<relatedItems.length; i++) { + let item = Zotero.Items.get(relatedItems[i]); + let uri = Zotero.URI.getItemURI(item); + if (obj.relations[pred]) { + if (typeof obj.relations[pred] == 'string') { + obj.relations[pred] = [obj.relations[pred]]; + } + obj.relations[pred].push(uri) + } + else { + obj.relations[pred] = uri; + } + } + } + + // Deleted + let deleted = this.deleted; + if (deleted || mode == 'full') { + obj.deleted = deleted; + } + + obj.dateAdded = Zotero.Date.sqlToISO8601(this.dateAdded); + obj.dateModified = Zotero.Date.sqlToISO8601(this.dateModified); + + if (mode == 'patch') { + // For "patch" mode, remove fields that have the same values + for (let i in patchBase) { + switch (i) { + case 'itemKey': + case 'itemVersion': + case 'dateModified': + continue; + } + + if (i in obj) { + if (obj[i] === patchBase[i]) { + delete obj[i]; + } + } + else { + obj[i] = ""; + } + } + } + + return obj; +}; ////////////////////////////////////////////////////////////////////////////// @@ -5098,7 +5288,7 @@ Zotero.Item.prototype._getRelatedItemsBidirectional = function () { } } } - else if (!related) { + else if (!related.length) { return []; } return related; diff --git a/chrome/content/zotero/xpcom/data/itemFields.js b/chrome/content/zotero/xpcom/data/itemFields.js @@ -130,7 +130,8 @@ Zotero.ItemFields = new function() { function isValidForType(fieldID, itemTypeID) { - _fieldCheck(fieldID, 'isValidForType'); + fieldID = getID(fieldID); + if (!fieldID) return false; if (!_fields[fieldID]['itemTypes']) { return false; diff --git a/chrome/content/zotero/xpcom/date.js b/chrome/content/zotero/xpcom/date.js @@ -544,6 +544,29 @@ Zotero.Date = new function(){ return false; } + + this.sqlToISO8601 = function (sqlDate) { + var date = sqlDate.substr(0, 10); + var matches = date.match(/^([0-9]{4})\-([0-9]{2})\-([0-9]{2})/); + if (!matches) { + return false; + } + date = matches[1]; + // Drop parts for reduced precision + if (matches[2] !== "00") { + date += "-" + matches[2]; + if (matches[3] !== "00") { + date += "-" + matches[3]; + } + } + var time = sqlDate.substr(11); + // TODO: validate times + if (time) { + date += "T" + time + "Z"; + } + return date; + } + function strToMultipart(str){ if (!str){ return ''; diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -2186,6 +2186,10 @@ Zotero.Translate.Export.prototype._prepareTranslation = function() { // initialize ItemGetter this._itemGetter = new Zotero.Translate.ItemGetter(); + + // Toggle legacy mode for translators pre-4.0.27 + this._itemGetter.legacy = Services.vc.compare('4.0.27', this._translatorInfo.minVersion) > 0; + var configOptions = this._translatorInfo.configOptions || {}, getCollections = configOptions.getCollections || false; switch (this._export.type) { diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -745,9 +745,10 @@ Zotero.Translate.ItemSaver.prototype = { } Zotero.Translate.ItemGetter = function() { - this._itemsLeft = null; + this._itemsLeft = []; this._collectionsLeft = null; this._exportFileDirectory = null; + this.legacy = false; }; Zotero.Translate.ItemGetter.prototype = { @@ -828,13 +829,8 @@ Zotero.Translate.ItemGetter.prototype = { * Converts an attachment to array format and copies it to the export folder if desired */ "_attachmentToArray":function(attachment) { - var attachmentArray = this._itemToArray(attachment); + var attachmentArray = Zotero.Utilities.Internal.itemToExportFormat(attachment, this.legacy); var linkMode = attachment.attachmentLinkMode; - - // Get mime type - attachmentArray.mimeType = attachmentArray.uniqueFields.mimeType = attachment.attachmentMIMEType; - // Get charset - attachmentArray.charset = attachmentArray.uniqueFields.charset = attachment.attachmentCharset; if(linkMode != Zotero.Attachments.LINK_MODE_LINKED_URL) { var attachFile = attachment.getFile(); attachmentArray.localPath = attachFile.path; @@ -845,7 +841,7 @@ Zotero.Translate.ItemGetter.prototype = { // Add path and filename if not an internet link var attachFile = attachment.getFile(); if(attachFile) { - attachmentArray.defaultPath = "files/" + attachmentArray.itemID + "/" + attachFile.leafName; + attachmentArray.defaultPath = "files/" + attachment.id + "/" + attachFile.leafName; attachmentArray.filename = attachFile.leafName; /** @@ -959,39 +955,8 @@ Zotero.Translate.ItemGetter.prototype = { } } - attachmentArray.itemType = "attachment"; - return attachmentArray; }, - - /** - * Converts an item to array format - */ - "_itemToArray":function(returnItem) { - // TODO use Zotero.Item#serialize() - var returnItemArray = returnItem.toArray(); - - // Remove SQL date from multipart dates - if (returnItemArray.date) { - returnItemArray.date = Zotero.Date.multipartToStr(returnItemArray.date); - } - - var returnItemArray = Zotero.Utilities.itemToExportFormat(returnItemArray); - - // TODO: Change tag.tag references in translators to tag.name - // once translators are 1.5-only - // TODO: Preserve tag type? - if (returnItemArray.tags) { - for (var i in returnItemArray.tags) { - returnItemArray.tags[i].tag = returnItemArray.tags[i].fields.name; - } - } - - // add URI - returnItemArray.uri = Zotero.URI.getItemURI(returnItem); - - return returnItemArray; - }, /** * Retrieves the next available item @@ -1004,10 +969,10 @@ Zotero.Translate.ItemGetter.prototype = { var returnItemArray = this._attachmentToArray(returnItem); if(returnItemArray) return returnItemArray; } else { - var returnItemArray = this._itemToArray(returnItem); + var returnItemArray = Zotero.Utilities.Internal.itemToExportFormat(returnItem, this.legacy); // get attachments, although only urls will be passed if exportFileData is off - returnItemArray.attachments = new Array(); + returnItemArray.attachments = []; var attachments = returnItem.getAttachments(); for each(var attachmentID in attachments) { var attachment = Zotero.Items.get(attachmentID); diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js @@ -61,7 +61,7 @@ const CSL_TEXT_MAPPINGS = { "number-of-volumes":["numberOfVolumes"], "number-of-pages":["numPages"], "edition":["edition"], - "version":["version"], + "version":["versionNumber"], "section":["section", "committee"], "genre":["type", "programmingLanguage"], "source":["libraryCatalog"], @@ -133,7 +133,10 @@ const CSL_TYPE_MAPPINGS = { 'tvBroadcast':"broadcast", 'radioBroadcast':"broadcast", 'podcast':"song", // ?? - 'computerProgram':"book" // ?? + 'computerProgram':"book", // ?? + 'document':"article", + 'note':"article", + 'attachment':"article" }; /** @@ -1346,49 +1349,6 @@ Zotero.Utilities = { }, /** - * Adds all fields to an item in toArray() format and adds a unique (base) fields to - * uniqueFields array - */ - "itemToExportFormat":function(item) { - const CREATE_ARRAYS = ['creators', 'notes', 'tags', 'seeAlso', 'attachments']; - for(var i=0; i<CREATE_ARRAYS.length; i++) { - var createArray = CREATE_ARRAYS[i]; - if(!item[createArray]) item[createArray] = []; - } - - item.uniqueFields = {}; - - // get base fields, not just the type-specific ones - var itemTypeID = (item.itemTypeID ? item.itemTypeID : Zotero.ItemTypes.getID(item.itemType)); - var allFields = Zotero.ItemFields.getItemTypeFields(itemTypeID); - for(var i in allFields) { - var field = allFields[i]; - var fieldName = Zotero.ItemFields.getName(field); - - if(item[fieldName] !== undefined) { - var baseField = Zotero.ItemFields.getBaseIDFromTypeAndField(itemTypeID, field); - - var baseName = null; - if(baseField && baseField != field) { - baseName = Zotero.ItemFields.getName(baseField); - } - - if(baseName) { - item[baseName] = item[fieldName]; - item.uniqueFields[baseName] = item[fieldName]; - } else { - item.uniqueFields[fieldName] = item[fieldName]; - } - } - } - - // preserve notes - if(item.note) item.uniqueFields.note = item.note; - - return item; - }, - - /** * Converts an item from toArray() format to an array of items in * the content=json format used by the server */ @@ -1527,14 +1487,16 @@ Zotero.Utilities = { */ "itemToCSLJSON":function(zoteroItem) { if (zoteroItem instanceof Zotero.Item) { - zoteroItem = zoteroItem.toArray(); + zoteroItem = Zotero.Utilities.Internal.itemToExportFormat(zoteroItem); } - var cslType = CSL_TYPE_MAPPINGS[zoteroItem.itemType] || "article"; + var cslType = CSL_TYPE_MAPPINGS[zoteroItem.itemType]; + if (!cslType) throw new Error('Unexpected Zotero Item type "' + zoteroItem.itemType + '"'); + var itemTypeID = Zotero.ItemTypes.getID(zoteroItem.itemType); var cslItem = { - 'id':zoteroItem.itemID, + 'id':zoteroItem.uri, 'type':cslType }; @@ -1548,11 +1510,13 @@ Zotero.Utilities = { if(field in zoteroItem) { value = zoteroItem[field]; } else { + if (field == 'versionNumber') field = 'version'; // Until https://github.com/zotero/zotero/issues/670 var fieldID = Zotero.ItemFields.getID(field), - baseMapping; - if(Zotero.ItemFields.isValidForType(fieldID, itemTypeID) - && (baseMapping = Zotero.ItemFields.getBaseIDFromTypeAndField(itemTypeID, fieldID))) { - value = zoteroItem[Zotero.ItemTypes.getName(baseMapping)]; + typeFieldID; + if(fieldID + && (typeFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, fieldID)) + ) { + value = zoteroItem[Zotero.ItemFields.getName(typeFieldID)]; } } @@ -1578,7 +1542,7 @@ Zotero.Utilities = { // separate name variables var author = Zotero.CreatorTypes.getName(Zotero.CreatorTypes.getPrimaryIDForType(itemTypeID)); var creators = zoteroItem.creators; - for(var i=0; i<creators.length; i++) { + for(var i=0; creators && i<creators.length; i++) { var creator = creators[i]; var creatorType = creator.creatorType; if(creatorType == author) { @@ -1600,6 +1564,13 @@ Zotero.Utilities = { // get date variables for(var variable in CSL_DATE_MAPPINGS) { var date = zoteroItem[CSL_DATE_MAPPINGS[variable]]; + if (!date) { + var typeSpecificFieldID = Zotero.ItemFields.getFieldIDFromTypeAndBase(itemTypeID, CSL_DATE_MAPPINGS[variable]); + if (typeSpecificFieldID) { + date = zoteroItem[Zotero.ItemFields.getName(typeSpecificFieldID)]; + } + } + if(date) { var dateObj = Zotero.Date.strToDate(date); // otherwise, use date-parts @@ -1625,7 +1596,12 @@ Zotero.Utilities = { } } } - + + // Special mapping for note title + if (zoteroItem.itemType == 'note' && zoteroItem.note) { + cslItem.title = Zotero.Notes.noteToTitle(zoteroItem.note); + } + // extract PMID var extra = zoteroItem.extra; if(typeof extra === "string") { diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js @@ -220,7 +220,6 @@ Zotero.Utilities.Internal = { return s; }, - /** * Display a prompt from an error with custom buttons and a callback */ @@ -371,6 +370,139 @@ Zotero.Utilities.Internal = { }, /** + * Converts Zotero.Item to a format expected by translators + * This is mostly the Zotero web API item JSON format, but with an attachments + * and notes arrays and optional compatibility mappings for older translators. + * + * @param {Zotero.Item} zoteroItem + * @param {Boolean} legacy Add mappings for legacy (pre-4.0.27) translators + * @return {Object} + */ + "itemToExportFormat": new function() { + return function(zoteroItem, legacy) { + var item = zoteroItem.toJSON(); + item.uri = Zotero.URI.getItemURI(zoteroItem); + delete item.key; + + if (!zoteroItem.isAttachment() && !zoteroItem.isNote()) { + // Include attachments + item.attachments = []; + let attachments = zoteroItem.getAttachments(); + for (let i=0; i<attachments.length; i++) { + let zoteroAttachment = Zotero.Items.get(attachments[i]), + attachment = zoteroAttachment.toJSON(); + if (legacy) addCompatibilityMappings(attachment, zoteroAttachment); + + item.attachments.push(attachment); + } + + // Include notes + item.notes = []; + let notes = zoteroItem.getNotes(); + for (let i=0; i<notes.length; i++) { + let zoteroNote = Zotero.Items.get(notes[i]), + note = zoteroNote.toJSON(); + if (legacy) addCompatibilityMappings(note, zoteroNote); + + item.notes.push(note); + } + } + + if (legacy) addCompatibilityMappings(item, zoteroItem); + + return item; + } + + function addCompatibilityMappings(item, zoteroItem) { + item.uniqueFields = {}; + + // Meaningless local item ID, but some older export translators depend on it + item.itemID = zoteroItem.id; + item.key = zoteroItem.key; // CSV translator exports this + + // "version" is expected to be a field for "computerProgram", which is now + // called "versionNumber" + delete item.version; + if (item.versionNumber) { + item.version = item.uniqueFields.version = item.versionNumber; + delete item.versionNumber; + } + + // SQL instead of ISO-8601 + item.dateAdded = zoteroItem.dateAdded; + item.dateModified = zoteroItem.dateModified; + if (item.accessDate) { + item.accessDate = zoteroItem.getField('accessDate'); + } + + // Map base fields + for (let field in item) { + let id = Zotero.ItemFields.getID(field); + if (!id || !Zotero.ItemFields.isValidForType(id, zoteroItem.itemTypeID)) { + continue; + } + + let baseField = Zotero.ItemFields.getName( + Zotero.ItemFields.getBaseIDFromTypeAndField(item.itemType, field) + ); + + if (!baseField || baseField == field) { + item.uniqueFields[field] = item[field]; + } else { + item[baseField] = item[field]; + item.uniqueFields[baseField] = item[field]; + } + } + + // Add various fields for compatibility with translators pre-4.0.27 + item.itemID = zoteroItem.id; + item.libraryID = zoteroItem.libraryID; + + // Creators + if (item.creators) { + for (let i=0; i<item.creators.length; i++) { + let creator = item.creators[i]; + + if (creator.name) { + creator.fieldMode = 1; + creator.lastName = creator.name; + delete creator.name; + } + + // Old format used to supply creatorID (the database ID), but no + // translator ever used it + } + } + + if (!zoteroItem.isRegularItem()) { + item.sourceItemKey = item.parentItem; + } + + // Tags + for (let i=0; i<item.tags.length; i++) { + if (!item.tags[i].type) { + item.tags[i].type = 0; + } + // No translator ever used "primary", "fields", or "linkedItems" objects + } + + // "related" was never used (array of itemIDs) + + // seeAlso was always present, but it was always an empty array. + // Zotero RDF translator pretended to use it + item.seeAlso = []; + + // Fix linkMode + if (zoteroItem.isAttachment()) { + item.linkMode = zoteroItem.attachmentLinkMode; + item.mimeType = item.contentType; + } + + return item; + } + }, + + /** * Hyphenate an ISBN based on the registrant table available from * https://www.isbn-international.org/range_file_generation * See isbn.js diff --git a/test/components/zotero-unit.js b/test/components/zotero-unit.js @@ -33,6 +33,9 @@ ZoteroUnit.prototype = { handle:function(cmdLine) { this.tests = cmdLine.handleFlagWithParam("test", false); this.noquit = cmdLine.handleFlag("noquit", false); + this.makeTestData = cmdLine.handleFlag("makeTestData", false); + this.noquit = !this.makeTestData && this.noquit; + this.runTests = !this.makeTestData; }, dump:function(x) { diff --git a/test/content/runtests.js b/test/content/runtests.js @@ -1,17 +1,16 @@ -Components.utils.import("resource://gre/modules/FileUtils.jsm"); Components.utils.import("resource://gre/modules/osfile.jsm"); -Components.utils.import("resource://zotero/q.js"); var EventUtils = Components.utils.import("resource://zotero-unit/EventUtils.jsm"); var ZoteroUnit = Components.classes["@mozilla.org/commandlinehandler/general-startup;1?type=zotero-unit"]. - getService(Components.interfaces.nsISupports). - wrappedJSObject; + getService(Components.interfaces.nsISupports). + wrappedJSObject; + var dump = ZoteroUnit.dump; function quit(failed) { // Quit with exit status if(!failed) { - OS.File.writeAtomic(FileUtils.getFile("ProfD", ["success"]).path, Uint8Array(0)); + OS.File.writeAtomic(OS.Path.join(OS.Constants.Path.profileDir, "success"), new Uint8Array(0)); } if(!ZoteroUnit.noquit) { Components.classes['@mozilla.org/toolkit/app-startup;1']. @@ -20,6 +19,72 @@ function quit(failed) { } } +if (ZoteroUnit.makeTestData) { + let dataPath = getTestDataDirectory().path; + + Zotero.Prefs.set("export.citePaperJournalArticleURL", true); + + let dataFiles = [ + { + name: 'allTypesAndFields', + func: generateAllTypesAndFieldsData + }, + { + name: 'itemJSON', + func: generateItemJSONData, + args: [null] + }, + { + name: 'citeProcJSExport', + func: generateCiteProcJSExportData + }, + { + name: 'translatorExportLegacy', + func: generateTranslatorExportData, + args: [true] + }, + { + name: 'translatorExport', + func: generateTranslatorExportData, + args: [false] + } + ]; + let p = Q.resolve(); + for (let i=0; i<dataFiles.length; i++) { + let first = !i; + let params = dataFiles[i]; + + p = p.then(function() { + // Make sure to not run next loop if previous fails + return Q.try(function() { + if (!first) dump('\n'); + dump('Generating data for ' + params.name + '...'); + + let filePath = OS.Path.join(dataPath, params.name + '.js'); + + return Q.resolve(OS.File.exists(filePath)) + .then(function(exists) { + let currentData; + if (exists) { + currentData = loadSampleData(params.name); + } + + let args = params.args || []; + args.push(currentData); + let str = stableStringify(params.func.apply(null, args)); + + return OS.File.writeAtomic(OS.Path.join(dataPath, params.name + '.js'), str); + }); + }) + .then(function() { dump("done."); }) + .catch(function(e) { dump("failed!"); throw e }) + }); + } + + p.catch(function(e) { dump('\n'); dump(Zotero.Utilities.varDump(e)) }) + .finally(function() { quit(false) }); +} + function Reporter(runner) { var indents = 0, passed = 0, failed = 0; @@ -40,7 +105,7 @@ function Reporter(runner) { }); runner.on('pending', function(test){ - dump(indent()+"pending -"+test.title); + dump("\r"+indent()+"pending -"+test.title+"\n"); }); runner.on('pass', function(test){ @@ -71,8 +136,8 @@ var assert = chai.assert, expect = chai.expect; // Set up tests to run -var run = true; -if(ZoteroUnit.tests) { +var run = ZoteroUnit.runTests; +if(run && ZoteroUnit.tests) { var testDirectory = getTestDataDirectory().parent, testFiles = []; if(ZoteroUnit.tests == "all") { diff --git a/test/content/support.js b/test/content/support.js @@ -1,3 +1,10 @@ +Components.utils.import("resource://zotero/q.js"); + +// Useful "constants" +var sqlDateTimeRe = /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/; +var isoDateTimeRe = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/; +var zoteroObjectKeyRe = /^[23456789ABCDEFGHIJKMNPQRSTUVWXZ]{8}$/; // based on Zotero.Utilities::generateObjectKey() + /** * Waits for a DOM event on the specified node. Returns a promise * resolved with the event. @@ -144,8 +151,8 @@ function installPDFTools() { } /** - * Returns a promise for the nsIFile corresponding to the test data - * directory (i.e., test/tests/data) + * Returns the nsIFile corresponding to the test data directory + * (i.e., test/tests/data) */ function getTestDataDirectory() { Components.utils.import("resource://gre/modules/Services.jsm"); @@ -157,6 +164,28 @@ function getTestDataDirectory() { } /** + * Returns an absolute path to an empty temporary directory + * (i.e., test/tests/data) + */ +var getTempDirectory = Q.async(function getTempDirectory() { + Components.utils.import("resource://gre/modules/osfile.jsm"); + let path, + attempts = 3, + zoteroTmpDirPath = Zotero.getTempDirectory().path; + while (attempts--) { + path = OS.Path.join(zoteroTmpDirPath, Zotero.Utilities.randomString()); + try { + yield OS.File.makeDir(path, { ignoreExisting: false }); + break; + } catch (e) { + if (!attempts) throw e; // Throw on last attempt + } + } + + Q.return(path); +}); + +/** * Resets the Zotero DB and restarts Zotero. Returns a promise resolved * when this finishes. */ @@ -167,4 +196,298 @@ function resetDB() { }).then(function() { return Zotero.Schema.schemaUpdatePromise; }); +} + +/** + * Equivalent to JSON.stringify, except that object properties are stringified + * in a sorted order. + */ +function stableStringify(obj, level, label) { + if (!level) level = 0; + let indent = '\t'.repeat(level); + + if (label) label = JSON.stringify('' + label) + ': '; + else label = ''; + + if (typeof obj == 'function' || obj === undefined) return null; + + if (typeof obj != 'object' || obj === null) return indent + label + JSON.stringify(obj); + + if (Array.isArray(obj)) { + let str = indent + label + '['; + for (let i=0; i<obj.length; i++) { + let json = stableStringify(obj[i], level + 1); + if (json === null) json = indent + '\tnull'; // function + str += '\n' + json + (i < obj.length-1 ? ',' : ''); + } + return str + (obj.length ? '\n' + indent : '') + ']'; + } + + let keys = Object.keys(obj).sort(), + empty = true, + str = indent + label + '{'; + for (let i=0; i<keys.length; i++) { + let json = stableStringify(obj[keys[i]], level + 1, keys[i]); + if (json === null) continue; // function + + empty = false; + str += '\n' + json + (i < keys.length-1 ? ',' : ''); + } + + return str + (!empty ? '\n' + indent : '') + '}'; +} + +/** + * Loads specified sample data from file + */ +function loadSampleData(dataName) { + let data = Zotero.File.getContentsFromURL('resource://zotero-unit-tests/data/' + dataName + '.js'); + return JSON.parse(data); +} + +/** + * Generates sample item data that is stored in data/sampleItemData.js + */ +function generateAllTypesAndFieldsData() { + let data = {}; + let itemTypes = Zotero.ItemTypes.getTypes(); + // For most fields, use the field name as the value, but this doesn't + // work well for some fields that expect values in certain formats + let specialValues = { + date: '1999-12-31', + filingDate: '2000-01-02', + accessDate: '1997-06-13 23:59:58', + number: 3, + numPages: 4, + issue: 5, + volume: 6, + numberOfVolumes: 7, + edition: 8, + seriesNumber: 9, + ISBN: '978-1-234-56789-7', + ISSN: '1234-5679', + url: 'http://www.example.com', + pages: '1-10', + DOI: '10.1234/example.doi', + runningTime: '1:22:33', + language: 'en-US' + }; + + // Item types that should not be included in sample data + let excludeItemTypes = ['note', 'attachment']; + + for (let i = 0; i < itemTypes.length; i++) { + if (excludeItemTypes.indexOf(itemTypes[i].name) != -1) continue; + + let itemFields = data[itemTypes[i].name] = { + itemType: itemTypes[i].name + }; + + let fields = Zotero.ItemFields.getItemTypeFields(itemTypes[i].id); + for (let j = 0; j < fields.length; j++) { + let field = fields[j]; + field = Zotero.ItemFields.getBaseIDFromTypeAndField(itemTypes[i].id, field) || field; + + let name = Zotero.ItemFields.getName(field), + value; + + // Use field name as field value + if (specialValues[name]) { + value = specialValues[name]; + } else { + value = name.charAt(0).toUpperCase() + name.substr(1); + // Make it look nice (sentence case) + value = value.replace(/([a-z])([A-Z])/g, '$1 $2') + .replace(/ [A-Z](?![A-Z])/g, m => m.toLowerCase()); // not all-caps words + } + + itemFields[name] = value; + } + + let creatorTypes = Zotero.CreatorTypes.getTypesForItemType(itemTypes[i].id), + creators = itemFields.creators = []; + for (let j = 0; j < creatorTypes.length; j++) { + let typeName = creatorTypes[j].name; + creators.push({ + creatorType: typeName, + firstName: typeName + 'First', + lastName: typeName + 'Last' + }); + } + } + + return data; +} + +/** + * Populates the database with sample items + * The field values should be in the form exactly as they would appear in Zotero + */ +function populateDBWithSampleData(data) { + Zotero.DB.beginTransaction(); + + for (let itemName in data) { + let item = data[itemName]; + let zItem = new Zotero.Item(item.itemType); + for (let itemField in item) { + if (itemField == 'itemType') continue; + + if (itemField == 'creators') { + 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; + creator = Zotero.Creators.get(creator.save()); + + zItem.setCreator(i, creator, creators[i].creatorType); + } + continue; + } + + if (itemField == 'tags') { + // Must save item first + continue; + } + + zItem.setField(itemField, item[itemField]); + } + item.id = zItem.save(); + + if (item.tags && item.tags.length) { + zItem = Zotero.Items.get(item.id); + for (let i=0; i<item.tags.length; i++) { + zItem.addTag(item.tags[i].tag, item.tags[i].type); + } + } + } + + Zotero.DB.commitTransaction(); + return data; +} + +function generateItemJSONData(options, currentData) { + let items = populateDBWithSampleData(loadSampleData('allTypesAndFields')), + jsonData = {}; + + for (let itemName in items) { + let zItem = Zotero.Items.get(items[itemName].id); + jsonData[itemName] = zItem.toJSON(options); + + // Adjut accessDate so that it doesn't depend on computer time zone + // Effectively, assume that current time zone is UTC + if (jsonData[itemName].accessDate) { + let date = Zotero.Date.isoToDate(jsonData[itemName].accessDate); + date.setUTCMinutes(date.getUTCMinutes() - date.getTimezoneOffset()); + jsonData[itemName].accessDate = Zotero.Date.dateToISO(date); + } + + // Don't replace some fields that _always_ change (e.g. item keys) + // as long as it follows expected format + // This makes it easier to generate more meaningful diffs + if (!currentData || !currentData[itemName]) continue; + + for (let field in jsonData[itemName]) { + let oldVal = currentData[itemName][field]; + if (!oldVal) continue; + + let val = jsonData[itemName][field]; + switch (field) { + case 'dateAdded': + case 'dateModified': + if (!isoDateTimeRe.test(oldVal) || !isoDateTimeRe.test(val)) continue; + break; + case 'key': + if (!zoteroObjectKeyRe.test(oldVal) || !zoteroObjectKeyRe.test(val)) continue; + break; + default: + continue; + } + + jsonData[itemName][field] = oldVal; + } + } + + return jsonData; +} + +function generateCiteProcJSExportData(currentData) { + let items = populateDBWithSampleData(loadSampleData('allTypesAndFields')), + cslExportData = {}; + + for (let itemName in items) { + let zItem = Zotero.Items.get(items[itemName].id); + cslExportData[itemName] = Zotero.Cite.System.prototype.retrieveItem(zItem); + + if (!currentData || !currentData[itemName]) continue; + + // Don't replace id as long as it follows expected format + if (Number.isInteger(currentData[itemName].id) + && Number.isInteger(cslExportData[itemName].id) + ) { + cslExportData[itemName].id = currentData[itemName].id; + } + } + + return cslExportData; +} + +function generateTranslatorExportData(legacy, currentData) { + let items = populateDBWithSampleData(loadSampleData('allTypesAndFields')), + translatorExportData = {}; + + let itemGetter = new Zotero.Translate.ItemGetter(); + itemGetter.legacy = !!legacy; + + for (let itemName in items) { + let zItem = Zotero.Items.get(items[itemName].id); + itemGetter._itemsLeft = [zItem]; + translatorExportData[itemName] = itemGetter.nextItem(); + + // Adjut ISO accessDate so that it doesn't depend on computer time zone + // Effectively, assume that current time zone is UTC + if (!legacy && translatorExportData[itemName].accessDate) { + let date = Zotero.Date.isoToDate(translatorExportData[itemName].accessDate); + date.setUTCMinutes(date.getUTCMinutes() - date.getTimezoneOffset()); + translatorExportData[itemName].accessDate = Zotero.Date.dateToISO(date); + } + + // Don't replace some fields that _always_ change (e.g. item keys) + if (!currentData || !currentData[itemName]) continue; + + // For simplicity, be more lenient than for item key + let uriRe = /^http:\/\/zotero\.org\/users\/local\/\w{8}\/items\/\w{8}$/; + let itemIDRe = /^\d+$/; + for (let field in translatorExportData[itemName]) { + let oldVal = currentData[itemName][field]; + if (!oldVal) continue; + + let val = translatorExportData[itemName][field]; + switch (field) { + case 'uri': + if (!uriRe.test(oldVal) || !uriRe.test(val)) continue; + break; + case 'itemID': + if (!itemIDRe.test(oldVal) || !itemIDRe.test(val)) continue; + break; + case 'key': + if (!zoteroObjectKeyRe.test(oldVal) || !zoteroObjectKeyRe.test(val)) continue; + break; + case 'dateAdded': + case 'dateModified': + if (legacy) { + if (!sqlDateTimeRe.test(oldVal) || !sqlDateTimeRe.test(val)) continue; + } else { + if (!isoDateTimeRe.test(oldVal) || !isoDateTimeRe.test(val)) continue; + } + break; + default: + continue; + } + + translatorExportData[itemName][field] = oldVal; + } + } + + return translatorExportData; } \ No newline at end of file diff --git a/test/runtests.sh b/test/runtests.sh @@ -15,36 +15,44 @@ function makePath { } DEBUG=false -if [ "`uname`" == "Darwin" ]; then - FX_EXECUTABLE="/Applications/Firefox.app/Contents/MacOS/firefox" -else - FX_EXECUTABLE="firefox" +if [ -z "$FX_EXECUTABLE" ]; then + if [ "`uname`" == "Darwin" ]; then + FX_EXECUTABLE="/Applications/Firefox.app/Contents/MacOS/firefox" + else + FX_EXECUTABLE="firefox" + fi fi + FX_ARGS="" +ZOTERO_ARGS="" function usage { cat >&2 <<DONE -Usage: $0 [-x FX_EXECUTABLE] [TESTS...] +Usage: $0 [option] [TESTS...] Options - -x FX_EXECUTABLE path to Firefox executable (default: $FX_EXECUTABLE) - -d enable debug logging -c open JavaScript console and don't quit on completion + -d enable debug logging + -g generate test data and quit + -x FX_EXECUTABLE path to Firefox executable (default: $FX_EXECUTABLE) TESTS set of tests to run (default: all) DONE exit 1 } -while getopts "x:dc" opt; do +while getopts "x:dcg" opt; do case $opt in x) FX_EXECUTABLE="$OPTARG" ;; d) - DEBUG=true - ;; - c) - FX_ARGS="-jsconsole -noquit" - ;; + DEBUG=true + ;; + c) + FX_ARGS="-jsconsole -noquit" + ;; + g) + ZOTERO_ARGS="$ZOTERO_ARGS -makeTestData" + ;; *) usage ;; @@ -87,13 +95,14 @@ if [ -z $IS_CYGWIN ]; then echo "`MOZ_NO_REMOTE=1 NO_EM_RESTART=1 \"$FX_EXECUTABLE\" -v`" fi + if [ "$TRAVIS" = true ]; then - FX_ARGS="$FX_ARGS --ZoteroNoUserInput" + ZOTERO_ARGS="$ZOTERO_ARGS -ZoteroNoUserInput" fi makePath FX_PROFILE "$PROFILE" MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$FX_EXECUTABLE" -profile "$FX_PROFILE" \ - -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" $FX_ARGS + -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" $ZOTERO_ARGS $FX_ARGS # Check for success test -e "$PROFILE/success" diff --git a/test/tests/data/allTypesAndFields.js b/test/tests/data/allTypesAndFields.js @@ -0,0 +1,1366 @@ +{ + "artwork": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "artworkSize": "Artwork size", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "artist", + "firstName": "artistFirst", + "lastName": "artistLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "artwork", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "audioRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "performer", + "firstName": "performerFirst", + "lastName": "performerLast" + }, + { + "creatorType": "composer", + "firstName": "composerFirst", + "lastName": "composerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "wordsBy", + "firstName": "wordsByFirst", + "lastName": "wordsByLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "audioRecording", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "numberOfVolumes": 7, + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "bill": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "code": "Code", + "creators": [ + { + "creatorType": "sponsor", + "firstName": "sponsorFirst", + "lastName": "sponsorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "cosponsor", + "firstName": "cosponsorFirst", + "lastName": "cosponsorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "itemType": "bill", + "language": "en-US", + "legislativeBody": "Legislative body", + "number": 3, + "pages": "1-10", + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "blogPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "commenter", + "firstName": "commenterFirst", + "lastName": "commenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "blogPost", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "book": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "book", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": 4, + "numberOfVolumes": 7, + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": 9, + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "bookSection": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "bookAuthor", + "firstName": "bookAuthorFirst", + "lastName": "bookAuthorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "bookSection", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": 7, + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": 9, + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "case": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "court": "Court", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "counsel", + "firstName": "counselFirst", + "lastName": "counselLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "itemType": "case", + "language": "en-US", + "number": 3, + "pages": "1-10", + "reporter": "Reporter", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "computerProgram": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "programmer", + "firstName": "programmerFirst", + "lastName": "programmerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "computerProgram", + "libraryCatalog": "Library catalog", + "place": "Place", + "programmingLanguage": "Programming language", + "publisher": "Publisher", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "system": "System", + "title": "Title", + "url": "http://www.example.com", + "version": "Version" + }, + "conferencePaper": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "conferenceName": "Conference name", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "conferencePaper", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "dictionaryEntry": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "dictionaryEntry", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": 7, + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": 9, + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "document": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "document", + "language": "en-US", + "libraryCatalog": "Library catalog", + "publisher": "Publisher", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "email": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "email", + "language": "en-US", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "encyclopediaArticle": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "encyclopediaArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": 7, + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": 9, + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "film": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "film", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "forumPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "forumPost", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "hearing": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "committee": "Committee", + "creators": [ + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "itemType": "hearing", + "language": "en-US", + "legislativeBody": "Legislative body", + "number": 3, + "numberOfVolumes": 7, + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "instantMessage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "instantMessage", + "language": "en-US", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "interview": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "interviewee", + "firstName": "intervieweeFirst", + "lastName": "intervieweeLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "interviewer", + "firstName": "interviewerFirst", + "lastName": "interviewerLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "interview", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "issue": 5, + "itemType": "journalArticle", + "journalAbbreviation": "Journal abbreviation", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "rights": "Rights", + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "letter": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "letter", + "language": "en-US", + "libraryCatalog": "Library catalog", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "magazineArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "issue": 5, + "itemType": "magazineArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "manuscript": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "manuscript", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": 4, + "place": "Place", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "map": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "cartographer", + "firstName": "cartographerFirst", + "lastName": "cartographerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "map", + "language": "en-US", + "libraryCatalog": "Library catalog", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "scale": "Scale", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "newspaperArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "edition": 8, + "extra": "Extra", + "itemType": "newspaperArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "rights": "Rights", + "section": "Section", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "patent": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "applicationNumber": "Application number", + "assignee": "Assignee", + "country": "Country", + "creators": [ + { + "creatorType": "inventor", + "firstName": "inventorFirst", + "lastName": "inventorLast" + }, + { + "creatorType": "attorneyAgent", + "firstName": "attorneyAgentFirst", + "lastName": "attorneyAgentLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "filingDate": "2000-01-02", + "issuingAuthority": "Issuing authority", + "itemType": "patent", + "language": "en-US", + "legalStatus": "Legal status", + "number": 3, + "pages": "1-10", + "place": "Place", + "priorityNumbers": "Priority numbers", + "references": "References", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "podcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "podcaster", + "firstName": "podcasterFirst", + "lastName": "podcasterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + } + ], + "extra": "Extra", + "itemType": "podcast", + "language": "en-US", + "medium": "Medium", + "number": 3, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "presentation": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "presenter", + "firstName": "presenterFirst", + "lastName": "presenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "presentation", + "language": "en-US", + "meetingName": "Meeting name", + "place": "Place", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "radioBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "radioBroadcast", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "number": 3, + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "report": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "report", + "language": "en-US", + "libraryCatalog": "Library catalog", + "number": 3, + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "statute": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "code": "Code", + "codeNumber": "Code number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "itemType": "statute", + "language": "en-US", + "number": 3, + "pages": "1-10", + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "thesis": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "thesis", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": 4, + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "tvBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "tvBroadcast", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "number": 3, + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "videoRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "videoRecording", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "numberOfVolumes": 7, + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + }, + "webpage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "itemType": "webpage", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + } +} +\ No newline at end of file diff --git a/test/tests/data/citeProcJSExport.js b/test/tests/data/citeProcJSExport.js @@ -0,0 +1,1668 @@ +{ + "artwork": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "artistLast", + "given": "artistFirst" + } + ], + "call-number": "Call number", + "dimensions": "Artwork size", + "id": 37, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "graphic" + }, + "audioRecording": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "performerLast", + "given": "performerFirst" + } + ], + "call-number": "Call number", + "collection-title": "Series title", + "composer": [ + { + "family": "composerLast", + "given": "composerFirst" + } + ], + "dimensions": "1:22:33", + "event-place": "Place", + "id": 38, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "number-of-volumes": "7", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "song", + "volume": "6" + }, + "bill": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "sponsorLast", + "given": "sponsorFirst" + } + ], + "authority": "Legislative body", + "chapter-number": "Session", + "container-title": "Code", + "id": 39, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "page": "1-10", + "references": "History", + "section": "Section", + "shortTitle": "Short title", + "title": "Title", + "type": "bill", + "volume": "6" + }, + "blogPost": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "container-title": "Publication title", + "genre": "Type", + "id": 40, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "shortTitle": "Short title", + "title": "Title", + "type": "post-weblog" + }, + "book": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-number": "9", + "collection-title": "Series", + "edition": "8", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "event-place": "Place", + "id": 41, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-pages": "4", + "number-of-volumes": "7", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "book", + "volume": "6" + }, + "bookSection": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-number": "9", + "collection-title": "Series", + "container-author": [ + { + "family": "bookAuthorLast", + "given": "bookAuthorFirst" + } + ], + "container-title": "Publication title", + "edition": "8", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "event-place": "Place", + "id": 42, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-volumes": "7", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "chapter", + "volume": "6" + }, + "case": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "authority": "Court", + "container-title": "Reporter", + "id": 43, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "page": "1-10", + "references": "History", + "shortTitle": "Short title", + "title": "Title", + "type": "legal_case", + "volume": "6" + }, + "computerProgram": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "programmerLast", + "given": "programmerFirst" + } + ], + "call-number": "Call number", + "collection-title": "Series title", + "event-place": "Place", + "genre": "Programming language", + "id": 44, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "medium": "System", + "note": "Extra", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "book", + "version": "Version" + }, + "conferencePaper": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-title": "Series", + "container-title": "Publication title", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "event": "Conference name", + "event-place": "Place", + "id": 45, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "paper-conference", + "volume": "6" + }, + "dictionaryEntry": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-number": "9", + "collection-title": "Series", + "container-title": "Publication title", + "edition": "8", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "event-place": "Place", + "id": 46, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-volumes": "7", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "entry-dictionary", + "volume": "6" + }, + "document": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "id": 47, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "publisher": "Publisher", + "reviewed-author": [ + { + "family": "reviewedAuthorLast", + "given": "reviewedAuthorFirst" + } + ], + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "article" + }, + "email": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "id": 48, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "recipient": [ + { + "family": "recipientLast", + "given": "recipientFirst" + } + ], + "shortTitle": "Short title", + "title": "Title", + "type": "personal_communication" + }, + "encyclopediaArticle": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-number": "9", + "collection-title": "Series", + "container-title": "Publication title", + "edition": "8", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "event-place": "Place", + "id": 49, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-volumes": "7", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "entry-encyclopedia", + "volume": "6" + }, + "film": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "directorLast", + "given": "directorFirst" + } + ], + "call-number": "Call number", + "dimensions": "1:22:33", + "genre": "Type", + "id": 50, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "publisher": "Publisher", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "motion_picture" + }, + "forumPost": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "container-title": "Publication title", + "genre": "Type", + "id": 51, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "shortTitle": "Short title", + "title": "Title", + "type": "post" + }, + "hearing": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "contributorLast", + "given": "contributorFirst" + } + ], + "authority": "Legislative body", + "chapter-number": "Session", + "event-place": "Place", + "id": 52, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "number-of-volumes": "7", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "references": "History", + "section": "Committee", + "shortTitle": "Short title", + "title": "Title", + "type": "bill" + }, + "instantMessage": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "id": 53, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "recipient": [ + { + "family": "recipientLast", + "given": "recipientFirst" + } + ], + "shortTitle": "Short title", + "title": "Title", + "type": "personal_communication" + }, + "interview": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "intervieweeLast", + "given": "intervieweeFirst" + } + ], + "call-number": "Call number", + "id": 54, + "interviewer": [ + { + "family": "interviewerLast", + "given": "interviewerFirst" + } + ], + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "interview" + }, + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-title": "Series title", + "container-title": "Publication title", + "editor": [ + { + "family": "editorLast", + "given": "editorFirst" + } + ], + "id": 55, + "issue": "5", + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "journalAbbreviation": "Journal abbreviation", + "language": "en-US", + "note": "Extra", + "page": "1-10", + "reviewed-author": [ + { + "family": "reviewedAuthorLast", + "given": "reviewedAuthorFirst" + } + ], + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "article-journal", + "volume": "6" + }, + "letter": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "genre": "Type", + "id": 56, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "recipient": [ + { + "family": "recipientLast", + "given": "recipientFirst" + } + ], + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "personal_communication" + }, + "magazineArticle": { + "ISSN": "1234-5679", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "container-title": "Publication title", + "id": 57, + "issue": "5", + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "page": "1-10", + "reviewed-author": [ + { + "family": "reviewedAuthorLast", + "given": "reviewedAuthorFirst" + } + ], + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "article-magazine", + "volume": "6" + }, + "manuscript": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "event-place": "Place", + "genre": "Type", + "id": 58, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-pages": "4", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "manuscript" + }, + "map": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "cartographerLast", + "given": "cartographerFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-title": "Series title", + "edition": "8", + "event-place": "Place", + "genre": "Type", + "id": 59, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "publisher": "Publisher", + "publisher-place": "Place", + "scale": "Scale", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "map" + }, + "newspaperArticle": { + "ISSN": "1234-5679", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "container-title": "Publication title", + "edition": "8", + "event-place": "Place", + "id": 60, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "page": "1-10", + "publisher-place": "Place", + "reviewed-author": [ + { + "family": "reviewedAuthorLast", + "given": "reviewedAuthorFirst" + } + ], + "section": "Section", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "article-newspaper" + }, + "patent": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "inventorLast", + "given": "inventorFirst" + } + ], + "authority": "Issuing authority", + "call-number": "Application number", + "event-place": "Place", + "id": 61, + "issue": "Priority numbers", + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "page": "1-10", + "publisher-place": "Place", + "references": "References", + "shortTitle": "Short title", + "status": "Legal status", + "submitted": { + "date-parts": [ + [ + "2000", + 1, + 2 + ] + ], + "season": "2000-01-02" + }, + "title": "Title", + "type": "patent" + }, + "podcast": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "podcasterLast", + "given": "podcasterFirst" + } + ], + "collection-title": "Series title", + "dimensions": "1:22:33", + "id": 62, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "number": "3", + "shortTitle": "Short title", + "title": "Title", + "type": "song" + }, + "presentation": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "presenterLast", + "given": "presenterFirst" + } + ], + "event": "Meeting name", + "event-place": "Place", + "genre": "Type", + "id": 63, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "publisher-place": "Place", + "shortTitle": "Short title", + "title": "Title", + "type": "speech" + }, + "radioBroadcast": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "directorLast", + "given": "directorFirst" + } + ], + "call-number": "Call number", + "container-title": "Publication title", + "dimensions": "1:22:33", + "event-place": "Place", + "id": 64, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "number": "3", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "broadcast" + }, + "report": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "collection-editor": [ + { + "family": "seriesEditorLast", + "given": "seriesEditorFirst" + } + ], + "collection-title": "Series title", + "event-place": "Place", + "genre": "Type", + "id": 65, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "page": "1-10", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "report" + }, + "statute": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "chapter-number": "Session", + "container-title": "Code", + "id": 66, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number": "3", + "page": "1-10", + "references": "History", + "section": "Section", + "shortTitle": "Short title", + "title": "Title", + "type": "legislation", + "volume": "Code number" + }, + "thesis": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "call-number": "Call number", + "event-place": "Place", + "genre": "Type", + "id": 67, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "number-of-pages": "4", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "thesis" + }, + "tvBroadcast": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "directorLast", + "given": "directorFirst" + } + ], + "call-number": "Call number", + "container-title": "Publication title", + "dimensions": "1:22:33", + "event-place": "Place", + "id": 68, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "number": "3", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "broadcast" + }, + "videoRecording": { + "ISBN": "978-1-234-56789-7", + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "archive": "Archive", + "archive_location": "Archive location", + "author": [ + { + "family": "directorLast", + "given": "directorFirst" + } + ], + "call-number": "Call number", + "collection-title": "Series title", + "dimensions": "1:22:33", + "event-place": "Place", + "id": 69, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "medium": "Medium", + "note": "Extra", + "number-of-volumes": "7", + "publisher": "Publisher", + "publisher-place": "Place", + "shortTitle": "Short title", + "source": "Library catalog", + "title": "Title", + "type": "motion_picture", + "volume": "6" + }, + "webpage": { + "URL": "http://www.example.com", + "abstract": "Abstract note", + "accessed": { + "date-parts": [ + [ + "1997", + 6, + 13 + ] + ] + }, + "author": [ + { + "family": "authorLast", + "given": "authorFirst" + } + ], + "container-title": "Publication title", + "genre": "Type", + "id": 70, + "issued": { + "date-parts": [ + [ + "1999", + 12, + 31 + ] + ] + }, + "language": "en-US", + "note": "Extra", + "shortTitle": "Short title", + "title": "Title", + "translator": [ + { + "family": "translatorLast", + "given": "translatorFirst" + } + ], + "type": "webpage" + } +} +\ No newline at end of file diff --git a/test/tests/data/empty.pdf b/test/tests/data/empty.pdf Binary files differ. diff --git a/test/tests/data/itemJSON.js b/test/tests/data/itemJSON.js @@ -0,0 +1,1604 @@ +{ + "artwork": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "artworkMedium": "Medium", + "artworkSize": "Artwork size", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "artist", + "firstName": "artistFirst", + "lastName": "artistLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "artwork", + "key": "C2U6JHJ5", + "language": "en-US", + "libraryCatalog": "Library catalog", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "audioRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "performer", + "firstName": "performerFirst", + "lastName": "performerLast" + }, + { + "creatorType": "composer", + "firstName": "composerFirst", + "lastName": "composerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "wordsBy", + "firstName": "wordsByFirst", + "lastName": "wordsByLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "audioRecording", + "key": "PN2JHBRN", + "label": "Publisher", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "place": "Place", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "bill": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "billNumber": "3", + "code": "Code", + "codePages": "1-10", + "codeVolume": "6", + "collections": [], + "creators": [ + { + "creatorType": "sponsor", + "firstName": "sponsorFirst", + "lastName": "sponsorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "cosponsor", + "firstName": "cosponsorFirst", + "lastName": "cosponsorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "history": "History", + "itemType": "bill", + "key": "6V75C9MH", + "language": "en-US", + "legislativeBody": "Legislative body", + "relations": {}, + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "blogPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "blogTitle": "Publication title", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "commenter", + "firstName": "commenterFirst", + "lastName": "commenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "blogPost", + "key": "BN2VE2RW", + "language": "en-US", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "websiteType": "Type" + }, + "book": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "edition": "8", + "extra": "Extra", + "itemType": "book", + "key": "A4HMTK44", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": "4", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "bookSection": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "bookTitle": "Publication title", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "bookAuthor", + "firstName": "bookAuthorFirst", + "lastName": "bookAuthorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "edition": "8", + "extra": "Extra", + "itemType": "bookSection", + "key": "DSEABJVM", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "case": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "caseName": "Title", + "collections": [], + "court": "Court", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "counsel", + "firstName": "counselFirst", + "lastName": "counselLast" + } + ], + "dateAdded": "2015-04-12T09:00:22Z", + "dateDecided": "1999-12-31", + "dateModified": "2015-04-12T09:00:22Z", + "docketNumber": "3", + "extra": "Extra", + "firstPage": "1-10", + "history": "History", + "itemType": "case", + "key": "9A2VVWGX", + "language": "en-US", + "relations": {}, + "reporter": "Reporter", + "reporterVolume": "6", + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "url": "http://www.example.com", + "version": 1 + }, + "computerProgram": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "company": "Publisher", + "creators": [ + { + "creatorType": "programmer", + "firstName": "programmerFirst", + "lastName": "programmerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "computerProgram", + "key": "8GM9MDIU", + "libraryCatalog": "Library catalog", + "place": "Place", + "programmingLanguage": "Programming language", + "relations": {}, + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "system": "System", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "versionNumber": "Version" + }, + "conferencePaper": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "conferenceName": "Conference name", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "conferencePaper", + "key": "CEPUN4W5", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "proceedingsTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "dictionaryEntry": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "dictionaryTitle": "Publication title", + "edition": "8", + "extra": "Extra", + "itemType": "dictionaryEntry", + "key": "E2P29JGR", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "document": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "document", + "key": "NGFWI347", + "language": "en-US", + "libraryCatalog": "Library catalog", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "email": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "email", + "key": "BMVVSV67", + "language": "en-US", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "subject": "Title", + "tags": [], + "url": "http://www.example.com", + "version": 1 + }, + "encyclopediaArticle": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "edition": "8", + "encyclopediaTitle": "Publication title", + "extra": "Extra", + "itemType": "encyclopediaArticle", + "key": "J35AAWKK", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "film": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "distributor": "Publisher", + "extra": "Extra", + "genre": "Type", + "itemType": "film", + "key": "AETM84WQ", + "language": "en-US", + "libraryCatalog": "Library catalog", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium" + }, + "forumPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "forumTitle": "Publication title", + "itemType": "forumPost", + "key": "53KM42VR", + "language": "en-US", + "postType": "Type", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "hearing": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "committee": "Committee", + "creators": [ + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "documentNumber": "3", + "extra": "Extra", + "history": "History", + "itemType": "hearing", + "key": "G2NRUQUQ", + "language": "en-US", + "legislativeBody": "Legislative body", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "instantMessage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "instantMessage", + "key": "373CN2R3", + "language": "en-US", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "interview": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "interviewee", + "firstName": "intervieweeFirst", + "lastName": "intervieweeLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "interviewer", + "firstName": "interviewerFirst", + "lastName": "interviewerLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "interviewMedium": "Medium", + "itemType": "interview", + "key": "Q99SF7NK", + "language": "en-US", + "libraryCatalog": "Library catalog", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "issue": "5", + "itemType": "journalArticle", + "journalAbbreviation": "Journal abbreviation", + "key": "UXSSZ972", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "letter": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "letter", + "key": "XC832NQ9", + "language": "en-US", + "letterType": "Type", + "libraryCatalog": "Library catalog", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "magazineArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "issue": "5", + "itemType": "magazineArticle", + "key": "7GR89G56", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "manuscript": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "manuscript", + "key": "RWBCKHFZ", + "language": "en-US", + "libraryCatalog": "Library catalog", + "manuscriptType": "Type", + "numPages": "4", + "place": "Place", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "map": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "cartographer", + "firstName": "cartographerFirst", + "lastName": "cartographerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "edition": "8", + "extra": "Extra", + "itemType": "map", + "key": "I63JAE4X", + "language": "en-US", + "libraryCatalog": "Library catalog", + "mapType": "Type", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "scale": "Scale", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "newspaperArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "edition": "8", + "extra": "Extra", + "itemType": "newspaperArticle", + "key": "DEDZ6I2G", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "section": "Section", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "patent": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "applicationNumber": "Application number", + "assignee": "Assignee", + "collections": [], + "country": "Country", + "creators": [ + { + "creatorType": "inventor", + "firstName": "inventorFirst", + "lastName": "inventorLast" + }, + { + "creatorType": "attorneyAgent", + "firstName": "attorneyAgentFirst", + "lastName": "attorneyAgentLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "filingDate": "2000-01-02 2000-01-02", + "issueDate": "1999-12-31", + "issuingAuthority": "Issuing authority", + "itemType": "patent", + "key": "MTZVXTRG", + "language": "en-US", + "legalStatus": "Legal status", + "pages": "1-10", + "patentNumber": "3", + "place": "Place", + "priorityNumbers": "Priority numbers", + "references": "References", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "podcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "audioFileType": "Medium", + "collections": [], + "creators": [ + { + "creatorType": "podcaster", + "firstName": "podcasterFirst", + "lastName": "podcasterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + } + ], + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "podcast", + "key": "6N3TDNFS", + "language": "en-US", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "presentation": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "creators": [ + { + "creatorType": "presenter", + "firstName": "presenterFirst", + "lastName": "presenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "presentation", + "key": "2JTV9A3T", + "language": "en-US", + "meetingName": "Meeting name", + "place": "Place", + "presentationType": "Type", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "radioBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "radioBroadcast", + "key": "KH7HSUMX", + "language": "en-US", + "libraryCatalog": "Library catalog", + "network": "Publisher", + "place": "Place", + "programTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "report": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "institution": "Publisher", + "itemType": "report", + "key": "V3MJGNVJ", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "relations": {}, + "reportNumber": "3", + "reportType": "Type", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1 + }, + "statute": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "code": "Code", + "codeNumber": "Code number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "dateAdded": "2015-04-12T09:00:22Z", + "dateEnacted": "1999-12-31", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "history": "History", + "itemType": "statute", + "key": "89B8MRBX", + "language": "en-US", + "nameOfAct": "Title", + "pages": "1-10", + "publicLawNumber": "3", + "relations": {}, + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "url": "http://www.example.com", + "version": 1 + }, + "thesis": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "thesis", + "key": "NCHRWGKP", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": "4", + "place": "Place", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "thesisType": "Type", + "title": "Title", + "university": "Publisher", + "url": "http://www.example.com", + "version": 1 + }, + "tvBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "tvBroadcast", + "key": "RJE8KPDJ", + "language": "en-US", + "libraryCatalog": "Library catalog", + "network": "Publisher", + "place": "Place", + "programTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium" + }, + "videoRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "videoRecording", + "key": "QP98PAM5", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "place": "Place", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "studio": "Publisher", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium", + "volume": "6" + }, + "webpage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T09:00:22Z", + "dateModified": "2015-04-12T09:00:22Z", + "extra": "Extra", + "itemType": "webpage", + "key": "MDFARNFI", + "language": "en-US", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "url": "http://www.example.com", + "version": 1, + "websiteTitle": "Publication title", + "websiteType": "Type" + } +} +\ No newline at end of file diff --git a/test/tests/data/journalArticle.js b/test/tests/data/journalArticle.js @@ -0,0 +1,55 @@ +{ + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "extra": "Extra", + "issue": 5, + "itemType": "journalArticle", + "journalAbbreviation": "Journal abbreviation", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "rights": "Rights", + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": 6 + } +} +\ No newline at end of file diff --git a/test/tests/data/translatorExport.js b/test/tests/data/translatorExport.js @@ -0,0 +1,1672 @@ +{ + "artwork": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "artworkMedium": "Medium", + "artworkSize": "Artwork size", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "artist", + "firstName": "artistFirst", + "lastName": "artistLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "artwork", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/VXDHRHNP", + "url": "http://www.example.com", + "version": 1 + }, + "audioRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "performer", + "firstName": "performerFirst", + "lastName": "performerLast" + }, + { + "creatorType": "composer", + "firstName": "composerFirst", + "lastName": "composerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "wordsBy", + "firstName": "wordsByFirst", + "lastName": "wordsByLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "audioRecording", + "label": "Publisher", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numberOfVolumes": "7", + "place": "Place", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/H9KMDMKK", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "bill": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "billNumber": "3", + "code": "Code", + "codePages": "1-10", + "codeVolume": "6", + "collections": [], + "creators": [ + { + "creatorType": "sponsor", + "firstName": "sponsorFirst", + "lastName": "sponsorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "cosponsor", + "firstName": "cosponsorFirst", + "lastName": "cosponsorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "history": "History", + "itemType": "bill", + "language": "en-US", + "legislativeBody": "Legislative body", + "notes": [], + "relations": {}, + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/7UF9TWRI", + "url": "http://www.example.com", + "version": 1 + }, + "blogPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "blogTitle": "Publication title", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "commenter", + "firstName": "commenterFirst", + "lastName": "commenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "blogPost", + "language": "en-US", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/ABZPI5RA", + "url": "http://www.example.com", + "version": 1, + "websiteType": "Type" + }, + "book": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "edition": "8", + "extra": "Extra", + "itemType": "book", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numPages": "4", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/GW3SAWW6", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "bookSection": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "bookTitle": "Publication title", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "bookAuthor", + "firstName": "bookAuthorFirst", + "lastName": "bookAuthorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "edition": "8", + "extra": "Extra", + "itemType": "bookSection", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/RIPPV55H", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "case": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "caseName": "Title", + "collections": [], + "court": "Court", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "counsel", + "firstName": "counselFirst", + "lastName": "counselLast" + } + ], + "dateAdded": "2015-04-12T05:45:15Z", + "dateDecided": "1999-12-31", + "dateModified": "2015-04-12T05:45:15Z", + "docketNumber": "3", + "extra": "Extra", + "firstPage": "1-10", + "history": "History", + "itemType": "case", + "language": "en-US", + "notes": [], + "relations": {}, + "reporter": "Reporter", + "reporterVolume": "6", + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "uri": "http://zotero.org/users/local/riiZoBgm/items/QHZWSBCZ", + "url": "http://www.example.com", + "version": 1 + }, + "computerProgram": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "company": "Publisher", + "creators": [ + { + "creatorType": "programmer", + "firstName": "programmerFirst", + "lastName": "programmerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "computerProgram", + "libraryCatalog": "Library catalog", + "notes": [], + "place": "Place", + "programmingLanguage": "Programming language", + "relations": {}, + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "system": "System", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/KKPZKHNF", + "url": "http://www.example.com", + "version": 1, + "versionNumber": "Version" + }, + "conferencePaper": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "conferenceName": "Conference name", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "conferencePaper", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "pages": "1-10", + "place": "Place", + "proceedingsTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/6N2HGGGC", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "dictionaryEntry": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "dictionaryTitle": "Publication title", + "edition": "8", + "extra": "Extra", + "itemType": "dictionaryEntry", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/JPNX3J45", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "document": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "document", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/JC3ZJTHP", + "url": "http://www.example.com", + "version": 1 + }, + "email": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "email", + "language": "en-US", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "subject": "Title", + "tags": [], + "uri": "http://zotero.org/users/local/riiZoBgm/items/W2WFJDDP", + "url": "http://www.example.com", + "version": 1 + }, + "encyclopediaArticle": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "edition": "8", + "encyclopediaTitle": "Publication title", + "extra": "Extra", + "itemType": "encyclopediaArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/IQ4VQRZK", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "film": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "distributor": "Publisher", + "extra": "Extra", + "genre": "Type", + "itemType": "film", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/ASGNK9V4", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium" + }, + "forumPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "forumTitle": "Publication title", + "itemType": "forumPost", + "language": "en-US", + "notes": [], + "postType": "Type", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/VUMWB9BZ", + "url": "http://www.example.com", + "version": 1 + }, + "hearing": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "committee": "Committee", + "creators": [ + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "documentNumber": "3", + "extra": "Extra", + "history": "History", + "itemType": "hearing", + "language": "en-US", + "legislativeBody": "Legislative body", + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/3XQMN9Q5", + "url": "http://www.example.com", + "version": 1 + }, + "instantMessage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "instantMessage", + "language": "en-US", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/XEATTJU2", + "url": "http://www.example.com", + "version": 1 + }, + "interview": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "interviewee", + "firstName": "intervieweeFirst", + "lastName": "intervieweeLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "interviewer", + "firstName": "interviewerFirst", + "lastName": "interviewerLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "interviewMedium": "Medium", + "itemType": "interview", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/7WKVQVAR", + "url": "http://www.example.com", + "version": 1 + }, + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "issue": "5", + "itemType": "journalArticle", + "journalAbbreviation": "Journal abbreviation", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/SWW5XKNW", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "letter": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "letter", + "language": "en-US", + "letterType": "Type", + "libraryCatalog": "Library catalog", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/X3A224PG", + "url": "http://www.example.com", + "version": 1 + }, + "magazineArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "issue": "5", + "itemType": "magazineArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/CP6IHEZW", + "url": "http://www.example.com", + "version": 1, + "volume": "6" + }, + "manuscript": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "manuscript", + "language": "en-US", + "libraryCatalog": "Library catalog", + "manuscriptType": "Type", + "notes": [], + "numPages": "4", + "place": "Place", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/V7VMFMWK", + "url": "http://www.example.com", + "version": 1 + }, + "map": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "cartographer", + "firstName": "cartographerFirst", + "lastName": "cartographerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "edition": "8", + "extra": "Extra", + "itemType": "map", + "language": "en-US", + "libraryCatalog": "Library catalog", + "mapType": "Type", + "notes": [], + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "scale": "Scale", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/EE37TTFA", + "url": "http://www.example.com", + "version": 1 + }, + "newspaperArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "edition": "8", + "extra": "Extra", + "itemType": "newspaperArticle", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "section": "Section", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/AF7D3DBU", + "url": "http://www.example.com", + "version": 1 + }, + "patent": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "applicationNumber": "Application number", + "assignee": "Assignee", + "attachments": [], + "collections": [], + "country": "Country", + "creators": [ + { + "creatorType": "inventor", + "firstName": "inventorFirst", + "lastName": "inventorLast" + }, + { + "creatorType": "attorneyAgent", + "firstName": "attorneyAgentFirst", + "lastName": "attorneyAgentLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "filingDate": "2000-01-02 2000-01-02", + "issueDate": "1999-12-31", + "issuingAuthority": "Issuing authority", + "itemType": "patent", + "language": "en-US", + "legalStatus": "Legal status", + "notes": [], + "pages": "1-10", + "patentNumber": "3", + "place": "Place", + "priorityNumbers": "Priority numbers", + "references": "References", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/PJTMWECG", + "url": "http://www.example.com", + "version": 1 + }, + "podcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "audioFileType": "Medium", + "collections": [], + "creators": [ + { + "creatorType": "podcaster", + "firstName": "podcasterFirst", + "lastName": "podcasterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + } + ], + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "podcast", + "language": "en-US", + "notes": [], + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/QE7NSW5T", + "url": "http://www.example.com", + "version": 1 + }, + "presentation": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "presenter", + "firstName": "presenterFirst", + "lastName": "presenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "presentation", + "language": "en-US", + "meetingName": "Meeting name", + "notes": [], + "place": "Place", + "presentationType": "Type", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/VCJG5RX7", + "url": "http://www.example.com", + "version": 1 + }, + "radioBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "radioBroadcast", + "language": "en-US", + "libraryCatalog": "Library catalog", + "network": "Publisher", + "notes": [], + "place": "Place", + "programTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/H9KMVJH9", + "url": "http://www.example.com", + "version": 1 + }, + "report": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "institution": "Publisher", + "itemType": "report", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "pages": "1-10", + "place": "Place", + "relations": {}, + "reportNumber": "3", + "reportType": "Type", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/Z2IZ9JEP", + "url": "http://www.example.com", + "version": 1 + }, + "statute": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "code": "Code", + "codeNumber": "Code number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "dateAdded": "2015-04-12T05:45:15Z", + "dateEnacted": "1999-12-31", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "history": "History", + "itemType": "statute", + "language": "en-US", + "nameOfAct": "Title", + "notes": [], + "pages": "1-10", + "publicLawNumber": "3", + "relations": {}, + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "uri": "http://zotero.org/users/local/riiZoBgm/items/SJE3PIJT", + "url": "http://www.example.com", + "version": 1 + }, + "thesis": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "thesis", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numPages": "4", + "place": "Place", + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "thesisType": "Type", + "title": "Title", + "university": "Publisher", + "uri": "http://zotero.org/users/local/riiZoBgm/items/68UVS8EK", + "url": "http://www.example.com", + "version": 1 + }, + "tvBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "episodeNumber": "3", + "extra": "Extra", + "itemType": "tvBroadcast", + "language": "en-US", + "libraryCatalog": "Library catalog", + "network": "Publisher", + "notes": [], + "place": "Place", + "programTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/7WGRBEFW", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium" + }, + "videoRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "videoRecording", + "language": "en-US", + "libraryCatalog": "Library catalog", + "notes": [], + "numberOfVolumes": "7", + "place": "Place", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "studio": "Publisher", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/55G9KHBH", + "url": "http://www.example.com", + "version": 1, + "videoRecordingFormat": "Medium", + "volume": "6" + }, + "webpage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13T23:59:58Z", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-12T05:45:15Z", + "dateModified": "2015-04-12T05:45:15Z", + "extra": "Extra", + "itemType": "webpage", + "language": "en-US", + "notes": [], + "relations": {}, + "rights": "Rights", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uri": "http://zotero.org/users/local/riiZoBgm/items/M7X5Q2MA", + "url": "http://www.example.com", + "version": 1, + "websiteTitle": "Publication title", + "websiteType": "Type" + } +} +\ No newline at end of file diff --git a/test/tests/data/translatorExportLegacy.js b/test/tests/data/translatorExportLegacy.js @@ -0,0 +1,2475 @@ +{ + "artwork": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "artworkMedium": "Medium", + "artworkSize": "Artwork size", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "artist", + "firstName": "artistFirst", + "lastName": "artistLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 71, + "itemType": "artwork", + "key": "URG4NG9K", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "notes": [], + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "artworkSize": "Artwork size", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/URG4NG9K", + "url": "http://www.example.com" + }, + "audioRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "performer", + "firstName": "performerFirst", + "lastName": "performerLast" + }, + { + "creatorType": "composer", + "firstName": "composerFirst", + "lastName": "composerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "wordsBy", + "firstName": "wordsByFirst", + "lastName": "wordsByLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 72, + "itemType": "audioRecording", + "key": "K3JPBCZP", + "label": "Publisher", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "notes": [], + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/K3JPBCZP", + "url": "http://www.example.com", + "volume": "6" + }, + "bill": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "billNumber": "3", + "code": "Code", + "codePages": "1-10", + "codeVolume": "6", + "collections": [], + "creators": [ + { + "creatorType": "sponsor", + "firstName": "sponsorFirst", + "lastName": "sponsorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "cosponsor", + "firstName": "cosponsorFirst", + "lastName": "cosponsorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "history": "History", + "itemID": 73, + "itemType": "bill", + "key": "XHEAETDQ", + "language": "en-US", + "legislativeBody": "Legislative body", + "libraryID": null, + "notes": [], + "number": "3", + "pages": "1-10", + "relations": {}, + "rights": "Rights", + "section": "Section", + "seeAlso": [], + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "code": "Code", + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "language": "en-US", + "legislativeBody": "Legislative body", + "number": "3", + "pages": "1-10", + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/XHEAETDQ", + "url": "http://www.example.com", + "volume": "6" + }, + "blogPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "blogTitle": "Publication title", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "commenter", + "firstName": "commenterFirst", + "lastName": "commenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 74, + "itemType": "blogPost", + "key": "P5CEI9PJ", + "language": "en-US", + "libraryID": null, + "notes": [], + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/P5CEI9PJ", + "url": "http://www.example.com", + "websiteType": "Type" + }, + "book": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "edition": "8", + "extra": "Extra", + "itemID": 75, + "itemType": "book", + "key": "SQW3USEX", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "numPages": "4", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": "4", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/SQW3USEX", + "url": "http://www.example.com", + "volume": "6" + }, + "bookSection": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "bookTitle": "Publication title", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "bookAuthor", + "firstName": "bookAuthorFirst", + "lastName": "bookAuthorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "edition": "8", + "extra": "Extra", + "itemID": 76, + "itemType": "bookSection", + "key": "I3R2EZA4", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/I3R2EZA4", + "url": "http://www.example.com", + "volume": "6" + }, + "case": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "caseName": "Title", + "collections": [], + "court": "Court", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "counsel", + "firstName": "counselFirst", + "lastName": "counselLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateDecided": "1999-12-31", + "dateModified": "2015-04-26 06:40:48", + "docketNumber": "3", + "extra": "Extra", + "firstPage": "1-10", + "history": "History", + "itemID": 77, + "itemType": "case", + "key": "27FBK7IW", + "language": "en-US", + "libraryID": null, + "notes": [], + "number": "3", + "pages": "1-10", + "relations": {}, + "reporter": "Reporter", + "reporterVolume": "6", + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "court": "Court", + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "language": "en-US", + "number": "3", + "pages": "1-10", + "reporter": "Reporter", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/27FBK7IW", + "url": "http://www.example.com", + "volume": "6" + }, + "computerProgram": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "company": "Publisher", + "creators": [ + { + "creatorType": "programmer", + "firstName": "programmerFirst", + "lastName": "programmerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 78, + "itemType": "computerProgram", + "key": "ZVFQ59AJ", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "place": "Place", + "programmingLanguage": "Programming language", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "system": "System", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "libraryCatalog": "Library catalog", + "place": "Place", + "programmingLanguage": "Programming language", + "publisher": "Publisher", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "system": "System", + "title": "Title", + "url": "http://www.example.com", + "version": "Version" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/ZVFQ59AJ", + "url": "http://www.example.com", + "version": "Version" + }, + "conferencePaper": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "conferenceName": "Conference name", + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 79, + "itemType": "conferencePaper", + "key": "4X4JGKAA", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "pages": "1-10", + "place": "Place", + "proceedingsTitle": "Publication title", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "DOI": "10.1234/example.doi", + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "conferenceName": "Conference name", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/4X4JGKAA", + "url": "http://www.example.com", + "volume": "6" + }, + "dictionaryEntry": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "dictionaryTitle": "Publication title", + "edition": "8", + "extra": "Extra", + "itemID": 80, + "itemType": "dictionaryEntry", + "key": "8MFTU597", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/8MFTU597", + "url": "http://www.example.com", + "volume": "6" + }, + "document": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 81, + "itemType": "document", + "key": "TRVQD4MU", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "publisher": "Publisher", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/TRVQD4MU", + "url": "http://www.example.com" + }, + "email": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 82, + "itemType": "email", + "key": "B972FZG7", + "language": "en-US", + "libraryID": null, + "notes": [], + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "subject": "Title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/B972FZG7", + "url": "http://www.example.com" + }, + "encyclopediaArticle": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "edition": "8", + "encyclopediaTitle": "Publication title", + "extra": "Extra", + "itemID": 83, + "itemType": "encyclopediaArticle", + "key": "QS8M3X6Q", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "series": "Series", + "seriesNumber": "9", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/QS8M3X6Q", + "url": "http://www.example.com", + "volume": "6" + }, + "film": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "distributor": "Publisher", + "extra": "Extra", + "genre": "Type", + "itemID": 84, + "itemType": "film", + "key": "CJAAM7US", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "notes": [], + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/CJAAM7US", + "url": "http://www.example.com", + "videoRecordingFormat": "Medium" + }, + "forumPost": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "forumTitle": "Publication title", + "itemID": 85, + "itemType": "forumPost", + "key": "4HQTXH7A", + "language": "en-US", + "libraryID": null, + "notes": [], + "postType": "Type", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/4HQTXH7A", + "url": "http://www.example.com" + }, + "hearing": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "committee": "Committee", + "creators": [ + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "documentNumber": "3", + "extra": "Extra", + "history": "History", + "itemID": 86, + "itemType": "hearing", + "key": "ZFDSUNIK", + "language": "en-US", + "legislativeBody": "Legislative body", + "libraryID": null, + "notes": [], + "number": "3", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "committee": "Committee", + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "language": "en-US", + "legislativeBody": "Legislative body", + "number": "3", + "numberOfVolumes": "7", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/ZFDSUNIK", + "url": "http://www.example.com" + }, + "instantMessage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 87, + "itemType": "instantMessage", + "key": "XJ3877Z8", + "language": "en-US", + "libraryID": null, + "notes": [], + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/XJ3877Z8", + "url": "http://www.example.com" + }, + "interview": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "interviewee", + "firstName": "intervieweeFirst", + "lastName": "intervieweeLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "interviewer", + "firstName": "interviewerFirst", + "lastName": "interviewerLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "interviewMedium": "Medium", + "itemID": 88, + "itemType": "interview", + "key": "KW98WHF4", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "notes": [], + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/KW98WHF4", + "url": "http://www.example.com" + }, + "journalArticle": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "editor", + "firstName": "editorFirst", + "lastName": "editorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "issue": "5", + "itemID": 89, + "itemType": "journalArticle", + "journalAbbreviation": "Journal abbreviation", + "key": "B4GITB3Z", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "DOI": "10.1234/example.doi", + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "issue": "5", + "journalAbbreviation": "Journal abbreviation", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "rights": "Rights", + "series": "Series", + "seriesText": "Series text", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/B4GITB3Z", + "url": "http://www.example.com", + "volume": "6" + }, + "letter": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "recipient", + "firstName": "recipientFirst", + "lastName": "recipientLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 90, + "itemType": "letter", + "key": "262GGUWT", + "language": "en-US", + "letterType": "Type", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/262GGUWT", + "url": "http://www.example.com" + }, + "magazineArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "issue": "5", + "itemID": 91, + "itemType": "magazineArticle", + "key": "S8SKUS3I", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "pages": "1-10", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "issue": "5", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/S8SKUS3I", + "url": "http://www.example.com", + "volume": "6" + }, + "manuscript": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 92, + "itemType": "manuscript", + "key": "BZPATRCB", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "manuscriptType": "Type", + "notes": [], + "numPages": "4", + "place": "Place", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": "4", + "place": "Place", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/BZPATRCB", + "url": "http://www.example.com" + }, + "map": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "cartographer", + "firstName": "cartographerFirst", + "lastName": "cartographerLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "edition": "8", + "extra": "Extra", + "itemID": 93, + "itemType": "map", + "key": "WGRTVIWS", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "mapType": "Type", + "notes": [], + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "scale": "Scale", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "scale": "Scale", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/WGRTVIWS", + "url": "http://www.example.com" + }, + "newspaperArticle": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "reviewedAuthor", + "firstName": "reviewedAuthorFirst", + "lastName": "reviewedAuthorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "edition": "8", + "extra": "Extra", + "itemID": 94, + "itemType": "newspaperArticle", + "key": "4PHE8AXE", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "section": "Section", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISSN": "1234-5679", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "edition": "8", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "pages": "1-10", + "place": "Place", + "publicationTitle": "Publication title", + "rights": "Rights", + "section": "Section", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/4PHE8AXE", + "url": "http://www.example.com" + }, + "patent": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "applicationNumber": "Application number", + "assignee": "Assignee", + "attachments": [], + "collections": [], + "country": "Country", + "creators": [ + { + "creatorType": "inventor", + "firstName": "inventorFirst", + "lastName": "inventorLast" + }, + { + "creatorType": "attorneyAgent", + "firstName": "attorneyAgentFirst", + "lastName": "attorneyAgentLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "filingDate": "2000-01-02 2000-01-02", + "issueDate": "1999-12-31", + "issuingAuthority": "Issuing authority", + "itemID": 95, + "itemType": "patent", + "key": "URAE2N3M", + "language": "en-US", + "legalStatus": "Legal status", + "libraryID": null, + "notes": [], + "number": "3", + "pages": "1-10", + "patentNumber": "3", + "place": "Place", + "priorityNumbers": "Priority numbers", + "references": "References", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "applicationNumber": "Application number", + "assignee": "Assignee", + "country": "Country", + "date": "1999-12-31", + "extra": "Extra", + "filingDate": "2000-01-02 2000-01-02", + "issuingAuthority": "Issuing authority", + "language": "en-US", + "legalStatus": "Legal status", + "number": "3", + "pages": "1-10", + "place": "Place", + "priorityNumbers": "Priority numbers", + "references": "References", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/URAE2N3M", + "url": "http://www.example.com" + }, + "podcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "audioFileType": "Medium", + "collections": [], + "creators": [ + { + "creatorType": "podcaster", + "firstName": "podcasterFirst", + "lastName": "podcasterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + } + ], + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "episodeNumber": "3", + "extra": "Extra", + "itemID": 96, + "itemType": "podcast", + "key": "CDUFPIKZ", + "language": "en-US", + "libraryID": null, + "medium": "Medium", + "notes": [], + "number": "3", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "extra": "Extra", + "language": "en-US", + "medium": "Medium", + "number": "3", + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/CDUFPIKZ", + "url": "http://www.example.com" + }, + "presentation": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "presenter", + "firstName": "presenterFirst", + "lastName": "presenterLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 97, + "itemType": "presentation", + "key": "HQ38BFRE", + "language": "en-US", + "libraryID": null, + "meetingName": "Meeting name", + "notes": [], + "place": "Place", + "presentationType": "Type", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "meetingName": "Meeting name", + "place": "Place", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/HQ38BFRE", + "url": "http://www.example.com" + }, + "radioBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "audioRecordingFormat": "Medium", + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "episodeNumber": "3", + "extra": "Extra", + "itemID": 98, + "itemType": "radioBroadcast", + "key": "IANDVIRR", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "network": "Publisher", + "notes": [], + "number": "3", + "place": "Place", + "programTitle": "Publication title", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "number": "3", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/IANDVIRR", + "url": "http://www.example.com" + }, + "report": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "seriesEditor", + "firstName": "seriesEditorFirst", + "lastName": "seriesEditorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "institution": "Publisher", + "itemID": 99, + "itemType": "report", + "key": "2MBIEXX8", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "number": "3", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "reportNumber": "3", + "reportType": "Type", + "rights": "Rights", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "number": "3", + "pages": "1-10", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/2MBIEXX8", + "url": "http://www.example.com" + }, + "statute": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "code": "Code", + "codeNumber": "Code number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateEnacted": "1999-12-31", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "history": "History", + "itemID": 100, + "itemType": "statute", + "key": "ZZWC5DCZ", + "language": "en-US", + "libraryID": null, + "nameOfAct": "Title", + "notes": [], + "number": "3", + "pages": "1-10", + "publicLawNumber": "3", + "relations": {}, + "rights": "Rights", + "section": "Section", + "seeAlso": [], + "session": "Session", + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "code": "Code", + "codeNumber": "Code number", + "date": "1999-12-31", + "extra": "Extra", + "history": "History", + "language": "en-US", + "number": "3", + "pages": "1-10", + "rights": "Rights", + "section": "Section", + "session": "Session", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/ZZWC5DCZ", + "url": "http://www.example.com" + }, + "thesis": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 101, + "itemType": "thesis", + "key": "IZIFIQ9N", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "notes": [], + "numPages": "4", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "thesisType": "Type", + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "numPages": "4", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "university": "Publisher", + "uri": "http://zotero.org/users/local/GtG6GoZj/items/IZIFIQ9N", + "url": "http://www.example.com" + }, + "tvBroadcast": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "guest", + "firstName": "guestFirst", + "lastName": "guestLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "episodeNumber": "3", + "extra": "Extra", + "itemID": 102, + "itemType": "tvBroadcast", + "key": "K88A7XD3", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "network": "Publisher", + "notes": [], + "number": "3", + "place": "Place", + "programTitle": "Publication title", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "number": "3", + "place": "Place", + "publicationTitle": "Publication title", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/K88A7XD3", + "url": "http://www.example.com", + "videoRecordingFormat": "Medium" + }, + "videoRecording": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "attachments": [], + "callNumber": "Call number", + "collections": [], + "creators": [ + { + "creatorType": "director", + "firstName": "directorFirst", + "lastName": "directorLast" + }, + { + "creatorType": "castMember", + "firstName": "castMemberFirst", + "lastName": "castMemberLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "producer", + "firstName": "producerFirst", + "lastName": "producerLast" + }, + { + "creatorType": "scriptwriter", + "firstName": "scriptwriterFirst", + "lastName": "scriptwriterLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 103, + "itemType": "videoRecording", + "key": "6VRTBPRB", + "language": "en-US", + "libraryCatalog": "Library catalog", + "libraryID": null, + "medium": "Medium", + "notes": [], + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "relations": {}, + "rights": "Rights", + "runningTime": "1:22:33", + "seeAlso": [], + "seriesTitle": "Series title", + "shortTitle": "Short title", + "studio": "Publisher", + "tags": [], + "title": "Title", + "uniqueFields": { + "ISBN": "978-1-234-56789-7", + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "archive": "Archive", + "archiveLocation": "Archive location", + "callNumber": "Call number", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "libraryCatalog": "Library catalog", + "medium": "Medium", + "numberOfVolumes": "7", + "place": "Place", + "publisher": "Publisher", + "rights": "Rights", + "runningTime": "1:22:33", + "seriesTitle": "Series title", + "shortTitle": "Short title", + "title": "Title", + "url": "http://www.example.com", + "volume": "6" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/6VRTBPRB", + "url": "http://www.example.com", + "videoRecordingFormat": "Medium", + "volume": "6" + }, + "webpage": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "attachments": [], + "collections": [], + "creators": [ + { + "creatorType": "author", + "firstName": "authorFirst", + "lastName": "authorLast" + }, + { + "creatorType": "contributor", + "firstName": "contributorFirst", + "lastName": "contributorLast" + }, + { + "creatorType": "translator", + "firstName": "translatorFirst", + "lastName": "translatorLast" + } + ], + "date": "1999-12-31", + "dateAdded": "2015-04-26 06:40:48", + "dateModified": "2015-04-26 06:40:48", + "extra": "Extra", + "itemID": 104, + "itemType": "webpage", + "key": "CTAR75NZ", + "language": "en-US", + "libraryID": null, + "notes": [], + "publicationTitle": "Publication title", + "relations": {}, + "rights": "Rights", + "seeAlso": [], + "shortTitle": "Short title", + "tags": [], + "title": "Title", + "type": "Type", + "uniqueFields": { + "abstractNote": "Abstract note", + "accessDate": "1997-06-13 23:59:58", + "date": "1999-12-31", + "extra": "Extra", + "language": "en-US", + "publicationTitle": "Publication title", + "rights": "Rights", + "shortTitle": "Short title", + "title": "Title", + "type": "Type", + "url": "http://www.example.com" + }, + "uri": "http://zotero.org/users/local/GtG6GoZj/items/CTAR75NZ", + "url": "http://www.example.com", + "websiteTitle": "Publication title", + "websiteType": "Type" + } +} +\ No newline at end of file diff --git a/test/tests/support.js b/test/tests/support.js @@ -9,4 +9,184 @@ describe("Support Functions for Unit Testing", function() { }); }); }); -}); + describe("loadSampleData", function() { + it("should load data from file", function() { + let data = loadSampleData('journalArticle'); + assert.isObject(data, 'loaded data object'); + assert.isNotNull(data); + assert.isAbove(Object.keys(data).length, 0, 'data object is not empty'); + }); + }); + describe("populateDBWithSampleData", function() { + it("should populate database with data", function() { + let data = loadSampleData('journalArticle'); + populateDBWithSampleData(data); + + let skipFields = ['id', 'itemType', 'creators']; // Special comparisons + + for (let itemName in data) { + let item = data[itemName]; + assert.isAbove(item.id, 0, 'assigned new item ID'); + + let zItem = Zotero.Items.get(item.id); + assert.ok(zItem, 'inserted item into database'); + + // Compare item type + assert.equal(item.itemType, Zotero.ItemTypes.getName(zItem.itemTypeID), 'inserted item has the same item type'); + + // Compare simple properties + for (let prop in item) { + if (skipFields.indexOf(prop) != -1) continue; + + // Using base-mapped fields + assert.equal(item[prop], zItem.getField(prop, false, true), 'inserted item property has the same value as sample data'); + } + + if (item.creators) { + // Compare creators + for (let i=0; i<item.creators.length; i++) { + let creator = item.creators[i]; + let zCreator = zItem.getCreator(i); + assert.ok(zCreator, 'creator was added to item'); + assert.equal(creator.firstName, zCreator.ref.firstName, 'first names match'); + assert.equal(creator.lastName, zCreator.ref.lastName, 'last names match'); + assert.equal(creator.creatorType, Zotero.CreatorTypes.getName(zCreator.creatorTypeID), 'creator types match'); + } + } + } + }); + it("should populate items with tags", function() { + let data = populateDBWithSampleData({ + itemWithTags: { + itemType: "journalArticle", + tags: [ + { tag: "automatic tag", type: 0 }, + { tag: "manual tag", type: 1} + ] + } + }); + + let zItem = Zotero.Items.get(data.itemWithTags.id); + assert.ok(zItem, 'inserted item with tags into database'); + + let tags = data.itemWithTags.tags; + for (let i=0; i<tags.length; i++) { + let tagID = Zotero.Tags.getID(tags[i].tag, tags[i].type); + assert.ok(tagID, '"' + tags[i].tag + '" tag was inserted into the database'); + assert.ok(zItem.hasTag(tagID), '"' + tags[i].tag + '" tag was assigned to item'); + } + }); + }); + describe("generateAllTypesAndFieldsData", function() { + it("should generate all types and fields data", function() { + let data = generateAllTypesAndFieldsData(); + assert.isObject(data, 'created data object'); + assert.isNotNull(data); + assert.isAbove(Object.keys(data).length, 0, 'data object is not empty'); + }); + it("all types and fields sample data should be up to date", function() { + assert.deepEqual(loadSampleData('allTypesAndFields'), generateAllTypesAndFieldsData()); + }); + }); + describe("generateItemJSONData", function() { + it("item JSON data should be up to date", function() { + let oldData = loadSampleData('itemJSON'), + newData = generateItemJSONData(); + + assert.isObject(newData, 'created data object'); + assert.isNotNull(newData); + assert.isAbove(Object.keys(newData).length, 0, 'data object is not empty'); + + // Ignore data that is not stable, but make sure it is set + let ignoreFields = ['dateAdded', 'dateModified', 'key']; + for (let itemName in oldData) { + for (let i=0; i<ignoreFields.length; i++) { + let field = ignoreFields[i] + if (oldData[itemName][field] !== undefined) { + assert.isDefined(newData[itemName][field], field + ' is set'); + delete oldData[itemName][field]; + delete newData[itemName][field]; + } + } + } + + assert.deepEqual(oldData, newData); + }); + }); + describe("generateCiteProcJSExportData", function() { + let citeURL = Zotero.Prefs.get("export.citePaperJournalArticleURL"); + before(function () { + Zotero.Prefs.set("export.citePaperJournalArticleURL", true); + }); + after(function() { + Zotero.Prefs.set("export.citePaperJournalArticleURL", citeURL); + }); + + it("all citeproc-js export data should be up to date", function() { + let oldData = loadSampleData('citeProcJSExport'), + newData = generateCiteProcJSExportData(); + + assert.isObject(newData, 'created data object'); + assert.isNotNull(newData); + assert.isAbove(Object.keys(newData).length, 0, 'citeproc-js export object is not empty'); + + // Ignore item ID + for (let itemName in oldData) { + delete oldData[itemName].id; + } + for (let itemName in newData) { + delete newData[itemName].id; + } + + assert.deepEqual(oldData, newData, 'citeproc-js export data has not changed'); + }); + }); + describe("generateTranslatorExportData", function() { + it("legacy mode data should be up to date", function() { + let oldData = loadSampleData('translatorExportLegacy'), + newData = generateTranslatorExportData(true); + + assert.isObject(newData, 'created data object'); + assert.isNotNull(newData); + assert.isAbove(Object.keys(newData).length, 0, 'translator export object is not empty'); + + // Ignore data that is not stable, but make sure it is set + let ignoreFields = ['itemID', 'dateAdded', 'dateModified', 'uri', 'key']; + for (let itemName in oldData) { + for (let i=0; i<ignoreFields.length; i++) { + let field = ignoreFields[i] + if (oldData[itemName][field] !== undefined) { + assert.isDefined(newData[itemName][field], field + ' is set'); + delete oldData[itemName][field]; + delete newData[itemName][field]; + } + } + } + + assert.deepEqual(oldData, newData, 'translator export data has not changed'); + }); + it("data should be up to date", function() { + let oldData = loadSampleData('translatorExport'), + newData = generateTranslatorExportData(); + + assert.isObject(newData, 'created data object'); + assert.isNotNull(newData); + assert.isAbove(Object.keys(newData).length, 0, 'translator export object is not empty'); + + // Ignore data that is not stable, but make sure it is set + let ignoreFields = ['dateAdded', 'dateModified', 'uri']; + for (let itemName in oldData) { + for (let i=0; i<ignoreFields.length; i++) { + let field = ignoreFields[i] + if (oldData[itemName][field] !== undefined) { + assert.isDefined(newData[itemName][field], field + ' is set'); + delete oldData[itemName][field]; + delete newData[itemName][field]; + } + } + } + + assert.deepEqual(oldData, newData, 'translator export data has not changed'); + }); + }); +}); +\ No newline at end of file diff --git a/test/tests/translateTest.js b/test/tests/translateTest.js @@ -0,0 +1,577 @@ +Components.utils.import("resource://gre/modules/osfile.jsm"); + +describe("Zotero.Translate.ItemGetter", function() { + describe("nextItem", function() { + it('should return false for an empty database', function() { + let getter = new Zotero.Translate.ItemGetter(); + assert.isFalse(getter.nextItem()); + }); + it('should return items in order they are supplied', function() { + let getter = new Zotero.Translate.ItemGetter(); + + Zotero.DB.beginTransaction(); + + let itemIDs = [ + (new Zotero.Item('journalArticle')).save(), + (new Zotero.Item('book')).save() + ]; + + let items = [ Zotero.Items.get(itemIDs[0]), Zotero.Items.get(itemIDs[1]) ]; + let itemURIs = items.map(i => Zotero.URI.getItemURI(i)); + + Zotero.DB.commitTransaction(); + + getter._itemsLeft = items; + + assert.equal(getter.nextItem().uri, itemURIs[0], 'first item comes out first'); + assert.equal(getter.nextItem().uri, itemURIs[1], 'second item comes out second'); + assert.isFalse(getter.nextItem(), 'end of item queue'); + }); + it('should return items with tags in expected format', function() { + let getter = new Zotero.Translate.ItemGetter(); + + Zotero.DB.beginTransaction(); + + let itemWithAutomaticTag = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + itemWithAutomaticTag.addTag('automatic tag', 0); + + let itemWithManualTag = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + itemWithManualTag.addTag('manual tag', 1); + + let itemWithMultipleTags = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + itemWithMultipleTags.addTag('tag1', 0); + itemWithMultipleTags.addTag('tag2', 1); + + Zotero.DB.commitTransaction(); + + let legacyMode = [false, true]; + for (let i=0; i<legacyMode.length; i++) { + getter._itemsLeft = [itemWithAutomaticTag, itemWithManualTag, itemWithMultipleTags]; + getter.legacy = legacyMode[i]; + let suffix = legacyMode[i] ? ' in legacy mode' : ''; + + // itemWithAutomaticTag + let translatorItem = getter.nextItem(); + assert.isArray(translatorItem.tags, 'item contains automatic tags in an array' + suffix); + assert.isObject(translatorItem.tags[0], 'automatic tag is an object' + suffix); + assert.equal(translatorItem.tags[0].tag, 'automatic tag', 'automatic tag name provided as "tag" property' + suffix); + if (legacyMode[i]) { + assert.equal(translatorItem.tags[0].type, 0, 'automatic tag "type" is 0' + suffix); + } else { + assert.isUndefined(translatorItem.tags[0].type, '"type" is undefined for automatic tag' + suffix); + } + + // itemWithManualTag + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.tags, 'item contains manual tags in an array' + suffix); + assert.isObject(translatorItem.tags[0], 'manual tag is an object' + suffix); + assert.equal(translatorItem.tags[0].tag, 'manual tag', 'manual tag name provided as "tag" property' + suffix); + assert.equal(translatorItem.tags[0].type, 1, 'manual tag "type" is 1' + suffix); + + // itemWithMultipleTags + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.tags, 'item contains multiple tags in an array' + suffix); + assert.lengthOf(translatorItem.tags, 2, 'expected number of tags returned' + suffix); + } + }); + it('should return item collections in expected format', function() { + let getter = new Zotero.Translate.ItemGetter(); + + Zotero.DB.beginTransaction(); + + let items = getter._itemsLeft = [ + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // Not in collection + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // In a single collection + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), //In two collections + Zotero.Items.get((new Zotero.Item('journalArticle')).save()) // In a nested collection + ]; + + let collections = [ + Zotero.Collections.add('test1'), + Zotero.Collections.add('test2') + ]; + collections.push(Zotero.Collections.add('subTest1', collections[0].id)); + collections.push(Zotero.Collections.add('subTest2', collections[1].id)); + + collections[0].addItems([items[1].id, items[2].id]); + collections[1].addItem(items[2].id); + collections[2].addItem(items[3].id); + + Zotero.DB.commitTransaction(); + + let translatorItem = getter.nextItem(); + assert.isArray(translatorItem.collections, 'item in library root has a collections array'); + assert.equal(translatorItem.collections.length, 0, 'item in library root does not list any collections'); + + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.collections, 'item in a single collection has a collections array'); + assert.equal(translatorItem.collections.length, 1, 'item in a single collection lists one collection'); + assert.equal(translatorItem.collections[0], collections[0].key, 'item in a single collection identifies correct collection'); + + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.collections, 'item in two collections has a collections array'); + assert.equal(translatorItem.collections.length, 2, 'item in two collections lists two collections'); + assert.deepEqual( + translatorItem.collections.sort(), + [collections[0].key, collections[1].key].sort(), + 'item in two collections identifies correct collections' + ); + + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.collections, 'item in a nested collection has a collections array'); + assert.equal(translatorItem.collections.length, 1, 'item in a single nested collection lists one collection'); + assert.equal(translatorItem.collections[0], collections[2].key, 'item in a single collection identifies correct collection'); + }); + it('should return item relations in expected format', function() { + let getter = new Zotero.Translate.ItemGetter(); + + Zotero.DB.beginTransaction(); + + let items = [ + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // Item with no relations + + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // Relation set on this item + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // To this item + + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // This item is related to two items below + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), // But this item is not related to the item below + Zotero.Items.get((new Zotero.Item('journalArticle')).save()) + ]; + + items[1].addRelatedItem(items[2].id); + items[1].save(); + + items[3].addRelatedItem(items[4].id); + items[3].addRelatedItem(items[5].id); + items[3].save(); + + Zotero.DB.commitTransaction(); + + getter._itemsLeft = items.slice(); + + let translatorItem = getter.nextItem(); + assert.isObject(translatorItem.relations, 'item with no relations has a relations object'); + assert.equal(Object.keys(translatorItem.relations).length, 0, 'item with no relations does not list any relations'); + + translatorItem = getter.nextItem(); + assert.isObject(translatorItem.relations, 'item that is the subject of a single relation has a relations object'); + assert.equal(Object.keys(translatorItem.relations).length, 1, 'item that is the subject of a single relation list one relations predicate'); + assert.isDefined(translatorItem.relations['dc:relation'], 'item that is the subject of a single relation uses "dc:relation" as the predicate'); + assert.isString(translatorItem.relations['dc:relation'], 'item that is the subject of a single relation lists "dc:relation" object as a string'); + assert.equal(translatorItem.relations['dc:relation'], Zotero.URI.getItemURI(items[2]), 'item that is the subject of a single relation identifies correct object URI'); + + translatorItem = getter.nextItem(); + assert.isObject(translatorItem.relations, 'item that is the object of a single relation has a relations object'); + assert.equal(Object.keys(translatorItem.relations).length, 1, 'item that is the object of a single relation list one relations predicate'); + assert.isDefined(translatorItem.relations['dc:relation'], 'item that is the object of a single relation uses "dc:relation" as the predicate'); + assert.isString(translatorItem.relations['dc:relation'], 'item that is the object of a single relation lists "dc:relation" object as a string'); + assert.equal(translatorItem.relations['dc:relation'], Zotero.URI.getItemURI(items[1]), 'item that is the object of a single relation identifies correct subject URI'); + + translatorItem = getter.nextItem(); + assert.isObject(translatorItem.relations, 'item that is the subject of two relations has a relations object'); + assert.equal(Object.keys(translatorItem.relations).length, 1, 'item that is the subject of two relations list one relations predicate'); + assert.isDefined(translatorItem.relations['dc:relation'], 'item that is the subject of two relations uses "dc:relation" as the predicate'); + assert.isArray(translatorItem.relations['dc:relation'], 'item that is the subject of two relations lists "dc:relation" object as an array'); + assert.equal(translatorItem.relations['dc:relation'].length, 2, 'item that is the subject of two relations lists two relations in the "dc:relation" array'); + assert.deepEqual(translatorItem.relations['dc:relation'].sort(), + [Zotero.URI.getItemURI(items[4]), Zotero.URI.getItemURI(items[5])].sort(), + 'item that is the subject of two relations identifies correct object URIs' + ); + + translatorItem = getter.nextItem(); + assert.isObject(translatorItem.relations, 'item that is the object of one relation from item with two relations has a relations object'); + assert.equal(Object.keys(translatorItem.relations).length, 1, 'item that is the object of one relation from item with two relations list one relations predicate'); + assert.isDefined(translatorItem.relations['dc:relation'], 'item that is the object of one relation from item with two relations uses "dc:relation" as the predicate'); + assert.isString(translatorItem.relations['dc:relation'], 'item that is the object of one relation from item with two relations lists "dc:relation" object as a string'); + assert.equal(translatorItem.relations['dc:relation'], Zotero.URI.getItemURI(items[3]), 'item that is the object of one relation from item with two relations identifies correct subject URI'); + }); + it('should return standalone note in expected format', function () { + let relatedItem = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + + Zotero.DB.beginTransaction(); + + let note = new Zotero.Item('note'); + note.setNote('Note'); + note = Zotero.Items.get(note.save()); + + note.addRelatedItem(relatedItem.id); + note.save(); + + let collection = Zotero.Collections.add('test'); + collection.addItem(note.id); + + note.addTag('automaticTag', 0); + note.addTag('manualTag', 1); + + Zotero.DB.commitTransaction(); + + let legacyMode = [false, true]; + for (let i=0; i<legacyMode.length; i++) { + let getter = new Zotero.Translate.ItemGetter(); + getter._itemsLeft = [note]; + let legacy = getter.legacy = legacyMode[i]; + let suffix = legacy ? ' in legacy mode' : ''; + + let translatorNote = getter.nextItem(); + assert.isDefined(translatorNote, 'returns standalone note' + suffix); + assert.equal(translatorNote.itemType, 'note', 'itemType is correct' + suffix); + assert.equal(translatorNote.note, 'Note', 'note is correct' + suffix); + + assert.isString(translatorNote.dateAdded, 'dateAdded is string' + suffix); + assert.isString(translatorNote.dateModified, 'dateModified is string' + suffix); + + if (legacy) { + assert.isTrue(sqlDateTimeRe.test(translatorNote.dateAdded), 'dateAdded is in correct format' + suffix); + assert.isTrue(sqlDateTimeRe.test(translatorNote.dateModified), 'dateModified is in correct format' + suffix); + + assert.isNumber(translatorNote.itemID, 'itemID is set' + suffix); + assert.isString(translatorNote.key, 'key is set' + suffix); + } else { + assert.isTrue(isoDateTimeRe.test(translatorNote.dateAdded), 'dateAdded is in correct format' + suffix); + assert.isTrue(isoDateTimeRe.test(translatorNote.dateModified), 'dateModified is in correct format' + suffix); + } + + // Tags + assert.isArray(translatorNote.tags, 'contains tags as array' + suffix); + assert.equal(translatorNote.tags.length, 2, 'contains correct number of tags' + suffix); + let possibleTags = [ + { tag: 'automaticTag', type: 0 }, + { tag: 'manualTag', type: 1 } + ]; + for (let i=0; i<possibleTags.length; i++) { + let match = false; + for (let j=0; j<translatorNote.tags.length; j++) { + if (possibleTags[i].tag == translatorNote.tags[j].tag) { + let type = possibleTags[i].type; + if (!legacy && type == 0) type = undefined; + + assert.equal(translatorNote.tags[j].type, type, possibleTags[i].tag + ' tag is correct' + suffix); + match = true; + break; + } + } + assert.isTrue(match, 'has ' + possibleTags[i].tag + ' tag ' + suffix); + } + + // Relations + assert.isObject(translatorNote.relations, 'has relations as object' + suffix); + assert.equal(translatorNote.relations['dc:relation'], Zotero.URI.getItemURI(relatedItem), 'relation is correct' + suffix); + /** TODO: test other relations and multiple relations per predicate (should be an array) **/ + + if (!legacy) { + // Collections + assert.isArray(translatorNote.collections, 'has a collections array' + suffix); + assert.equal(translatorNote.collections.length, 1, 'lists one collection' + suffix); + assert.equal(translatorNote.collections[0], collection.key, 'identifies correct collection' + suffix); + } + } + }); + it('should return attached note in expected format', function () { + Zotero.DB.beginTransaction(); + + let relatedItem = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + + let items = [ + Zotero.Items.get((new Zotero.Item('journalArticle')).save()), + Zotero.Items.get((new Zotero.Item('journalArticle')).save()) + ]; + + let collection = Zotero.Collections.add('test'); + collection.addItem(items[0].id); + collection.addItem(items[1].id); + + let note = new Zotero.Item('note'); + note.setNote('Note'); + note = Zotero.Items.get(note.save()); + + note.addRelatedItem(relatedItem.id); + note.save(); + + note.addTag('automaticTag', 0); + note.addTag('manualTag', 1); + + Zotero.DB.commitTransaction(); + + let legacyMode = [false, true]; + for (let i=0; i<legacyMode.length; i++) { + let item = items[i]; + + let getter = new Zotero.Translate.ItemGetter(); + getter._itemsLeft = [item]; + let legacy = getter.legacy = legacyMode[i]; + let suffix = legacy ? ' in legacy mode' : ''; + + let translatorItem = getter.nextItem(); + assert.isArray(translatorItem.notes, 'item with no notes contains notes array' + suffix); + assert.equal(translatorItem.notes.length, 0, 'item with no notes contains empty notes array' + suffix); + + note.setSource(item.id); + note.save(); + + getter = new Zotero.Translate.ItemGetter(); + getter._itemsLeft = [item]; + getter.legacy = legacy; + + translatorItem = getter.nextItem(); + assert.isArray(translatorItem.notes, 'item with no notes contains notes array' + suffix); + assert.equal(translatorItem.notes.length, 1, 'item with one note contains array with one note' + suffix); + + let translatorNote = translatorItem.notes[0]; + assert.equal(translatorNote.itemType, 'note', 'itemType is correct' + suffix); + assert.equal(translatorNote.note, 'Note', 'note is correct' + suffix); + + assert.isString(translatorNote.dateAdded, 'dateAdded is string' + suffix); + assert.isString(translatorNote.dateModified, 'dateModified is string' + suffix); + + if (legacy) { + assert.isTrue(sqlDateTimeRe.test(translatorNote.dateAdded), 'dateAdded is in correct format' + suffix); + assert.isTrue(sqlDateTimeRe.test(translatorNote.dateModified), 'dateModified is in correct format' + suffix); + + assert.isNumber(translatorNote.itemID, 'itemID is set' + suffix); + assert.isString(translatorNote.key, 'key is set' + suffix); + } else { + assert.isTrue(isoDateTimeRe.test(translatorNote.dateAdded), 'dateAdded is in correct format' + suffix); + assert.isTrue(isoDateTimeRe.test(translatorNote.dateModified), 'dateModified is in correct format' + suffix); + } + + // Tags + assert.isArray(translatorNote.tags, 'contains tags as array' + suffix); + assert.equal(translatorNote.tags.length, 2, 'contains correct number of tags' + suffix); + let possibleTags = [ + { tag: 'automaticTag', type: 0 }, + { tag: 'manualTag', type: 1 } + ]; + for (let i=0; i<possibleTags.length; i++) { + let match = false; + for (let j=0; j<translatorNote.tags.length; j++) { + if (possibleTags[i].tag == translatorNote.tags[j].tag) { + let type = possibleTags[i].type; + if (!legacy && type == 0) type = undefined; + + assert.equal(translatorNote.tags[j].type, type, possibleTags[i].tag + ' tag is correct' + suffix); + match = true; + break; + } + } + assert.isTrue(match, 'has ' + possibleTags[i].tag + ' tag ' + suffix); + } + + // Relations + assert.isObject(translatorNote.relations, 'has relations as object' + suffix); + assert.equal(translatorNote.relations['dc:relation'], Zotero.URI.getItemURI(relatedItem), 'relation is correct' + suffix); + /** TODO: test other relations and multiple relations per predicate (should be an array) **/ + + if (!legacy) { + // Collections + assert.isArray(translatorNote.collections, 'has a collections array' + suffix); + assert.equal(translatorNote.collections.length, 0, 'does not list collections for parent item' + suffix); + } + } + }); + it('should return stored/linked file and URI attachments in expected format', Q.async(function () { + let file = getTestDataDirectory(); + file.append("empty.pdf"); + + Zotero.DB.beginTransaction(); + + let item = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + let relatedItem = Zotero.Items.get((new Zotero.Item('journalArticle')).save()); + + // Attachment items + let attachments = [ + Zotero.Items.get(Zotero.Attachments.importFromFile(file)), // Standalone stored file + Zotero.Items.get(Zotero.Attachments.linkFromFile(file)), // Standalone link to file + Zotero.Items.get(Zotero.Attachments.importFromFile(file, item.id)), // Attached stored file + Zotero.Items.get(Zotero.Attachments.linkFromFile(file, item.id)), // Attached link to file + Zotero.Items.get(Zotero.Attachments.linkFromURL('http://example.com', item.id, 'application/pdf', 'empty.pdf')) // Attached link to URL + ]; + + // Make sure all fields are populated + for (let i=0; i<attachments.length; i++) { + let attachment = attachments[i]; + attachment.setField('accessDate', '2001-02-03 12:13:14'); + attachment.attachmentCharset = Zotero.CharacterSets.getID('utf-8'); + attachment.setField('url', 'http://example.com'); + attachment.setNote('note'); + + attachment.addTag('automaticTag', 0); + attachment.addTag('manualTag', 1); + + attachment.addRelatedItem(relatedItem.id); + + attachment.save(); + } + + Zotero.DB.commitTransaction(); + + let items = [ attachments[0], attachments[1], item ]; // Standalone attachments and item with child attachments + + // Run tests + let legacyMode = [false, true]; + for (let i=0; i<legacyMode.length; i++) { + let getter = new Zotero.Translate.ItemGetter(); + getter._itemsLeft = items.slice(); + + let exportDir = yield getTempDirectory(); + getter._exportFileDirectory = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsILocalFile); + getter._exportFileDirectory.initWithPath(exportDir); + + let legacy = getter.legacy = legacyMode[i]; + let suffix = legacy ? ' in legacy mode' : ''; + + // Gather all standalone and child attachments into a single array, + // since tests are mostly the same + let translatorAttachments = [], translatorItem; + let itemsLeft = items.length, attachmentsLeft = attachments.length; + while (translatorItem = getter.nextItem()) { + assert.isString(translatorItem.itemType, 'itemType is set' + suffix); + + // Standalone attachments + if (translatorItem.itemType == 'attachment') { + translatorAttachments.push({ + child: false, + attachment: translatorItem + }); + attachmentsLeft--; + + // Child attachments + } else if (translatorItem.itemType == 'journalArticle') { + assert.isArray(translatorItem.attachments, 'item contains attachment array' + suffix); + assert.equal(translatorItem.attachments.length, 3, 'attachment array contains all items' + suffix); + + for (let i=0; i<translatorItem.attachments.length; i++) { + let attachment = translatorItem.attachments[i]; + assert.equal(attachment.itemType, 'attachment', 'item attachment is of itemType "attachment"' + suffix); + + translatorAttachments.push({ + child: true, + attachment: attachment + }); + + attachmentsLeft--; + } + + // Unexpected + } else { + assert.fail(translatorItem.itemType, 'attachment or journalArticle', 'expected itemType returned'); + } + + itemsLeft--; + } + + assert.equal(itemsLeft, 0, 'all items returned by getter'); + assert.equal(attachmentsLeft, 0, 'all attachments returned by getter'); + + // Since we make no guarantees on the order of child attachments, + // we have to rely on URI as the identifier + let uriMap = {}; + for (let i=0; i<attachments.length; i++) { + uriMap[Zotero.URI.getItemURI(attachments[i])] = attachments[i]; + } + + for (let j=0; j<translatorAttachments.length; j++) { + let childAttachment = translatorAttachments[j].child; + let attachment = translatorAttachments[j].attachment; + assert.isString(attachment.uri, 'uri is set' + suffix); + + let zoteroItem = uriMap[attachment.uri]; + assert.isDefined(zoteroItem, 'uri is correct' + suffix); + delete uriMap[attachment.uri]; + + let storedFile = zoteroItem.attachmentLinkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE + || zoteroItem.attachmentLinkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL; + let linkToURL = zoteroItem.attachmentLinkMode == Zotero.Attachments.LINK_MODE_LINKED_URL; + + let prefix = (childAttachment ? 'attached ' : '') + + (storedFile ? 'stored ' : 'link to ') + + (linkToURL ? 'URL ' : 'file '); + + // Set fields + assert.equal(attachment.itemType, 'attachment', prefix + 'itemType is correct' + suffix); + assert.equal(attachment.title, 'empty.pdf', prefix + 'title is correct' + suffix); + assert.equal(attachment.url, 'http://example.com', prefix + 'url is correct' + suffix); + assert.equal(attachment.charset, 'utf-8', prefix + 'charset is correct' + suffix); + assert.equal(attachment.note, 'note', prefix + 'note is correct' + suffix); + + // Automatically set fields + assert.isString(attachment.dateAdded, prefix + 'dateAdded is set' + suffix); + assert.isString(attachment.dateModified, prefix + 'dateModified is set' + suffix); + + // Legacy mode fields + if (legacy) { + assert.isNumber(attachment.itemID, prefix + 'itemID is set' + suffix); + assert.isString(attachment.key, prefix + 'key is set' + suffix); + assert.equal(attachment.mimeType, 'application/pdf', prefix + 'mimeType is correct' + suffix); + + assert.equal(attachment.accessDate, '2001-02-03 12:13:14', prefix + 'accessDate is correct' + suffix); + + assert.isTrue(sqlDateTimeRe.test(attachment.dateAdded), prefix + 'dateAdded matches SQL format' + suffix); + assert.isTrue(sqlDateTimeRe.test(attachment.dateModified), prefix + 'dateModified matches SQL format' + suffix); + } else { + assert.equal(attachment.contentType, 'application/pdf', prefix + 'contentType is correct' + suffix); + + assert.equal(attachment.accessDate, '2001-02-03T12:13:14Z', prefix + 'accessDate is correct' + suffix); + + assert.isTrue(isoDateTimeRe.test(attachment.dateAdded), prefix + 'dateAdded matches ISO-8601 format' + suffix); + assert.isTrue(isoDateTimeRe.test(attachment.dateModified), prefix + 'dateModified matches ISO-8601 format' + suffix); + } + + if (!linkToURL) { + // localPath + assert.isString(attachment.localPath, prefix + 'localPath is set' + suffix); + let attachmentFile = Components.classes["@mozilla.org/file/local;1"] + .createInstance(Components.interfaces.nsILocalFile); + attachmentFile.initWithPath(attachment.localPath); + assert.isTrue(attachmentFile.exists(), prefix + 'localPath points to a file' + suffix); + assert.isTrue(attachmentFile.equals(attachments[j].getFile(null, true)), prefix + 'localPath points to the correct file' + suffix); + + assert.equal(attachment.filename, 'empty.pdf', prefix + 'filename is correct' + suffix); + assert.equal(attachment.defaultPath, 'files/' + attachments[j].id + '/' + attachment.filename, prefix + 'defaultPath is correct' + suffix); + + // saveFile function + assert.isFunction(attachment.saveFile, prefix + 'has saveFile function' + suffix); + attachment.saveFile(attachment.defaultPath); + assert.equal(attachment.path, OS.Path.join(exportDir, OS.Path.normalize(attachment.defaultPath)), prefix + 'path is set correctly after saveFile call' + suffix); + + let fileExists = yield OS.File.exists(attachment.path); + assert.isTrue(fileExists, prefix + 'file was copied to the correct path by saveFile function' + suffix); + fileExists = yield OS.File.exists(attachment.localPath); + assert.isTrue(fileExists, prefix + 'file was not removed from original location' + suffix); + + assert.throws(attachment.saveFile.bind(attachment, attachment.defaultPath), /^ERROR_FILE_EXISTS /, prefix + 'saveFile does not overwrite existing file by default' + suffix); + assert.throws(attachment.saveFile.bind(attachment, 'file/../../'), /./, prefix + 'saveFile does not allow exporting outside export directory' + suffix); + /** TODO: check if overwriting existing file works **/ + } + + // Tags + assert.isArray(attachment.tags, prefix + 'contains tags as array' + suffix); + assert.equal(attachment.tags.length, 2, prefix + 'contains correct number of tags' + suffix); + let possibleTags = [ + { tag: 'automaticTag', type: 0 }, + { tag: 'manualTag', type: 1 } + ]; + for (let i=0; i<possibleTags.length; i++) { + let match = false; + for (let j=0; j<attachment.tags.length; j++) { + if (possibleTags[i].tag == attachment.tags[j].tag) { + let type = possibleTags[i].type; + if (!legacy && type == 0) type = undefined; + + assert.equal(attachment.tags[j].type, type, prefix + possibleTags[i].tag + ' tag is correct' + suffix); + match = true; + break; + } + } + assert.isTrue(match, prefix + ' has ' + possibleTags[i].tag + ' tag ' + suffix); + } + + // Relations + assert.isObject(attachment.relations, prefix + 'has relations as object' + suffix); + assert.equal(attachment.relations['dc:relation'], Zotero.URI.getItemURI(relatedItem), prefix + 'relation is correct' + suffix); + /** TODO: test other relations and multiple relations per predicate (should be an array) **/ + } + } + })); + }); +}); +\ No newline at end of file diff --git a/test/tests/utilities.js b/test/tests/utilities.js @@ -172,4 +172,105 @@ describe("Zotero.Utilities", function() { assert.equal(cleanISSN('<b>ISSN</b>:1234\xA0-\t5679(print)\n<b>eISSN (electronic)</b>:0028-0836'), '1234-5679'); }); }); + describe("itemToCSLJSON", function() { + it("should accept Zotero.Item and Zotero export item format", function() { + let data = populateDBWithSampleData(loadSampleData('journalArticle')); + let item = Zotero.Items.get(data.journalArticle.id); + + let fromZoteroItem; + try { + fromZoteroItem = Zotero.Utilities.itemToCSLJSON(item); + } catch(e) { + assert.fail(e, null, 'accepts Zotero Item'); + } + assert.isObject(fromZoteroItem, 'converts Zotero Item to object'); + assert.isNotNull(fromZoteroItem, 'converts Zotero Item to non-null object'); + + + let fromExportItem; + try { + fromExportItem = Zotero.Utilities.itemToCSLJSON( + Zotero.Utilities.Internal.itemToExportFormat(item) + ); + } catch(e) { + assert.fail(e, null, 'accepts Zotero export item'); + } + assert.isObject(fromExportItem, 'converts Zotero export item to object'); + assert.isNotNull(fromExportItem, 'converts Zotero export item to non-null object'); + + assert.deepEqual(fromZoteroItem, fromExportItem, 'conversion from Zotero Item and from export item are the same'); + }); + it("should convert standalone notes to expected format", function() { + let note = new Zotero.Item('note'); + note.setNote('Some note longer than 50 characters, which will become the title.'); + note = Zotero.Items.get(note.save()); + + let cslJSONNote = Zotero.Utilities.itemToCSLJSON(note); + assert.equal(cslJSONNote.type, 'article', 'note is exported as "article"'); + assert.equal(cslJSONNote.title, note.getNoteTitle(), 'note title is set to Zotero pseudo-title'); + }); + it("should convert standalone attachments to expected format", function() { + let file = getTestDataDirectory(); + file.append("empty.pdf"); + + let attachment = Zotero.Items.get(Zotero.Attachments.importFromFile(file)); + attachment.setField('title', 'Empty'); + attachment.setField('accessDate', '2001-02-03 12:13:14'); + attachment.setField('url', 'http://example.com'); + attachment.setNote('Note'); + + attachment.save(); + + cslJSONAttachment = Zotero.Utilities.itemToCSLJSON(attachment); + assert.equal(cslJSONAttachment.type, 'article', 'attachment is exported as "article"'); + assert.equal(cslJSONAttachment.title, 'Empty', 'attachment title is correct'); + assert.deepEqual(cslJSONAttachment.accessed, {"date-parts":[["2001",2,3]]}, 'attachment access date is mapped correctly'); + }); + it("should refuse to convert unexpected item types", function() { + let data = populateDBWithSampleData(loadSampleData('journalArticle')); + let item = Zotero.Items.get(data.journalArticle.id); + + let exportFormat = Zotero.Utilities.Internal.itemToExportFormat(item); + exportFormat.itemType = 'foo'; + + assert.throws(Zotero.Utilities.itemToCSLJSON.bind(Zotero.Utilities, exportFormat), /^Unexpected Zotero Item type ".*"$/, 'throws an error when trying to map invalid item types'); + }); + it("should map additional fields from Extra field", function() { + let item = new Zotero.Item('journalArticle'); + item.setField('extra', 'PMID: 12345\nPMCID:123456'); + item = Zotero.Items.get(item.save()); + + let cslJSON = Zotero.Utilities.itemToCSLJSON(item); + + assert.equal(cslJSON.PMID, '12345', 'PMID from Extra is mapped to PMID'); + assert.equal(cslJSON.PMCID, '123456', 'PMCID from Extra is mapped to PMCID'); + + item.setField('extra', 'PMID: 12345'); + item.save(); + cslJSON = Zotero.Utilities.itemToCSLJSON(item); + + assert.equal(cslJSON.PMID, '12345', 'single-line entry is extracted correctly'); + + item.setField('extra', 'some junk: note\nPMID: 12345\nstuff in-between\nPMCID: 123456\nlast bit of junk!'); + item.save(); + cslJSON = Zotero.Utilities.itemToCSLJSON(item); + + assert.equal(cslJSON.PMID, '12345', 'PMID from mixed Extra field is mapped to PMID'); + assert.equal(cslJSON.PMCID, '123456', 'PMCID from mixed Extra field is mapped to PMCID'); + + item.setField('extra', 'a\n PMID: 12345\nfoo PMCID: 123456'); + item.save(); + cslJSON = Zotero.Utilities.itemToCSLJSON(item); + + assert.isUndefined(cslJSON.PMCID, 'field label must not be preceded by other text'); + assert.isUndefined(cslJSON.PMID, 'field label must not be preceded by a space'); + assert.equal(cslJSON.note, 'a\n PMID: 12345\nfoo PMCID: 123456', 'note is left untouched if nothing is extracted'); + + item.setField('extra', 'something\npmid: 12345\n'); + item.save(); + cslJSON = Zotero.Utilities.itemToCSLJSON(item); + + assert.isUndefined(cslJSON.PMID, 'field labels are case-sensitive'); + }); + }); });