
PICA::Source - Data source that can be queried for PICA+ records

my $server = PICA::Source->new(
SRU => "http://my.server.org/sru-interface.cgi"
);
my $record = $server->getPPN('1234567890');
$server->cqlQuery("pica.tit=Hamster")->count();
$result = $server->cqlQuery("pica.tit=Hamster", Limit => 15 );
$result = $server->z3950Query('@attr 1=4 microformats');
$record = $server->getPPN("1234567890");
Instead or in addition to SRU you can use Z39.50, PSI, and unAPI (experimental).

Create a new Server. You can specify an SRU interface with SRU, a Z39.50 server with Z3950, an unAPI base url with unAPI or a raw PICA PSI interface with c<PSI>. Optional parameters include user and password for authentification.
Get a record specified by its PPN. Returns a PICA::Record object or undef. Only available for SRU and unAPI at the moment. If both are specified, unAPI is used.
Perform a CQL query (SRU) and return the PICA::XMLParser object that was used to parse the resulting records. You can pass an existing Parser or parser parameters as listed at PICA::Parser.
Perform a Z39.50 query via ZOOM. The resulting records are read with a PICA::PlainParser that is returned.
Return the base URL (if specified) or the empty string.

The following methods are based on CGI::Utils by Don Owens.
Returns the fully URL-encoded version of the given string. It does not convert space characters to '+' characters.
Returns the fully URL-decoded version of the given string.
Returns the fully URL-encoded version of the given string as unicode characters. It does not convert space characters to '+' characters.

Better error handling is needed, for instance of the server is "System temporarily unavailable". PICA::SRUSearchParser should only be created once.

Jakob Voss <jakob.voss@gbv.de>

Copyright (C) 2007-2009 by Verbundzentrale Göttingen (VZG) and Jakob VoÃ
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.