PICA::Source - Data source that can be queried for PICA+ records
version 0.585
my $server = PICA::Source->new( SRU => "http://my.server.org/sru-interface.cgi" ); my $record = $server->getPPN('1234567890'); $server->cqlQuery("pica.tit=Hamster")->count(); # Get connection details from a config file $store = PICA::Source->new( config => "myconf.conf" ); $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 PSI. Optional parameters include user and password for authentification. If you provide a config parameter, configuration parameters will read from a file or from the file specified with the PICASOURCE environment variable or from the file pica.conf in the current directory.
SRU
Z3950
unAPI
PSI
user
password
config
PICASOURCE
pica.conf
Get a record specified by its PPN. Returns a PICA::Record object or undef. Only available for source APIs SRU, unAPI, and PSI. You should check whether the returned object is empty or not. On error the special variable $@ is set.
Perform a CQL query 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. Only available for API type SRU.
Perform a Z39.50 query via ZOOM. The resulting records are read with a PICA::PlainParser that is returned.
Search a source by IKT (search index) and search term. The current implementation only returns the first record. This method does only work for PSI source.
Returns a link to the result list of a search by IKT or undef. Croaks if no PSI source has been defined.
Returns a link to the record view of a record given by PPN. Croaks if no PSI source has been defined.
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.
Jakob Voß <voss@gbv.de>
This software is copyright (c) 2014 by Verbundzentrale Goettingen (VZG) and Jakob Voss.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install PICA::Record, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PICA::Record
CPAN shell
perl -MCPAN -e shell install PICA::Record
For more information on module installation, please visit the detailed CPAN module installation guide.