[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Biblio.pm
From: |
Joshua Ferraro |
Subject: |
[Koha-cvs] koha/C4 Biblio.pm |
Date: |
Sat, 25 Feb 2006 19:23:01 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch:
Changes by: Joshua Ferraro <address@hidden> 06/02/25 19:23:01
Modified files:
C4 : Biblio.pm
Log message:
cleaning up POD docs, deleting zebra_create as it's no longer used (
replaced by z3950_extended_services).
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/Biblio.pm.diff?tr1=1.147&tr2=1.148&r1=text&r2=text
Patches:
Index: koha/C4/Biblio.pm
diff -u koha/C4/Biblio.pm:1.147 koha/C4/Biblio.pm:1.148
--- koha/C4/Biblio.pm:1.147 Sat Feb 25 19:09:59 2006
+++ koha/C4/Biblio.pm Sat Feb 25 19:23:01 2006
@@ -30,7 +30,7 @@
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
-$VERSION = do { my @v = '$Revision: 1.147 $' =~ /\d+/g;
+$VERSION = do { my @v = '$Revision: 1.148 $' =~ /\d+/g;
shift(@v) . "." . join("_", map {sprintf "%03d", $_ } @v); };
@ISA = qw(Exporter);
@@ -73,59 +73,64 @@
&FindDuplicate
&DisplayISBN
- &z3950_extended_services
+ &z3950_extended_services
&set_service_options
- get_item_from_barcode
- MARCfind_MARCbibid_from_oldbiblionumber
+
+ &get_item_from_barcode
+ &MARCfind_MARCbibid_from_oldbiblionumber
+
);
=head1 NAME
-C4::Biblio - acquisition, catalog management functions
+C4::Biblio - Acquisitions, Catalog Management Functions
=head1 SYNOPSIS
-( lot of changes for Koha 3.0)
+( lot of changes for Koha 3.X)
-Koha 1.2 and previous version used a specific API to manage biblios. This API
uses old-DB style parameters.
-They are based on a hash, and store data in biblio/biblioitems/items tables
(plus additionalauthors, bibliosubject and bibliosubtitle where applicable)
+Koha 1.2 and previous versions used a specific API to manage biblios. This API
uses old-DB style parameters.
+They are based on a hash, and store data in biblio/biblioitems/items tables
(plus additionalauthors,
+bibliosubject and bibliosubtitle where applicable).
-In Koha 2.0, we introduced a MARC-DB.
+In Koha 2.X, we introduced a MARC-DB.
-In Koha 3.0 we removed this MARC-DB for search as we wanted to use Zebra as
search system.
+In Koha 3.X, we removed this MARC-DB for search as we wanted to use Zebra as
search system.
-So in Koha 3.0, saving a record means :
- - storing the raw marc record (iso2709) in biblioitems.marc field. It
contains both biblio & items informations.
+So in Koha 3.X, saving a record means :
+
+ - storing the raw marc record (iso2709) in biblioitems.marc field. It
contains both biblio & items information.
- storing the "decoded information" in biblio/biblioitems/items as previously.
- - using zebra to manage search & indexing on the MARC datas.
+ - using zebra to manage search & indexing on the MARC data.
- In Koha, there is a systempreference saying "MARC=ON" or "MARC=OFF"
+ In Koha, there is a systempreference for "MARC=ON" or "MARC=OFF" :
- * MARC=ON : when MARC=ON, koha uses a MARC::Record object (in sub
parameters). Saving informations in the DB means :
+ * MARC=ON : when MARC=ON, Koha uses a MARC::Record object (in sub
parameters). Saving information in the DB means :
+
- transform the MARC record into a hash
- - add the raw marc record into the hash
- - store them & update zebra
+ - add the raw MARC record into the hash
+ - store them & update Zebra
- * MARC=OFF : when MARC=OFF, koha uses a hash object (in sub parameters).
Saving informations in the DB means :
+ * MARC=OFF : when MARC=OFF, Koha uses a hash object (in sub parameters).
Saving information in the DB means :
+
- transform the hash into a MARC record
- add the raw marc record into the hash
- - store them and update zebra
-
+ - store them & update zebra
That's why we need 3 types of subs :
=head2 REALxxx subs
-all I<subs beginning by REAL> does effective storage of information (with a
hash, one field of the hash being the raw marc record). Those subs also update
the record in zebra. REAL subs should be only for internal use (called by NEW
or "something else" subs
+all I<subs beginning by REAL> do the effective storage of information (with a
hash, one field of the hash being the raw marc record). Those subs also update
the record in Zebra. REAL subs should be only for internal use (called by NEW
or "something else" subs).
=head2 NEWxxx related subs
=over 4
-all I<subs beginning by NEW> use MARC::Record as parameters. it's the API that
MUST be used in MARC acquisition system. They just create the hash, add it the
raw marc record. Then, they call REALxxx sub.
+all I<subs beginning by NEW> use MARC::Record as parameters. It's the API that
MUST be used in the MARC acquisition system. They just create the hash, add it
the raw marc record. Then, they call REALxxx sub.
-all subs requires/use $dbh as 1st parameter and a MARC::Record object as 2nd
parameter. they sometimes requires another parameter.
+all subs requires/use $dbh as 1st parameter and a MARC::Record object as 2nd
parameter. They sometimes require another parameter.
=back
@@ -133,9 +138,9 @@
=over 4
-all I<subs beginning by seomething else> are the old-style API. They use a
hash as parameter, transform the hash into a -small- marc record, and calls
REAL subs.
+all I<subs beginning by seomething else> are the old-style API. They use a
hash as parameter, transform the hash into a -small- marc record, and call REAL
subs.
-all subs requires/use $dbh as 1st parameter and a hash as 2nd parameter.
+all subs require/use $dbh as 1st parameter and a hash as 2nd parameter.
=back
@@ -143,48 +148,6 @@
=cut
-sub zebra_create {
- my ($biblionumber,$record) = @_;
- # create the iso2709 file for zebra
-# my $cgidir = C4::Context->intranetdir ."/cgi-bin";
-# unless (opendir(DIR, "$cgidir")) {
-# $cgidir = C4::Context->intranetdir."/";
-# }
-# closedir DIR;
-# my $filename = $cgidir."/zebra/biblios/BIBLIO".$biblionumber."iso2709";
-# open F,"> $filename";
-# print F $record->as_usmarc();
-# close F;
-# my $res = system("cd $cgidir/zebra;/usr/local/bin/zebraidx update
biblios");
-# unlink($filename);
- my $Zconn;
- my $xmlrecord;
- warn "zebra_create : $biblionumber =".$record->as_formatted;
- eval {
- $xmlrecord=$record->as_xml();
- };
- if ($@){
- warn "ERROR badly formatted marc record";
- warn "Skipping record";
- }
- else {
- eval {
- $Zconn = new ZOOM::Connection(C4::Context->config("zebradb"));
- };
- if ($@){
- warn "Error ", address@hidden>code(), ": ",
address@hidden>message(), "\n";
- die "Fatal error, cant connect to z3950 server";
- }
-
- $Zconn->option(cqlfile =>
C4::Context->config("intranetdir")."/zebra/pqf.properties");
- my $Zpackage = $Zconn->package();
- $Zpackage->option(action => "specialUpdate");
- $Zpackage->option(record => $xmlrecord);
- $Zpackage->send("update");
- $Zpackage->destroy;
- }
-}
-
=head
z3950_extended_services can handle any interaction with Zebra's extended
serices package.
@@ -3058,8 +3021,12 @@
=cut
-# $Id: Biblio.pm,v 1.147 2006/02/25 19:09:59 kados Exp $
+# $Id: Biblio.pm,v 1.148 2006/02/25 19:23:01 kados Exp $
# $Log: Biblio.pm,v $
+# Revision 1.148 2006/02/25 19:23:01 kados
+# cleaning up POD docs, deleting zebra_create as it's no longer used (
+# replaced by z3950_extended_services).
+#
# Revision 1.147 2006/02/25 19:09:59 kados
# readding some lost subs
#
- [Koha-cvs] koha/C4 Biblio.pm, paul poulain, 2006/02/13
- [Koha-cvs] koha/C4 Biblio.pm, Chris Cormack, 2006/02/14
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/14
- [Koha-cvs] koha/C4 Biblio.pm, Chris Cormack, 2006/02/16
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/16
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/20
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/20
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/21
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm,
Joshua Ferraro <=
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/25
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/26
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/28
- [Koha-cvs] koha/C4 Biblio.pm, Joshua Ferraro, 2006/02/28