You are here

function _biblio_feeds_oai_importer_default in Bibliography Module 7

Same name and namespace in other branches
  1. 7.2 includes/biblio.feeds.inc \_biblio_feeds_oai_importer_default()
1 call to _biblio_feeds_oai_importer_default()
biblio_feeds_importer_default in ./biblio.module

File

includes/biblio.feeds.inc, line 131

Code

function _biblio_feeds_oai_importer_default() {
  $feeds_importer = new stdClass();
  $feeds_importer->disabled = FALSE;

  /* Edit this to true to make a default feeds_importer disabled initially */
  $feeds_importer->api_version = 1;
  $feeds_importer->id = 'biblio_oai_pmh';
  $feeds_importer->config = array(
    'name' => 'Biblio OAI-PMH',
    'description' => 'Import an OAI-PMH feed into the Biblio node type.',
    'fetcher' => array(
      'plugin_key' => 'FeedsOAIHTTPFetcher',
      'config' => array(
        'auto_detect_feeds' => FALSE,
        'use_pubsubhubbub' => FALSE,
        'last_fetched_timestamp' => '',
        'earliest_timestamp' => '',
        'use_dates' => FALSE,
        'to' => array(),
        'from' => array(),
      ),
    ),
    'parser' => array(
      'plugin_key' => 'FeedsOAIParser',
      'config' => array(),
    ),
    'processor' => array(
      'plugin_key' => 'FeedsNodeProcessor',
      'config' => array(
        'content_type' => 'biblio',
        'expire' => '-1',
        'author' => 0,
        'mappings' => array(
          0 => array(
            'source' => 'title',
            'target' => 'title',
            'unique' => 0,
          ),
          1 => array(
            'source' => 'publisher',
            'target' => 'biblio_publisher',
            'unique' => FALSE,
          ),
          2 => array(
            'source' => 'subject',
            'target' => 'biblio_keyword',
            'unique' => FALSE,
          ),
          3 => array(
            'source' => 'source',
            'target' => 'biblio_secondary_title',
            'unique' => FALSE,
          ),
          4 => array(
            'source' => 'guid',
            'target' => 'guid',
            'unique' => 1,
          ),
          5 => array(
            'source' => 'creator',
            'target' => 'biblio_contributor',
            'unique' => FALSE,
          ),
          6 => array(
            'source' => 'description',
            'target' => 'biblio_abst_e',
            'unique' => FALSE,
          ),
          7 => array(
            'source' => 'contributor',
            'target' => 'biblio_contributor',
            'unique' => FALSE,
          ),
          8 => array(
            'source' => 'identifier',
            'target' => 'biblio_url',
            'unique' => FALSE,
          ),
          9 => array(
            'source' => 'date',
            'target' => 'biblio_year',
            'unique' => FALSE,
          ),
          10 => array(
            'source' => 'setspec_raw',
            'target' => 'biblio_type',
            'unique' => FALSE,
          ),
        ),
        'update_existing' => '0',
        'input_format' => 'plain_text',
      ),
    ),
    'content_type' => '',
    'update' => 0,
    'import_period' => '1800',
    'expire_period' => 3600,
    'import_on_create' => 1,
    'process_in_background' => 0,
  );
  return array(
    'biblio_oai' => $feeds_importer,
  );
}