NAME

MARC::Convert::Wikidata::Object::ExternalId - Bibliographic Wikidata object for Kramerius link by MARC record.

SYNOPSIS

use MARC::Convert::Wikidata::Object::ExternalId;

my $obj = MARC::Convert::Wikidata::Object::ExternalId->new(%params);
my $deprecated = $obj->deprecated;
my $name = $obj->name;
my $value = $obj->value;

METHODS

new

my $obj = MARC::Convert::Wikidata::Object::ExternalId->new(%params);

Constructor.

  • deprecated

    Flag for external id deprecation.

    Default value is 0.

  • name

    External id name.

    Parameter is required.

    Possible values are:

    • cnb

      Czech national library cnb id.

    • nkcr_aut

      Czech national library aut id.

    • lccn

      Library of Congress Control Number.

  • value

    External id value.

    Parameter is required.

Returns instance of object.

deprecated

my $deprecated = $obj->deprecated;

Get deprecated flag.

Returns 0/1.

name

my $name = $obj->name;

Get external id name.

Returns string.

value

my $value = $obj->value;

Get external id value.

Returns string.

ERRORS

new():
        From Mo::utils::check_bool():
                Parameter 'deprecated' must be a bool (0/1).
                        Value: %s
        From Mo::utils::check_required():
                Parameter 'name' is required.
                Parameter 'value' is required.
        From Mo::utils::check_strings():
                Parameter 'name' must have strings definition.
                Parameter 'name' must have right string definition.
                Parameter 'name' must be one of defined strings.
                        String: %s
                        Possible strings: %s 

EXAMPLE1

use strict;
use warnings;

use Data::Printer;
use MARC::Convert::Wikidata::Object::ExternalId;

my $obj = MARC::Convert::Wikidata::Object::ExternalId->new(
        'name' => 'cnb',
        'value' => 'cnb003597104',
);

p $obj;

# Output:
# MARC::Convert::Wikidata::Object::ExternalId  {
#     parents: Mo::Object
#     public methods (3):
#         BUILD
#         Mo::utils:
#             check_bool, check_required
#     private methods (0)
#     internals: {
#         deprecated   0,
#         name         "cnb",
#         value        "cnb003597104"
#     }
# }

DEPENDENCIES

Mo, Mo::utils, Readonly.

SEE ALSO

MARC::Convert::Wikidata

Conversion class between MARC record and Wikidata object.

REPOSITORY

https://github.com/michal-josef-spacek/MARC-Convert-Wikidata-Object

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© Michal Josef Špaček 2021-2024

BSD 2-Clause License

VERSION

0.06