---
name: "Catmandu::Store::VIAF"
section: "3pm"
platform: "linux"
package: "libcatmandu-viaf-perl"
version: "0.05-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Store::VIAF"
---

# Catmandu::Store::VIAF(3pm)

Retrieve items from VIAF

## NAME

Catmandu::Store::VIAF - Retrieve items from VIAF

## SYNOPSIS

```
    # From the command line
    $ catmandu export VIAF --id 102333412 to YAML
    ---
    dcterms:identifier: '102333412'
    guid: http://viaf.org/viaf/102333412
    schema:birthDate: 1775-12-16
    schema:deathDate: 1817-07-18
    schema:description: English novelist
    skos:prefLabel: Jane Austen
    ...
    # From a Catmandu Fix
    lookup_in_store(
        objectName,    # objectName is a field containing the VIAF identifier
        VIAF
    )
    # From Perl code
    use Catmandu;
    my $store = Catmandu->store('VIAF')->bag;
    my $item = $store->get('102333412');
    print $item->{'skos:prefLabel'} , "\n";  # Jane Austen
```

## DESCRIPTION

A Catmandu::Store::VIAF is a Perl package that can query the \<VIAF\|http://viaf.org/\> authority file.

This store supports only one method `"get"` to retrieve an AAT record by its identifier

## CONFIGURATION

### lang

The `"lang"` parameter is optional and defaults to *nl-NL*. It sets the language of the returned *prefLabel*. If no *prefLabel* for the *viaf\_id* in provided *lang* exists, the *prefLabel* for the *fallback\_lang* is used.

### fallback\_lang

Optional. Default *en-US*.

## METHODS

### new(%configuration)

Create a new Catmandu::Store::VIAF

### get($id)

Retrieve a VIAF record given an identifier. Returns a record like:

```
  {
    'dcterms:identifier' => 'The identifier',
    'guid'               => 'The VIAF URL',
    'schema:birthDate'   => 'Birth date, if provided',
    'schema:deathDate'   => 'Death date, if provided',
    'schema:description' => 'Description, if provided',
    'skos:prefLabel'     => 'prefLabel, in lang or fallback_lang'
  }
```

### add()

Not supported

### delete()

Not supported

### each()

Not supported

## AUTHOR

Pieter De Praetere \<pieter at packed.be \>

## COPYRIGHT

Copyright 2017- PACKED vzw

## LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

## SEE ALSO

Catmandu Catmandu::VIAF Catmandu::Fix::viaf\_search Catmandu::Fix::viaf\_match
