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
|
|
76
|
use strict; |
|
11
|
|
|
|
|
21
|
|
|
11
|
|
|
|
|
3348
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '4.11'; |
8
|
|
|
|
|
|
|
|
9
|
6
|
|
|
6
|
1
|
47
|
sub metadataPrefix { shift->_elem('metadataPrefix',@_) } |
10
|
2
|
|
|
2
|
1
|
8
|
sub schema { shift->_elem('schema',@_) } |
11
|
2
|
|
|
2
|
1
|
6
|
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
|
84
|
my ($self,$hash) = @_; |
29
|
8
|
|
|
|
|
37
|
$self->SUPER::end_element($hash); |
30
|
8
|
|
|
|
|
79
|
my $elem = lc($hash->{LocalName}); |
31
|
8
|
50
|
|
|
|
19
|
if( defined $hash->{Text} ) |
32
|
|
|
|
|
|
|
{ |
33
|
8
|
|
|
|
|
19
|
$hash->{Text} =~ s/^\s+//; |
34
|
8
|
|
|
|
|
22
|
$hash->{Text} =~ s/\s+$//; |
35
|
|
|
|
|
|
|
} |
36
|
8
|
100
|
|
|
|
43
|
if( $elem eq 'metadataprefix' ) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
37
|
2
|
|
|
|
|
7
|
$self->metadataPrefix($hash->{Text}); |
38
|
|
|
|
|
|
|
} elsif( $elem eq 'schema' ) { |
39
|
2
|
|
|
|
|
7
|
$self->schema($hash->{Text}); |
40
|
|
|
|
|
|
|
} elsif( $elem eq 'metadatanamespace' ) { |
41
|
2
|
|
|
|
|
8
|
$self->metadataNamespace($hash->{Text}); |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |