You are here

function biblio_get_field_map in Bibliography Module 6

5 calls to biblio_get_field_map()
biblio_admin_field_mapper_form in ./biblio.admin.inc
en7_field_map in ./endnote7_parser.inc
en8_parser_field_map in ./endnote8_parser.inc
tagged_field_map in ./tagged_parser.inc
_unixref_field_map in ./crossref_unixref_parser.inc

File

./biblio.type.mapper.inc, line 391

Code

function biblio_get_field_map($file_format, $default = FALSE) {
  if ($default) {
    switch ($file_format) {
      case 'bibtex':
        return array(
          'journal' => 'biblio_secondary_title',
          'booktitle' => 'biblio_secondary_title',
          'series' => 'biblio_secondary_title',
          'volume' => 'biblio_volume',
          'number' => 'biblio_number',
          'year' => 'biblio_year',
          'note' => 'biblio_notes',
          'month' => 'biblio_date',
          'pages' => 'biblio_pages',
          'publisher' => 'biblio_publisher',
          'school' => 'biblio_publisher',
          'organization' => 'biblio_publisher',
          'institution' => 'biblio_publisher',
          'type' => 'biblio_type_of_work',
          'edition' => 'biblio_edition',
          'chapter' => 'biblio_section',
          'address' => 'biblio_place_published',
          'abstract' => 'biblio_abst_e',
          'keywords' => 'biblio_keywords',
          'isbn' => 'biblio_isbn',
          'issn' => 'biblio_issn',
          'doi' => 'biblio_doi',
          'url' => 'biblio_url',
        );
      case 'tagged':
        return array(
          '%B' => 'biblio_secondary_title',
          '%C' => 'biblio_place_published',
          '%D' => 'biblio_year',
          '%F' => 'biblio_label',
          '%G' => 'biblio_lang',
          '%I' => 'biblio_publisher',
          '%J' => 'biblio_secondary_title',
          '%K' => 'biblio_keywords',
          '%L' => 'biblio_call_number',
          '%M' => 'biblio_accession_number',
          '%N' => 'biblio_issue',
          '%P' => 'biblio_pages',
          '%R' => 'biblio_doi',
          '%S' => 'biblio_tertiary_title',
          '%U' => 'biblio_url',
          '%V' => 'biblio_volume',
          '%X' => 'biblio_abst_e',
          '%Z' => 'biblio_notes',
          '%1' => 'biblio_custom1',
          '%2' => 'biblio_custom2',
          '%3' => 'biblio_custom3',
          '%4' => 'biblio_custom4',
          '%#' => 'biblio_custom5',
          '%$' => 'biblio_custom6',
          '%]' => 'biblio_custom7',
          '%6' => 'biblio_number_of_volumes',
          '%7' => 'biblio_edition',
          '%8' => 'biblio_date',
          '%9' => 'biblio_type_of_work',
          '%?' => '',
          '%@' => 'biblio_isbn',
          '%<' => 'biblio_research_notes',
          '%!' => 'biblio_short_title',
          '%&' => 'biblio_section',
          '%(' => 'biblio_original_publication',
          '%)' => 'biblio_reprint_edition',
          '%*' => '',
          '%+' => '',
        );
      case 'ris':
        return array(
          'ID' => '',
          //- Reference ID (not imported to reference software)
          'T1' => '',
          //- Primary title
          'TI' => '',
          //- Book title
          'CT' => '',
          //- Title of unpublished reference
          'A1' => '',
          //- Primary author
          'A2' => '',
          //- Secondary author (each name on separate line)
          'AU' => '',
          //- Author (syntax. Last name, First name, Suffix)
          'Y1' => '',
          //- Primary date
          'PY' => '',
          //- Publication year (YYYY/MM/DD)
          'N1' => 'biblio_notes',
          //- Notes
          'KW' => '',
          //- Keywords (each keyword must be on separate line preceded KW -)
          'RP' => '',
          //- Reprint status (IN FILE, NOT IN FILE, ON REQUEST (MM/DD/YY))
          'SP' => '',
          //- Start page number
          'EP' => '',
          //- Ending page number
          'JF' => 'biblio_secondary_title',
          //- Periodical full name
          'JO' => 'biblio_short_title',
          //- Periodical standard abbreviation
          'JA' => 'biblio_secondary_title',
          //- Periodical in which article was published
          'J1' => 'biblio_short_title',
          //- Periodical name //- User abbreviation 1
          'J2' => 'biblio_short_title',
          //- Periodical name - User abbreviation 2
          'VL' => 'biblio_volume',
          //- Volume number
          'IS' => 'biblio_issue',
          //- Issue number
          'CP' => 'biblio_issue',
          //- Issue number
          'T2' => 'biblio_secondary_title',
          //- Title secondary
          'CY' => 'biblio_place_published',
          //- City of Publication
          'PB' => 'biblio_publisher',
          //- Publisher
          'U1' => 'biblio_custom1',
          //- User definable 1
          'U2' => 'biblio_custom2',
          //- User definable 2
          'U3' => 'biblio_custom3',
          //- User definable 3
          'U4' => 'biblio_custom4',
          //- User definable 4
          'U5' => 'biblio_custom5',
          //- User definable 5
          'T3' => 'biblio_tertiary_title',
          //- Title series
          'AB' => 'biblio_abst_e',
          //- Abstract
          'N2' => 'biblio_abst_e',
          //- Abstract
          'SN' => 'biblio_isbn',
          //- ISSN/ISBN (e.g. ISSN XXXX-XXXX)
          'AV' => '',
          //- Availability
          'M1' => '',
          //- Misc. 1
          'M3' => '',
          //- Misc. 3
          'AD' => '',
          //- Address
          'UR' => 'biblio_url',
          //- Web/URL
          'L1' => '',
          //- Link to PDF
          'L2' => '',
          //- Link to Full-text
          'L3' => '',
          //- Related records
          'L4' => '',
          //- Images
          'ER' => '',
        );
      case 'endnote7':
        return array(
          'REFERENCE_TYPE' => 'biblio_type',
          'REFNUM' => '',
          'YEAR' => 'biblio_year',
          'SECONDARY_TITLE' => 'biblio_secondary_title',
          'PLACE_PUBLISHED' => 'biblio_place_published',
          'PUBLISHER' => 'biblio_publisher',
          'VOLUME' => 'biblio_volume',
          'ISSUE' => 'biblio_issue',
          'NUMBER_OF_VOLUMES' => 'biblio_number_of_volumes',
          'NUMBER' => 'biblio_number',
          'PAGES' => 'biblio_pages',
          'SECTION' => 'biblio_section',
          'TERTIARY_TITLE' => 'biblio_tertiary_title',
          'EDITION' => 'biblio_edition',
          'DATE' => 'biblio_date',
          'TYPE_OF_WORK' => 'biblio_type_of_work',
          'SHORT_TITLE' => 'biblio_short_title',
          'ALTERNATE_TITLE' => 'biblio_alternate_title',
          'ISBN' => 'biblio_isbn',
          'ORIGINAL_PUB' => 'biblio_original_publication',
          'REPRINT_EDITION' => 'biblio_reprint_edition',
          'REVIEWED_ITEM' => '',
          'CUSTOM1' => 'biblio_custom1',
          'CUSTOM2' => 'biblio_custom2',
          'CUSTOM3' => 'biblio_custom3',
          'CUSTOM4' => 'biblio_custom4',
          'CUSTOM5' => 'biblio_custom5',
          'CUSTOM6' => 'biblio_custom6',
          'ACCESSION_NUMBER' => 'biblio_accession_number',
          'CALL_NUMBER' => 'biblio_call_number',
          'LABEL' => 'biblio_label',
          'KEYWORD' => 'biblio_keywords',
          'ABSTRACT' => 'biblio_abst_e',
          'NOTES' => 'biblio_notes',
          'URL' => 'biblio_url',
          'AUTHOR_ADDRESS' => '',
          'IMAGE' => '',
          'CAPTION' => '',
        );
      case 'endnote8':
        return array(
          'source-app' => '',
          'rec-number' => '',
          'ref-type' => 'biblio_type',
          'auth-address' => 'biblio_auth_address',
          'auth-affiliaton' => '',
          'secondary-title' => 'biblio_secondary_title',
          'tertiary-title' => 'biblio_tertiary_title',
          'alt-title' => 'biblio_alternate_title',
          'short-title' => 'biblio_short_title',
          'translated-title' => 'biblio_translated_title',
          'full-title' => '',
          'abbr-1' => '',
          'abbr-2' => '',
          'abbr-3' => '',
          'pages' => 'biblio_pages',
          'volume' => 'biblio_volume',
          'number' => 'biblio_number',
          'issue' => 'biblio_issue',
          'secondary-volume' => '',
          'secondary-issue' => '',
          'num-vols' => 'biblio_number_of_volumes',
          'edition' => 'biblio_edition',
          'section' => 'biblio_section',
          'reprint-edition' => 'biblio_reprint_edition',
          'reprint-status' => '',
          'year' => 'biblio_year',
          'pub-dates' => 'biblio_date',
          'copyright-dates' => '',
          'pub-location' => 'biblio_place_published',
          'publisher' => 'biblio_publisher',
          'orig-pub' => 'biblio_original_publication',
          'isbn' => 'biblio_isbn',
          'accession-num' => 'biblio_accession_number',
          'call-num' => 'biblio_call_number',
          'report-id' => '',
          'coden' => '',
          'electronic-resource-num' => '',
          'abstract' => 'biblio_abst_e',
          'label' => 'biblio_label',
          'image' => '',
          'caption' => '',
          'notes' => 'biblio_notes',
          'research-notes' => 'biblio_research_notes',
          'work-type' => 'biblio_type_of_work',
          'reviewed-item' => '',
          'availability' => '',
          'remote-source' => '',
          'meeting-place' => '',
          'work-location' => '',
          'work-extent' => '',
          'pack-method' => '',
          'size' => '',
          'repro-ratio' => '',
          'remote-database-name' => 'biblio_remote_db_name',
          'remote-database-provider' => 'biblio_remote_db_provider',
          'language' => 'biblio_lang',
          'web-urls' => '',
          'pdf-urls' => '',
          'text-urls' => '',
          'image-urls' => '',
          'related-urls' => 'biblio_url',
          'access-date' => 'biblio_access_date',
          'modified-date' => '',
          'custom1' => 'biblio_custom1',
          'custom2' => 'biblio_custom2',
          'custom3' => 'biblio_custom3',
          'custom4' => 'biblio_custom4',
          'custom5' => 'biblio_custom5',
          'custom6' => 'biblio_custom6',
          'custom7' => 'biblio_custom7',
          'misc1' => '',
          'misc2' => '',
          'misc3' => '',
        );
      case 'unixref':
        return array(
          'publisher_place' => 'biblio_place_published',
          'publisher_name' => 'biblio_publisher',
          'volume' => 'biblio_volume',
          'number' => 'biblio_number',
          'issue' => 'biblio_issue',
          'edition_number' => 'biblio_edition',
          'section' => 'biblio_section',
          'doi' => 'doi',
          'title' => 'title',
          'isbn' => 'isbn',
          'issn' => 'issn',
          'first_page' => 'biblio_first_page',
          'last_page' => 'biblio_last_page',
          // Journal metadata
          'full_title' => 'biblio_secondary_title',
          'abbrev_title' => 'biblio_short_title',
          // Conference metadata
          'conference_location' => 'biblio_place_published',
          'conference_name' => 'biblio_secondary_title',
          'conference_acronym' => 'biblio_short_title',
          // Proceedings metadata
          'proceedings_title' => 'biblio_secondary_title',
          'year' => 'year',
          'month' => 'month',
          'day' => 'day',
          'degree' => 'biblio_type_of_work',
          'error' => 'error',
          'language' => 'biblio_lang',
        );
    }
  }
  else {
    $map = variable_get('biblio_' . $file_format . '_field_map', array());
    if (empty($map)) {
      $map = biblio_get_field_map($file_format, TRUE);
    }
    return $map;
  }
}