<<

NAME

C4::Breeding : module to add biblios to import_records via the breeding/reservoir API.

SYNOPSIS

    use C4::Scan;
    &ImportBreeding($marcrecords,$overwrite_biblio,$filename,$z3950random,$batch_type);

    C<$marcrecord> => the MARC::Record
    C<$overwrite_biblio> => if set to 1 a biblio with the same ISBN will be overwritted.
                                if set to 0 a biblio with the same isbn will be ignored (the previous will be kept)
                                if set to -1 the biblio will be added anyway (more than 1 biblio with the same ISBN 
                                possible in the breeding
    C<$encoding> => USMARC
                        or UNIMARC. used for char_decoding.
                        If not present, the parameter marcflavour is used instead
    C<$z3950random> => the random value created during a z3950 search result.

DESCRIPTION

    ImportBreeding import MARC records in the reservoir (import_records/import_batches tables).
    the records can be properly encoded or not, we try to reencode them in utf-8 if needed.
    works perfectly with BNF server, that sends UNIMARC latin1 records. Should work with other servers too.

ImportBreeding

        ImportBreeding($marcrecords,$overwrite_biblio,$filename,$encoding,$z3950random,$batch_type);

        TODO description

BreedingSearch

($count, @results) = &BreedingSearch($title,$isbn,$random); $title contains the title, $isbn contains isbn or issn, $random contains the random seed from a z3950 search.

$count is the number of items in @results. @results is an array of references-to-hash; the keys are the items from the import_records and import_biblios tables of the Koha database.

Z3950Search

Z3950Search($pars, $template);

Parameters for Z3950 search are all passed via the $pars hash. It may contain isbn, title, author, dewey, subject, lccall, controlnumber, stdid, srchany. Also it should contain an arrayref id that points to a list of id's of the z3950 targets to be queried (see z3950servers table). This code is used in acqui/z3950_search and cataloging/z3950_search. The second parameter $template is a Template object. The routine uses this parameter to store the found values into the template.

ImportBreedingAuth

ImportBreedingAuth($marcrecords,$overwrite_auth,$filename,$encoding,$z3950random,$batch_type);

    ImportBreedingAuth imports MARC records in the reservoir (import_records table).
    ImportBreedingAuth is based on the ImportBreeding subroutine.

Z3950SearchAuth

Z3950SearchAuth($pars, $template);

Parameters for Z3950 search are all passed via the $pars hash. It may contain nameany, namepersonal, namecorp, namemeetingcon, title, uniform title, subject, subjectsubdiv, srchany. Also it should contain an arrayref id that points to a list of IDs of the z3950 targets to be queried (see z3950servers table). This code is used in cataloging/z3950_auth_search. The second parameter $template is a Template object. The routine uses this parameter to store the found values into the template.

<<