|
// |
|
// Ported from cite.js in the Zotero client |
|
// |
|
|
|
/** |
|
* Mappings for names |
|
* Note that this is the reverse of the text variable map, since all mappings should be one to one |
|
* and it makes the code cleaner |
|
*/ |
|
private static $zoteroNameMap = array( |
|
"author" => "author", |
|
"editor" => "editor", |
|
"bookAuthor" => "container-author", |
|
"composer" => "composer", |
|
"interviewer" => "interviewer", |
|
"recipient" => "recipient", |
|
"seriesEditor" => "collection-editor", |
|
"translator" => "translator" |
|
); |
|
|
|
/** |
|
* Mappings for text variables |
|
*/ |
|
private static $zoteroFieldMap = array( |
|
"title" => array("title"), |
|
"container-title" => array("publicationTitle", "reporter", "code"), /* reporter and code should move to SQL mapping tables */ |
|
"collection-title" => array("seriesTitle", "series"), |
|
"collection-number" => array("seriesNumber"), |
|
"publisher" => array("publisher", "distributor"), /* distributor should move to SQL mapping tables */ |
|
"publisher-place" => array("place"), |
|
"authority" => array("court"), |
|
"page" => array("pages"), |
|
"volume" => array("volume"), |
|
"issue" => array("issue"), |
|
"number-of-volumes" => array("numberOfVolumes"), |
|
"number-of-pages" => array("numPages"), |
|
"edition" => array("edition"), |
|
"version" => array("versionNumber"), |
|
"section" => array("section"), |
|
"genre" => array("type", "artworkSize"), /* artworkSize should move to SQL mapping tables, or added as a CSL variable */ |
|
"medium" => array("medium", "system"), |
|
"archive" => array("archive"), |
|
"archive_location" => array("archiveLocation"), |
|
"event" => array("meetingName", "conferenceName"), /* these should be mapped to the same base field in SQL mapping tables */ |
|
"event-place" => array("place"), |
|
"abstract" => array("abstractNote"), |
|
"URL" => array("url"), |
|
"DOI" => array("DOI"), |
|
"ISBN" => array("ISBN"), |
|
"call-number" => array("callNumber"), |
|
"note" => array("extra"), |
|
"number" => array("number"), |
|
"references" => array("history"), |
|
"shortTitle" => array("shortTitle"), |
|
"journalAbbreviation" => array("journalAbbreviation"), |
|
"language" => array("language") |
|
); |
|
|
|
private static $zoteroDateMap = array( |
|
"issued" => "date", |
|
"accessed" => "accessDate" |
|
); |
|
|
|
private static $zoteroTypeMap = array( |
|
'book' => "book", |
|
'bookSection' => "chapter", |
|
'journalArticle' => "article-journal", |
|
'magazineArticle' => "article-magazine", |
|
'newspaperArticle' => "article-newspaper", |
|
'thesis' => "thesis", |
|
'encyclopediaArticle' => "entry-encyclopedia", |
|
'dictionaryEntry' => "entry-dictionary", |
|
'conferencePaper' => "paper-conference", |
|
'letter' => "personal_communication", |
|
'manuscript' => "manuscript", |
|
'interview' => "interview", |
|
'film' => "motion_picture", |
|
'artwork' => "graphic", |
|
'webpage' => "webpage", |
|
'report' => "report", |
|
'bill' => "bill", |
|
'case' => "legal_case", |
|
'hearing' => "bill", // ?? |
|
'patent' => "patent", |
|
'statute' => "bill", // ?? |
|
'email' => "personal_communication", |
|
'map' => "map", |
|
'blogPost' => "post-weblog", |
|
'instantMessage' => "personal_communication", |
|
'forumPost' => "post", |
|
'audioRecording' => "song", // ?? |
|
'presentation' => "speech", |
|
'videoRecording' => "motion_picture", |
|
'tvBroadcast' => "broadcast", |
|
'radioBroadcast' => "broadcast", |
|
'podcast' => "song", // ?? |
|
'computerProgram' => "book" // ?? |
|
); |
dataserver/model/Cite.inc.php
Lines 157 to 254 in 4a4af54