You are here

public function BiblioStyleBibtex::getMapping in Bibliography Module 7.3

Mapping of Biblio and BibTeX.

  • type: Array with the Biblio type as key, and the BibTeX type as the value.
  • field: Array with field mapping, keyed by BibTeX name, and the Biblio field as the value.

Overrides BiblioStyleBase::getMapping

3 calls to BiblioStyleBibtex::getMapping()
BiblioStyleBibtex::importData in plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php
@inheritdoc
BiblioStyleBibtex::importGeneric in plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php
Import a generic property.
BiblioStyleBibtex::render in plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php
@inheritdoc

File

plugins/biblio_style/bibtex/BiblioStyleBibtex.class.php, line 568
BibTeX style.

Class

BiblioStyleBibtex
@file BibTeX style.

Code

public function getMapping() {
  $return = array(
    'field' => array(
      'abstract' => array(
        'property' => 'biblio_abstract',
      ),
      'address' => array(
        'property' => 'biblio_place_published',
      ),
      // @todo: Use bilbio_file instead.
      'attachments' => array(
        'property' => 'biblio_image',
        'method' => 'renderEntryFiles',
      ),
      'author' => array(
        'property' => 'contributor_field_collection',
        'method' => 'formatContributorAuthor',
      ),
      'bibtex' => array(
        'property' => 'bibtext',
        'method' => 'formatBibText',
        'use_key' => FALSE,
      ),
      'bibtexCitation' => array(
        'property' => 'biblio_citekey',
      ),
      'booktitle' => array(
        'property' => 'booktitle',
        'method' => 'formatBookTitle',
      ),
      'chapter' => array(
        'property' => 'biblio_section',
      ),
      'doi' => array(
        'property' => 'biblio_doi',
      ),
      'editor' => array(
        'property' => 'contributor_field_collection',
        'method' => 'formatContributorEditor',
      ),
      'edition' => array(
        'property' => 'biblio_edition',
      ),
      // @todo: Special entry types?
      'isbn' => array(
        'property' => 'biblio_isbn',
      ),
      'issn' => array(
        'property' => 'biblio_issn',
      ),
      'institution' => array(
        'property' => 'institution',
        'method' => 'formatInstitution',
      ),
      'journal' => array(
        'property' => 'journal',
        'method' => 'formatJournal',
      ),
      'keywords' => array(
        'property' => 'biblio_keywords',
        'method' => 'formatKeywords',
        'import_method' => 'importKeywords',
      ),
      'month' => array(
        'property' => 'biblio_date',
      ),
      'note' => array(
        'property' => 'biblio_notes',
      ),
      'number' => array(
        'property' => 'biblio_number',
      ),
      'organization' => array(
        'property' => 'organization',
        'method' => 'formatOrganization',
      ),
      'pages' => array(
        'property' => 'biblio_pages',
      ),
      'publisher' => array(
        'property' => 'biblio_publisher',
        'import_method' => 'importPublisher',
        'method' => 'formatPublisher',
      ),
      // @todo: Is it ok to have this "fake" keys, or add this as property
      // to the array?
      'school' => array(
        'property' => 'school',
        'method' => 'formatSchool',
      ),
      'series' => array(
        'property' => 'series',
        'method' => 'formatSeries',
      ),
      'secondary_title' => array(
        'property' => 'biblio_secondary_title',
        'import_method' => 'importSecondaryTitle',
      ),
      'title' => array(
        'property' => 'title',
      ),
      // Keys used for import.
      'tertiary_title' => array(
        'property' => 'biblio_tertiary_title',
        'import_method' => 'importTertiaryTitle',
      ),
      // @todo: Is this the Biblio URL?
      'url' => array(
        'property' => 'biblio_url',
      ),
      'volume' => array(
        'property' => 'biblio_volume',
      ),
      'year' => array(
        'property' => 'biblio_year',
      ),
    ),
    'type' => array(
      'article' => 'journal_article',
      'book' => 'book',
      'booklet' => 'miscellaneous',
      'conference' => 'conference_paper',
      'inbook' => 'book_chapter',
      'incollection' => 'book_chapter',
      'inproceedings' => 'conference_paper',
      'manual' => 'miscellaneous',
      'mastersthesis' => 'thesis',
      'misc' => 'miscellaneous',
      'phdthesis' => 'thesis',
      'proceedings' => 'conference_proceedings',
      'techreport' => 'report',
      'unpublished' => 'unpublished',
    ),
  );

  // Assign default method to format entry.
  foreach ($return['field'] as $key => $value) {
    $return['field'][$key] += array(
      'method' => 'formatGeneric',
      'import_method' => 'importGeneric',
      'use_key' => TRUE,
    );
  }
  return $return;
}