File: OAI.pm

package info (click to toggle)
libhttp-oai-perl 4.03-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 416 kB
  • ctags: 326
  • sloc: perl: 2,531; xml: 224; makefile: 12
file content (122 lines) | stat: -rw-r--r-- 2,946 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
package HTTP::OAI;

use strict;

our $VERSION = '4.03';

use constant OAI_NS => 'http://www.openarchives.org/OAI/2.0/';

# perlcore
use Carp;
use Encode;

# http related stuff
use URI;
use HTTP::Headers;
use HTTP::Request;
use HTTP::Response;
require LWP::UserAgent;
require LWP::MemberMixin;

# xml related stuff
use XML::SAX;
use XML::SAX::ParserFactory;
use XML::LibXML;
use XML::LibXML::SAX;
use XML::LibXML::SAX::Parser;
use XML::LibXML::SAX::Builder;

use HTTP::OAI::SAX::Driver;
use HTTP::OAI::SAX::Text;

# debug
use HTTP::OAI::Debug;
use HTTP::OAI::SAX::Trace;

# generic superclasses
use HTTP::OAI::SAX::Base;
use HTTP::OAI::MemberMixin;
use HTTP::OAI::Verb;
use HTTP::OAI::PartialList;

# utility classes
use HTTP::OAI::Response;

# oai data objects
use HTTP::OAI::Metadata; # Super class of all data objects
use HTTP::OAI::Error;
use HTTP::OAI::Header;
use HTTP::OAI::MetadataFormat;
use HTTP::OAI::Record;
use HTTP::OAI::ResumptionToken;
use HTTP::OAI::Set;

# oai verbs
use HTTP::OAI::GetRecord;
use HTTP::OAI::Identify;
use HTTP::OAI::ListIdentifiers;
use HTTP::OAI::ListMetadataFormats;
use HTTP::OAI::ListRecords;
use HTTP::OAI::ListSets;

# oai agents
use HTTP::OAI::UserAgent;
use HTTP::OAI::Harvester;
use HTTP::OAI::Repository;

$HTTP::OAI::Harvester::VERSION = $VERSION;

if( $ENV{HTTP_OAI_TRACE} )
{
	HTTP::OAI::Debug::level( '+trace' );
}
if( $ENV{HTTP_OAI_SAX_TRACE} )
{
	HTTP::OAI::Debug::level( '+sax' );
}

our %VERSIONS = (
	'http://www.openarchives.org/oai/1.0/oai_getrecord' => '1.0',
	'http://www.openarchives.org/oai/1.0/oai_identify' => '1.0',
	'http://www.openarchives.org/oai/1.0/oai_listidentifiers' => '1.0',
	'http://www.openarchives.org/oai/1.0/oai_listmetadataformats' => '1.0',
	'http://www.openarchives.org/oai/1.0/oai_listrecords' => '1.0',
	'http://www.openarchives.org/oai/1.0/oai_listsets' => '1.0',
	'http://www.openarchives.org/oai/1.1/oai_getrecord' => '1.1',
	'http://www.openarchives.org/oai/1.1/oai_identify' => '1.1',
	'http://www.openarchives.org/oai/1.1/oai_listidentifiers' => '1.1',
	'http://www.openarchives.org/oai/1.1/oai_listmetadataformats' => '1.1',
	'http://www.openarchives.org/oai/1.1/oai_listrecords' => '1.1',
	'http://www.openarchives.org/oai/1.1/oai_listsets' => '1.1',
	'http://www.openarchives.org/oai/2.0/' => '2.0',
	'http://www.openarchives.org/oai/2.0/static-repository' => '2.0s',
);

1;

__END__

=head1 NAME

HTTP::OAI - API for the OAI-PMH

=head1 DESCRIPTION

This is a stub module, you probably want to look at
L<HTTP::OAI::Harvester|HTTP::OAI::Harvester> or
L<HTTP::OAI::Repository|HTTP::OAI::Repository>.

=head1 SEE ALSO

You can find links to this and other OAI tools (perl, C++, java) at:
http://www.openarchives.org/tools/tools.html.

Ed Summers L<Net::OAI::Harvester> module.

=head1 AUTHOR

Copyright 2004-2010 Tim Brody <tdb2@ecs.soton.ac.uk>, University of
Southampton.

This module is free software and is released under the BSD License (see
LICENSE).