line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catmandu::Importer::SRU::Parser::mabxml; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '0.24'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
624180
|
use Moo; |
|
1
|
|
|
|
|
9
|
|
|
1
|
|
|
|
|
7
|
|
6
|
1
|
|
|
1
|
|
823
|
use MAB2::Parser::XML; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
30
|
|
7
|
1
|
|
|
1
|
|
8
|
use Encode; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
146
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub parse { |
10
|
4
|
|
|
4
|
0
|
42226
|
my ( $self, $record ) = @_; |
11
|
|
|
|
|
|
|
|
12
|
4
|
|
|
|
|
195
|
my $xml = $record->{recordData}->toString(); |
13
|
4
|
|
|
|
|
28
|
my $parser = MAB2::Parser::XML->new( $xml ); |
14
|
4
|
|
|
|
|
22
|
return $parser->next(); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__END__ |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=encoding UTF-8 |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Catmandu::Importer::SRU::Parser::mabxml - Package transforms SRU responses into Catmandu MAB2 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 SYNOPSIS |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
my %attrs = ( |
33
|
|
|
|
|
|
|
base => 'http://sru.gbv.de/gvk', |
34
|
|
|
|
|
|
|
query => '1940-5758', |
35
|
|
|
|
|
|
|
recordSchema => 'mabxml' , |
36
|
|
|
|
|
|
|
parser => 'mabxml' , |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
my $importer = Catmandu::Importer::SRU->new(%attrs); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 DESCRIPTION |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Each mabxml response will be transformed into the format defined by |
44
|
|
|
|
|
|
|
L<Catmandu::Importer::PICA> |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 AUTHOR |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Johann Rolschewski <jorol@cpan.org> |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Johann Rolschewski. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
55
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |