NAME
PICA::Server - Server that can be searched for PICA+ records
SYNOPSIS
my $server = PICA::Server->new(
title => "My server",
SRU => "http://my.server.org/sru-interface.cgi"
);
my $record = $server->getPPN('1234567890');
METHODS
new
Create a new Server. You can specify a title with title
and the URL base of an SRU interface with SRU
.
getPPN
Get a record specified by its PPN. Returns a PICA::Record object or undef.
cqlQuery
Perform a CQL query. If only one parameter is given, the full XML response is returned and you can parse it with PICA::SRUSearchParser.
If you supply an additional hash with Record and Field handlers (see PICA::Parser) this handlers are used. Afterwards the parser is returned.
UTILITY FUNCTIONS
url_encode
Returns the fully URL-encoded version of the given string. It does not convert space characters to '+' characters. This method is based on CGI::Utils by Don Owens.
url_unicode_encode
Returns the fully URL-encoded version of the given string as unicode characters. It does not convert space characters to '+' characters. This method is based on CGI::Utils by Don Owens.
TODO
Better error handling is needed, for instance of the server is "System temporarily unavailable". PICA::SRUSearchParser should only be created once.
AUTHOR
Jakob Voss <jakob.voss@gbv.de>
LICENSE
Copyright (C) 2007 by Verbundzentrale Goettingen (VZG) and Jakob Voss
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.