| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package MARC::Convert::Wikidata::Object::Series; |
|
2
|
|
|
|
|
|
|
|
|
3
|
11
|
|
|
11
|
|
163635
|
use strict; |
|
|
11
|
|
|
|
|
25
|
|
|
|
11
|
|
|
|
|
543
|
|
|
4
|
11
|
|
|
11
|
|
72
|
use warnings; |
|
|
11
|
|
|
|
|
20
|
|
|
|
11
|
|
|
|
|
656
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
11
|
|
|
11
|
|
3215
|
use Error::Pure qw(err); |
|
|
11
|
|
|
|
|
89089
|
|
|
|
11
|
|
|
|
|
426
|
|
|
7
|
11
|
|
|
11
|
|
3499
|
use Mo qw(build is); |
|
|
11
|
|
|
|
|
3965
|
|
|
|
11
|
|
|
|
|
66
|
|
|
8
|
11
|
|
|
11
|
|
17876
|
use Mo::utils 0.08 qw(check_isa check_required); |
|
|
11
|
|
|
|
|
20194
|
|
|
|
11
|
|
|
|
|
2551
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = 0.15; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has issn => ( |
|
13
|
|
|
|
|
|
|
is => 'ro', |
|
14
|
|
|
|
|
|
|
); |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has name => ( |
|
17
|
|
|
|
|
|
|
is => 'ro', |
|
18
|
|
|
|
|
|
|
); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
has publisher => ( |
|
21
|
|
|
|
|
|
|
is => 'ro', |
|
22
|
|
|
|
|
|
|
); |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has series_ordinal => ( |
|
25
|
|
|
|
|
|
|
is => 'ro', |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has series_ordinal_raw => ( |
|
29
|
|
|
|
|
|
|
is => 'ro', |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub BUILD { |
|
33
|
18
|
|
|
18
|
0
|
2196573
|
my $self = shift; |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
# Check 'name'. |
|
36
|
18
|
|
|
|
|
106
|
check_required($self, 'name'); |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Check 'publisher'. |
|
39
|
17
|
|
|
|
|
234
|
check_isa($self, 'publisher', 'MARC::Convert::Wikidata::Object::Publisher'); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
# Check 'series_ordinal'. |
|
42
|
16
|
100
|
100
|
|
|
384
|
if (defined $self->{'series_ordinal'} |
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
43
|
|
|
|
|
|
|
&& $self->{'series_ordinal'} !~ m/^\d+$/ms |
|
44
|
|
|
|
|
|
|
&& $self->{'series_ordinal'} !~ m/^\d+\-\d+$/ms |
|
45
|
|
|
|
|
|
|
&& $self->{'series_ordinal'} !~ m/^(?i)M{0,3}(CM|CD|D?C{0,3}) |
|
46
|
|
|
|
|
|
|
(XC|XL|L?X{0,3}) |
|
47
|
|
|
|
|
|
|
(IX|IV|V?I{0,3})$/x) { |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
err "Parameter 'series_ordinal' has bad value.", |
|
50
|
1
|
|
|
|
|
6
|
'Value', $self->{'series_ordinal'}, |
|
51
|
|
|
|
|
|
|
; |
|
52
|
|
|
|
|
|
|
} |
|
53
|
|
|
|
|
|
|
|
|
54
|
15
|
|
|
|
|
45
|
return; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
1; |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
__END__ |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=pod |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=encoding utf8 |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
MARC::Convert::Wikidata::Object::Series - Bibliographic Wikidata object for series defined by MARC record. |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
use MARC::Convert::Wikidata::Object::Series; |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $obj = MARC::Convert::Wikidata::Object::Series->new(%params); |
|
74
|
|
|
|
|
|
|
my $issn = $obj->issn; |
|
75
|
|
|
|
|
|
|
my $name = $obj->name; |
|
76
|
|
|
|
|
|
|
my $publisher = $obj->publisher; |
|
77
|
|
|
|
|
|
|
my $series_ordinal = $obj->series_ordinal; |
|
78
|
|
|
|
|
|
|
my $series_ordinal_raw = $obj->series_ordinal_raw; |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 METHODS |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head2 C<new> |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
my $obj = MARC::Convert::Wikidata::Object::Series->new(%params); |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Constructor. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
Returns instance of object. |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=over 8 |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=item * C<issn> |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
ISSN of series. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
Parameter is optional. |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=item * C<name> |
|
99
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
Name of book series. |
|
101
|
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Parameter is required. |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=item * C<publisher> |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Publishing house L<MARC::Convert::Wikidata::Object::Publisher> object. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Default value is undef. |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=item * C<series_ordinal> |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Series ordinal. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Could be a number, range of numbers or roman number. |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
Default value is undef. |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=item * C<series_ordinal_raw> |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Series ordinal raw string. |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
Default value is undef. |
|
123
|
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=back |
|
125
|
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
=head2 C<name> |
|
127
|
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
my $name = $obj->name; |
|
129
|
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
Get name of book series. |
|
131
|
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Returns string. |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head2 C<publisher> |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
my $place = $obj->publisher; |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
Get publishing house. |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
Returns L<MARC::Convert::Wikidata::Object::Publisher> object. |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=head2 C<series_ordinal> |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
my $series_ordinal = $obj->series_ordinal; |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Get series ordinal. |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
Returns number. |
|
149
|
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
=head2 C<series_ordinal_raw> |
|
151
|
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
my $series_ordinal_raw = $obj->series_ordinal_raw; |
|
153
|
|
|
|
|
|
|
|
|
154
|
|
|
|
|
|
|
Get series ordinal raw string. |
|
155
|
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
Returns string. |
|
157
|
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head1 ERRORS |
|
159
|
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
new(): |
|
161
|
|
|
|
|
|
|
From Mo::utils::check_isa(): |
|
162
|
|
|
|
|
|
|
Parameter 'publisher' must be a 'MARC::Convert::Wikidata::Object::Publisher' object. |
|
163
|
|
|
|
|
|
|
Value: %s |
|
164
|
|
|
|
|
|
|
Reference: %s |
|
165
|
|
|
|
|
|
|
From Mo::utils::check_required(): |
|
166
|
|
|
|
|
|
|
Parameter 'name' is required. |
|
167
|
|
|
|
|
|
|
Parameter 'series_ordinal' has bad value. |
|
168
|
|
|
|
|
|
|
Value: %s |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
=head1 EXAMPLE1 |
|
171
|
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=for comment filename=create_and_dump_series.pl |
|
173
|
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
use strict; |
|
175
|
|
|
|
|
|
|
use warnings; |
|
176
|
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
use Data::Printer; |
|
178
|
|
|
|
|
|
|
use MARC::Convert::Wikidata::Object::Publisher; |
|
179
|
|
|
|
|
|
|
use MARC::Convert::Wikidata::Object::Series; |
|
180
|
|
|
|
|
|
|
use Unicode::UTF8 qw(decode_utf8); |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
my $obj = MARC::Convert::Wikidata::Object::Series->new( |
|
183
|
|
|
|
|
|
|
'name' => decode_utf8('Malé encyklopedie'), |
|
184
|
|
|
|
|
|
|
'publisher' => MARC::Convert::Wikidata::Object::Publisher->new( |
|
185
|
|
|
|
|
|
|
'name' => decode_utf8('Mladá Fronta'), |
|
186
|
|
|
|
|
|
|
), |
|
187
|
|
|
|
|
|
|
'series_ordinal' => 5, |
|
188
|
|
|
|
|
|
|
'series_ordinal_raw' => 'kn. 5', |
|
189
|
|
|
|
|
|
|
); |
|
190
|
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
p $obj; |
|
192
|
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
# Output: |
|
194
|
|
|
|
|
|
|
# MARC::Convert::Wikidata::Object::Series { |
|
195
|
|
|
|
|
|
|
# Parents Mo::Object |
|
196
|
|
|
|
|
|
|
# public methods (6) : BUILD, can (UNIVERSAL), DOES (UNIVERSAL), check_required (Mo::utils), isa (UNIVERSAL), VERSION (UNIVERSAL) |
|
197
|
|
|
|
|
|
|
# private methods (1) : __ANON__ (Mo::is) |
|
198
|
|
|
|
|
|
|
# internals: { |
|
199
|
|
|
|
|
|
|
# name "Mal� encyklopedie", |
|
200
|
|
|
|
|
|
|
# publisher MARC::Convert::Wikidata::Object::Publisher, |
|
201
|
|
|
|
|
|
|
# series_ordinal 5 |
|
202
|
|
|
|
|
|
|
# } |
|
203
|
|
|
|
|
|
|
# } |
|
204
|
|
|
|
|
|
|
|
|
205
|
|
|
|
|
|
|
=head1 DEPENDENCIES |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
L<Mo>, |
|
208
|
|
|
|
|
|
|
L<Mo::utils>. |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
=over |
|
213
|
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=item L<MARC::Convert::Wikidata> |
|
215
|
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
Conversion class between MARC record and Wikidata object. |
|
217
|
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
=back |
|
219
|
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=head1 REPOSITORY |
|
221
|
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
L<https://github.com/michal-josef-spacek/MARC-Convert-Wikidata-Object> |
|
223
|
|
|
|
|
|
|
|
|
224
|
|
|
|
|
|
|
=head1 AUTHOR |
|
225
|
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
Michal Josef Špaček L<mailto:skim@cpan.org> |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
L<http://skim.cz> |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=head1 LICENSE AND COPYRIGHT |
|
231
|
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
© Michal Josef Špaček 2021-2025 |
|
233
|
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
BSD 2-Clause License |
|
235
|
|
|
|
|
|
|
|
|
236
|
|
|
|
|
|
|
=head1 VERSION |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
0.15 |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
=cut |