Nicolas Franck
and 1 contributors

NAME

Catmandu::Importer::AlephX - Package that imports metadata records from the AlephX service

SYNOPSIS

    use Catmandu::Importer::AlephX;

    my $importer = Catmandu::Importer::AlephX->new(
                        url => 'http://ram19:8995/X' ,
                        query => 'WRD=(art)' ,
                        base => 'usm01' ,
                        );

    my $n = $importer->each(sub {
        my $r = $_[0];
        # ...
        say Dumper($r->{record});
        say Dumper($r->{items});
    });

METHODS

new(url => '...' , base => '...' , query => '...')

Create a new AlephX importer. Required parameters are the url baseUrl of the AlephX service, an Aleph 'base' catalog name and a 'query'.

common parameters

    url             base url of alephx service (e.g. "http://ram19:8995/X")
    include_items   0|1. When set to '1', the items of every bibliographical record  are retrieved
    

alephx parameters

    base    name of catalog in Aleph where you want to search    
    query   the query of course

output

  {
    record => [
      [
        'FMT',
        '',
        '',
        '_',
        'MX'
      ],
      [
        'LDR',
        '',
        '',
        '_',
        '01236npca^22001937|^4500'
      ]
      ..
    ],
    items => [
      {
        'sub-library' => 'WID',
        'chronological-k' => '',
        'chronological-i' => '',
        'library' => 'USM50',
        'collection' => 'HD',
        'call-no-1' => '$$2ZHCL$$hH 810.80.20',
        'chronological-j' => '',
        'requested' => 'N',
        'expected' => 'N',
        'barcode' => 'HWM4M4',
        'description' => '',
        'note' => '',
        'item-status' => '01',
        'rec-key' => '000048762000010',
        'enumeration-a' => '',
        'call-no-2' => '',
        'enumeration-b' => '',
        'enumeration-c' => '',
        'on-hold' => 'N'
      }
    ]

  }

count

each(&callback)

...

Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited. The Catmandu::Importer::AlephX methods are not idempotent: Twitter feeds can only be read once.

AUTHOR

Patrick Hochstenbach patrick dot hochstenbach at ugent dot be

SEE ALSO

Catmandu::Iterable