line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::OAI::Set; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
@ISA = qw( HTTP::OAI::MemberMixin XML::SAX::Base ); |
4
|
|
|
|
|
|
|
|
5
|
11
|
|
|
11
|
|
65
|
use strict; |
|
11
|
|
|
|
|
18
|
|
|
11
|
|
|
|
|
3781
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '4.12'; |
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
0
|
1
|
|
sub setSpec { shift->_elem('setSpec',@_) } |
10
|
0
|
|
|
0
|
1
|
|
sub setName { shift->_elem('setName',@_) } |
11
|
0
|
|
|
0
|
1
|
|
sub setDescription { shift->_multi('setDescription',@_) } |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub generate { |
14
|
0
|
|
|
0
|
0
|
|
my( $self, $driver ) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
$driver->start_element( 'set' ); |
17
|
0
|
|
|
|
|
|
$driver->data_element( 'setSpec', $self->setSpec ); |
18
|
0
|
|
|
|
|
|
$driver->data_element( 'setName', $self->setName ); |
19
|
0
|
|
|
|
|
|
for( $self->setDescription ) { |
20
|
0
|
|
|
|
|
|
$_->generate; |
21
|
|
|
|
|
|
|
} |
22
|
0
|
|
|
|
|
|
$driver->end_element( 'set' ); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub start_element { |
26
|
0
|
|
|
0
|
1
|
|
my ($self,$hash,$r) = @_; |
27
|
0
|
|
|
|
|
|
my $elem = lc($hash->{Name}); |
28
|
0
|
0
|
|
|
|
|
if( $elem eq 'setdescription' ) { |
29
|
0
|
|
|
|
|
|
$self->setDescription(my $desc = HTTP::OAI::Metadata->new); |
30
|
0
|
|
|
|
|
|
$self->set_handler($desc); |
31
|
0
|
|
|
|
|
|
$self->{in_desc} = $hash->{Depth}; |
32
|
|
|
|
|
|
|
} |
33
|
0
|
|
|
|
|
|
$self->SUPER::start_element($hash,$r); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
sub end_element { |
36
|
0
|
|
|
0
|
1
|
|
my ($self,$hash,$r) = @_; |
37
|
0
|
|
|
|
|
|
$self->SUPER::end_element($hash,$r); |
38
|
0
|
0
|
|
|
|
|
if( $self->{in_desc} ) |
39
|
|
|
|
|
|
|
{ |
40
|
0
|
0
|
|
|
|
|
if( $self->{in_desc} == $hash->{Depth} ) |
41
|
|
|
|
|
|
|
{ |
42
|
0
|
|
|
|
|
|
$self->set_handler( undef ); |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
else |
46
|
|
|
|
|
|
|
{ |
47
|
0
|
|
|
|
|
|
my $elem = $hash->{Name}; |
48
|
0
|
0
|
|
|
|
|
if( $elem =~ /^setSpec|setName$/ ) |
49
|
|
|
|
|
|
|
{ |
50
|
0
|
|
|
|
|
|
$self->$elem( $hash->{Text} ); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |