
PICA::Store - CRUD interface to a PICA::Record storage

use PICA::Store;
# connect to store
$server = PICA::Store->new(
SOAP => $baseurl,
userkey => $userkey, password => $password, dbsid => $dbsid
);
# better get connection details from config file
$server = PICA::Store->new( config => "myconf.conf" );
$server = PICA::Store->new( config => undef ); # autodetect
%result = $server->get( $id );
%result = $server->create( $record );
%result = $server->update( $id, $record, $version );
%result = $server->delete( $id );

This class provided a simple retrieve-insert-update-delete - interface to a record store. Currently there is only a CBS webcat SOAP-API but you could also wrap for instance a Jangle interface with this class.
A formal description of the CBS webcat SOAP-API can be found at http://cws.gbv.de/ws/webcatws.wsdl.

Create a new Server. You must specify at least a connection type and a base URL or the config file parameter to read this settings from a config file. Defined parameters override settings in a config file.
Other parameters are userkey, password, and database id. The optional language parameter (default: "en") for error messagescan be one of "de", "en", "fr" or "ne".
Currently only the connection type "SOAP" is supported with limited error handling.
Retrieve a record by ID.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'. The 'record' element contains a PICA::Record object.
Insert a new record. The parameter must be a PICA::Record object.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'.
Update a record by ID, updated record (of type PICA::Record), and version (of a previous get, create, or update command).
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id', 'record', and 'version'.
Deletes a record by ID.
Returns a hash with either 'errorcode' and 'errormessage' or a hash with 'id'.

Internal method to prepare, perform and evaluate a SOAP request. Returns a hash with 'errorcode' and 'errormessage' or a hash with 'dbsid', 'id', 'record', and 'version' depending on the type of query. Do not directly call this method!

This distribution contains the command line client picawebcat based on PICA::Store.

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.