NAME MARC::Convert::Wikidata::Object - Bibliographic Wikidata object defined by MARC record. SYNOPSIS use MARC::Convert::Wikidata::Object; my $obj = MARC::Convert::Wikidata::Object->new(%params); my $authors_ar = $obj->authors; my $authors_of_afterword_ar = $obj->authors_of_afterword; my $authors_of_introduction_ar = $obj->authors_of_introduction; my $compilers = $obj->compilers; my $cover = $obj->cover; my $cycles_ar = $obj->cycles; my $directors_ar = $obj->directors; my $dml = $obj->dml; my $edition_number = $obj->edition_number; my $editors_ar = $obj->editors; my $end_time = $obj->end_time; my $external_ids_ar = $obj->external_ids; my $full_name = $obj->full_name; my $illustrators_ar = $obj->illustrators; my $isbns_ar = $obj->isbns; my $issn = $obj->issn; my $kramerius_ar = $obj->krameriuses; my $languages_ar = $obj->languages; my $narrators_ar = $obj->narrators; my $number_of_pages = $obj->number_of_pages; my $photographers_ar = $obj->photographers; my $publication_date = $obj->publication_date; my $publishers_ar = $obj->publishers; my $series_ar = $obj->series; my $start_time = $obj->start_time; my $subtitles_ar = $obj->subtitles; my $title = $obj->title; my $translators_ar = $obj->translators; METHODS "new" my $obj = MARC::Convert::Wikidata::Object->new(%params); Constructor. Returns instance of object. * "authors" List of authors. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "authors_of_afterword" List of authors of afterword. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "authors_of_introduction" List of authors of introduction. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "compilers" List of compilers. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "cover" Book cover. Possible values: * hardback * paperback Default value is undef. * "cycles" List of book cycles. Reference to array with MARC::Convert::Wikidata::Object::Series instances. Default value is []. * "directors" List of directors. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "dml" DML id. Default value is undef. * "edition_number" Edition number. Default value is undef. * "editors" List of editors. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "end_time" End time. Default value is undef. * "external_ids" External ids. Need to be a reference to array with MARC::Convert::Wikidata::Object::ExternalId instances. Default value is []. * "illustrators" List of illustrators. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "isbns" List of ISBNs. Reference to array with MARC::Convert::Wikidata::Object::ISBN instances. Default value is reference to blank array. * "issn" ISSN number. Default value is undef. * "krameriuses" List of Kramerius systems with digitized scan. Reference to array with MARC::Convert::Wikidata::Object::Kramerius instances. Default value is reference to blank array. * "languages" List of languages of book edition (TODO Format) Default value is reference to blank array. * "narrators" List of narrators. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "number_of_pages" Number of pages. Default value is undef. * "photographers" List of photographers. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. * "publication_date" Publication date. Default value is undef. * "publishers" List of Publishers. Reference to array with MARC::Convert::Wikidata::Object::Publisher instances. Default value is []. * "series" List of book series. Reference to array with MARC::Convert::Wikidata::Object::Series instances. Default value is []. * "start_time" Start time. Default value is undef. * "subtitles" List of subtitles. Reference to array with strings. Default value is []. * "title" Title of book edition. Default value is undef. * "translators" List of translators. Reference to array with MARC::Convert::Wikidata::Object::People instances. Default value is reference to blank array. "authors" my $authors_ar = $obj->authors; Get reference to array with author objects. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "authors_of_afterword" my $authors_of_afterword_ar = $obj->authors_of_afterword; Get reference to array with author of afterword objects. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "authors_of_introduction" my $authors_of_introduction_ar = $obj->authors_of_introduction; Get reference to array with author of introduction objects. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "compilers" my $compilers_ar = $obj->compilers; Get list of compilers. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "cover" my $cover = $obj->cover; Get book cover. Returns string (hardback or paperback). "cycles" my $cycles_ar = $obj->cycles; Get reference to array with Serie item objects. Returns reference to array of MARC::Convert::Wikidata::Object::Series instances. "directors" my $directors_ar = $obj->directors; Get list of directors. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "dml" my $dml = $obj->dml; Get DML id. Returns number. "edition_number" my $edition_number = $obj->edition_number; Get edition number. Returns number. "editors" my $editors_ar = $obj->editors; Get list of editors. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "end_time" my $end_time = $obj->end_time; Get end time. Returns number. "external_ids" my $external_ids_ar = $obj->external_ids; Get list of external ids. Returns reference to array with MARC::Convert::Wikidata::Object::ExternalId instances. "full_name" my $full_name = $obj->full_name; Get full name of edition in format '__TITLE__: __SUBTITLE__'. Returns string. "illustrators" my $illustrators_ar = $obj->illustrators; Get list of illustrators. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "isbns" my $isbns_ar = $obj->isbns; Get list of ISBNs. Returns reference to array of MARC::Convert::Wikidata::Object::ISBN instances. "issn" my $issn = $obj->issn; Get ISSN number. Returns string. c my $kramerius_ar = $obj->krameriuses; Get reference to array with Kramerius item objects. Returns reference to array of MARC::Convert::Wikidata::Object::Kramerius instances. "languages" my $languages_ar = $obj->languages; TODO "narrators" my $narrators_ar = $obj->narrators; Get list of narrators. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "number_of_pages" my $number_of_pages = $obj->number_of_pages; TODO "photographers" my $photographers_ar = $obj->photographers; Get reference to array with photographers objects. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. "publication_date" my $publication_date = $obj->publication_date; TODO "publishers" my $publishers_ar = $obj->publishers; Get list of publishing houses. Returns reference to array of MARC::Convert::Wikidata::Object::Publisher instances. "series" my $series_ar = $obj->series; Get reference to array with Serie item objects. Returns reference to array of MARC::Convert::Wikidata::Object::Series instances. "start_time" my $start_time = $obj->start_time; Get start time. Returns number. "subtitle" my $subtitles_ar = $obj->subtitles; Get reference to array with subtitles. Returns reference to array of strings. "title" my $title = $obj->title; Get title. Returns string. "translators" my $translators_ar = $obj->translators; Get list of translators. Returns reference to array of MARC::Convert::Wikidata::Object::People instances. ERRORS new(): From Mo::utils::check_array_object(): Author isn't 'MARC::Convert::Wikidata::Object::People' object. Author of afterword isn't 'MARC::Convert::Wikidata::Object::People' object. Author of introduction isn't 'MARC::Convert::Wikidata::Object::People' object. Book series isn't 'MARC::Convert::Wikidata::Object::Series' object. Book cover '%s' doesn't exist. Book cycle isn't 'MARC::Convert::Wikidata::Object::Series' object. Compiler isn't 'MARC::Convert::Wikidata::Object::People' object. Director isn't 'MARC::Convert::Wikidata::Object::People' object. Editor isn't 'MARC::Convert::Wikidata::Object::People' object. External id isn't 'MARC::Convert::Wikidata::Object::ExternalId' object. Illustrator isn't 'MARC::Convert::Wikidata::Object::People' object. Narrator isn't 'MARC::Convert::Wikidata::Object::People' object. Parameter 'authors' must be a array. Parameter 'authors_of_afterword' must be a array. Parameter 'authors_of_introduction' must be a array. Parameter 'compilers' must be a array. Parameter 'cycles' must be a array. Parameter 'directors' must be a array. Parameter 'editors' must be a array. Parameter 'end_time' must be a number. Parameter 'external_ids' must be a array. Parameter 'illustrators' must be a array. Parameter 'languages' must be a array. Parameter 'narrators' must be a array. Parameter 'publishers' must be a array. Parameter 'series' must be a array. Parameter 'start_time' must be a number. Parameter 'translators' must be a array. Publisher isn't 'MARC::Convert::Wikidata::Object::Publisher' object. Translator isn't 'MARC::Convert::Wikidata::Object::People' object. From Mo::utils::check_number(): Parameter '%s' must a number. Value: %s EXAMPLE1 use strict; use warnings; use Data::Printer; use MARC::Convert::Wikidata::Object; use MARC::Convert::Wikidata::Object::ExternalId; use MARC::Convert::Wikidata::Object::ISBN; use MARC::Convert::Wikidata::Object::People; use MARC::Convert::Wikidata::Object::Publisher; use Unicode::UTF8 qw(decode_utf8); my $aut = MARC::Convert::Wikidata::Object::People->new( 'date_of_birth' => '1952-12-08', 'external_ids' => [ MARC::Convert::Wikidata::Object::ExternalId->new( 'name' => 'nkcr_aut', 'value' => 'jn20000401266', ), ], 'name' => decode_utf8('Jiří'), 'surname' => 'Jurok', ); my $publisher = MARC::Convert::Wikidata::Object::Publisher->new( 'name' => decode_utf8('Město Příbor'), 'place' => decode_utf8('Příbor'), ); my $isbn = MARC::Convert::Wikidata::Object::ISBN->new( 'isbn' => '80-238-9541-9', 'publisher' => $publisher, ); my $obj = MARC::Convert::Wikidata::Object->new( 'authors' => [$aut], 'date_of_publication' => 2002, 'edition_number' => 2, 'external_ids' => [ MARC::Convert::Wikidata::Object::ExternalId->new( 'name' => 'cnb', 'value' => 'cnb001188266', ), MARC::Convert::Wikidata::Object::ExternalId->new( 'name' => 'lccn', 'value' => '53860313', ), ], 'isbns' => [$isbn], 'number_of_pages' => 414, 'publishers' => [$publisher], ); p $obj; # Output: # MARC::Convert::Wikidata::Object { # parents: Mo::Object # public methods (8): # BUILD, full_name # Error::Pure: # err # List::MoreUtils::XS: # none # Mo::utils: # check_array, check_array_object, check_number # Readonly: # Readonly # private methods (0) # internals: { # authors [ # [0] MARC::Convert::Wikidata::Object::People # ], # date_of_publication 2002, # edition_number 2, # external_ids [ # [0] MARC::Convert::Wikidata::Object::ExternalId, # [1] MARC::Convert::Wikidata::Object::ExternalId # ], # isbns [ # [0] MARC::Convert::Wikidata::Object::ISBN # ], # number_of_pages 414, # publishers [ # [0] MARC::Convert::Wikidata::Object::Publisher # ] # } # } DEPENDENCIES Error::Pure, List::MoreUtils, Mo, Mo::utils, Readonly. SEE ALSO MARC::Convert::Wikidata Conversion class between MARC record and Wikidata object. REPOSITORY AUTHOR Michal Josef Špaček LICENSE AND COPYRIGHT © Michal Josef Špaček 2021-2024 BSD 2-Clause License VERSION 0.09