line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::OAI::MetadataFormat; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
@ISA = qw( HTTP::OAI::MemberMixin XML::SAX::Base ); |
4
|
|
|
|
|
|
|
|
5
|
11
|
|
|
11
|
|
77
|
use strict; |
|
11
|
|
|
|
|
22
|
|
|
11
|
|
|
|
|
3704
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '4.13'; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
1
|
61
|
sub metadataPrefix { shift->_elem('metadataPrefix',@_) } |
10
|
2
|
|
|
2
|
1
|
8
|
sub schema { shift->_elem('schema',@_) } |
11
|
2
|
|
|
2
|
1
|
9
|
sub metadataNamespace { shift->_elem('metadataNamespace',@_) } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub generate |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
0
|
0
|
my( $self, $driver ) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
0
|
$driver->start_element('metadataFormat'); |
18
|
0
|
|
|
|
|
0
|
$driver->data_element('metadataPrefix',$self->metadataPrefix); |
19
|
0
|
|
|
|
|
0
|
$driver->data_element('schema',$self->schema); |
20
|
0
|
0
|
|
|
|
0
|
if( defined($self->metadataNamespace) ) |
21
|
|
|
|
|
|
|
{ |
22
|
0
|
|
|
|
|
0
|
$driver->data_element('metadataNamespace',$self->metadataNamespace); |
23
|
|
|
|
|
|
|
} |
24
|
0
|
|
|
|
|
0
|
$driver->end_element('metadataFormat'); |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub end_element { |
28
|
8
|
|
|
8
|
1
|
85
|
my ($self,$hash) = @_; |
29
|
8
|
|
|
|
|
22
|
$self->SUPER::end_element($hash); |
30
|
8
|
|
|
|
|
75
|
my $elem = lc($hash->{LocalName}); |
31
|
8
|
50
|
|
|
|
20
|
if( defined $hash->{Text} ) |
32
|
|
|
|
|
|
|
{ |
33
|
8
|
|
|
|
|
20
|
$hash->{Text} =~ s/^\s+//; |
34
|
8
|
|
|
|
|
21
|
$hash->{Text} =~ s/\s+$//; |
35
|
|
|
|
|
|
|
} |
36
|
8
|
100
|
|
|
|
33
|
if( $elem eq 'metadataprefix' ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
37
|
2
|
|
|
|
|
7
|
$self->metadataPrefix($hash->{Text}); |
38
|
|
|
|
|
|
|
} elsif( $elem eq 'schema' ) { |
39
|
2
|
|
|
|
|
6
|
$self->schema($hash->{Text}); |
40
|
|
|
|
|
|
|
} elsif( $elem eq 'metadatanamespace' ) { |
41
|
2
|
|
|
|
|
5
|
$self->metadataNamespace($hash->{Text}); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |