|
Lines 27-33
use Carp;
Link Here
|
| 27 |
use MARC::Record; |
27 |
use MARC::Record; |
| 28 |
use MARC::File::USMARC; |
28 |
use MARC::File::USMARC; |
| 29 |
use MARC::File::XML; |
29 |
use MARC::File::XML; |
| 30 |
use ZOOM; |
|
|
| 31 |
use POSIX qw(strftime); |
30 |
use POSIX qw(strftime); |
| 32 |
|
31 |
|
| 33 |
use C4::Koha; |
32 |
use C4::Koha; |
|
Lines 35-43
use C4::Dates qw/format_date/;
Link Here
|
| 35 |
use C4::Log; # logaction |
34 |
use C4::Log; # logaction |
| 36 |
use C4::ClassSource; |
35 |
use C4::ClassSource; |
| 37 |
use C4::Charset; |
36 |
use C4::Charset; |
| 38 |
require C4::Heading; |
|
|
| 39 |
require C4::Serials; |
| 40 |
require C4::Items; |
| 41 |
|
37 |
|
| 42 |
use vars qw($VERSION @ISA @EXPORT); |
38 |
use vars qw($VERSION @ISA @EXPORT); |
| 43 |
|
39 |
|
|
Lines 131-137
BEGIN {
Link Here
|
| 131 |
&TransformHtmlToMarc2 |
127 |
&TransformHtmlToMarc2 |
| 132 |
&TransformHtmlToMarc |
128 |
&TransformHtmlToMarc |
| 133 |
&TransformHtmlToXml |
129 |
&TransformHtmlToXml |
| 134 |
&PrepareItemrecordDisplay |
|
|
| 135 |
&GetNoZebraIndexes |
130 |
&GetNoZebraIndexes |
| 136 |
); |
131 |
); |
| 137 |
} |
132 |
} |
|
Lines 418-426
sub DelBiblio {
Link Here
|
| 418 |
return $error if $error; |
413 |
return $error if $error; |
| 419 |
|
414 |
|
| 420 |
# We delete attached subscriptions |
415 |
# We delete attached subscriptions |
| 421 |
my $subscriptions = &C4::Serials::GetFullSubscriptionsFromBiblionumber($biblionumber); |
416 |
require C4::Serials; |
|
|
417 |
my $subscriptions = C4::Serials::GetFullSubscriptionsFromBiblionumber($biblionumber); |
| 422 |
foreach my $subscription (@$subscriptions) { |
418 |
foreach my $subscription (@$subscriptions) { |
| 423 |
&C4::Serials::DelSubscription( $subscription->{subscriptionid} ); |
419 |
C4::Serials::DelSubscription( $subscription->{subscriptionid} ); |
| 424 |
} |
420 |
} |
| 425 |
|
421 |
|
| 426 |
# Delete in Zebra. Be careful NOT to move this line after _koha_delete_biblio |
422 |
# Delete in Zebra. Be careful NOT to move this line after _koha_delete_biblio |
|
Lines 478-483
MARC record.
Link Here
|
| 478 |
=cut |
474 |
=cut |
| 479 |
|
475 |
|
| 480 |
sub LinkBibHeadingsToAuthorities { |
476 |
sub LinkBibHeadingsToAuthorities { |
|
|
477 |
require C4::Heading; |
| 481 |
my $bib = shift; |
478 |
my $bib = shift; |
| 482 |
|
479 |
|
| 483 |
my $num_headings_changed = 0; |
480 |
my $num_headings_changed = 0; |
|
Lines 2450-2681
sub TransformMarcToKohaOneField {
Link Here
|
| 2450 |
return $result; |
2447 |
return $result; |
| 2451 |
} |
2448 |
} |
| 2452 |
|
2449 |
|
| 2453 |
=head1 OTHER FUNCTIONS |
|
|
| 2454 |
|
| 2455 |
|
| 2456 |
=head2 PrepareItemrecordDisplay |
| 2457 |
|
| 2458 |
PrepareItemrecordDisplay($itemrecord,$bibnum,$itemumber,$frameworkcode); |
| 2459 |
|
| 2460 |
Returns a hash with all the fields for Display a given item data in a template |
| 2461 |
|
| 2462 |
The $frameworkcode returns the item for the given frameworkcode, ONLY if bibnum is not provided |
| 2463 |
|
| 2464 |
=cut |
| 2465 |
|
| 2466 |
sub PrepareItemrecordDisplay { |
| 2467 |
|
| 2468 |
my ( $bibnum, $itemnum, $defaultvalues, $frameworkcode ) = @_; |
| 2469 |
|
| 2470 |
my $dbh = C4::Context->dbh; |
| 2471 |
$frameworkcode = &GetFrameworkCode($bibnum) if $bibnum; |
| 2472 |
my ( $itemtagfield, $itemtagsubfield ) = &GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
| 2473 |
my $tagslib = &GetMarcStructure( 1, $frameworkcode ); |
| 2474 |
|
| 2475 |
# return nothing if we don't have found an existing framework. |
| 2476 |
return q{} unless $tagslib; |
| 2477 |
my $itemrecord; |
| 2478 |
if ($itemnum) { |
| 2479 |
$itemrecord = C4::Items::GetMarcItem( $bibnum, $itemnum ); |
| 2480 |
} |
| 2481 |
my @loop_data; |
| 2482 |
my $authorised_values_sth = $dbh->prepare( "SELECT authorised_value,lib FROM authorised_values WHERE category=? ORDER BY lib" ); |
| 2483 |
foreach my $tag ( sort keys %{$tagslib} ) { |
| 2484 |
my $previous_tag = ''; |
| 2485 |
if ( $tag ne '' ) { |
| 2486 |
|
| 2487 |
# loop through each subfield |
| 2488 |
my $cntsubf; |
| 2489 |
foreach my $subfield ( sort keys %{ $tagslib->{$tag} } ) { |
| 2490 |
next if ( subfield_is_koha_internal_p($subfield) ); |
| 2491 |
next if ( $tagslib->{$tag}->{$subfield}->{'tab'} ne "10" ); |
| 2492 |
my %subfield_data; |
| 2493 |
$subfield_data{tag} = $tag; |
| 2494 |
$subfield_data{subfield} = $subfield; |
| 2495 |
$subfield_data{countsubfield} = $cntsubf++; |
| 2496 |
$subfield_data{kohafield} = $tagslib->{$tag}->{$subfield}->{'kohafield'}; |
| 2497 |
|
| 2498 |
# $subfield_data{marc_lib}=$tagslib->{$tag}->{$subfield}->{lib}; |
| 2499 |
$subfield_data{marc_lib} = $tagslib->{$tag}->{$subfield}->{lib}; |
| 2500 |
$subfield_data{mandatory} = $tagslib->{$tag}->{$subfield}->{mandatory}; |
| 2501 |
$subfield_data{repeatable} = $tagslib->{$tag}->{$subfield}->{repeatable}; |
| 2502 |
$subfield_data{hidden} = "display:none" |
| 2503 |
if $tagslib->{$tag}->{$subfield}->{hidden}; |
| 2504 |
my ( $x, $defaultvalue ); |
| 2505 |
if ($itemrecord) { |
| 2506 |
( $x, $defaultvalue ) = _find_value( $tag, $subfield, $itemrecord ); |
| 2507 |
} |
| 2508 |
$defaultvalue = $tagslib->{$tag}->{$subfield}->{defaultvalue} unless $defaultvalue; |
| 2509 |
if ( !defined $defaultvalue ) { |
| 2510 |
$defaultvalue = q||; |
| 2511 |
} |
| 2512 |
$defaultvalue =~ s/"/"/g; |
| 2513 |
|
| 2514 |
# search for itemcallnumber if applicable |
| 2515 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
| 2516 |
&& C4::Context->preference('itemcallnumber') ) { |
| 2517 |
my $CNtag = substr( C4::Context->preference('itemcallnumber'), 0, 3 ); |
| 2518 |
my $CNsubfield = substr( C4::Context->preference('itemcallnumber'), 3, 1 ); |
| 2519 |
if ($itemrecord) { |
| 2520 |
my $temp = $itemrecord->field($CNtag); |
| 2521 |
if ($temp) { |
| 2522 |
$defaultvalue = $temp->subfield($CNsubfield); |
| 2523 |
} |
| 2524 |
} |
| 2525 |
} |
| 2526 |
if ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.itemcallnumber' |
| 2527 |
&& $defaultvalues |
| 2528 |
&& $defaultvalues->{'callnumber'} ) { |
| 2529 |
my $temp; |
| 2530 |
if ($itemrecord) { |
| 2531 |
$temp = $itemrecord->field($subfield); |
| 2532 |
} |
| 2533 |
unless ($temp) { |
| 2534 |
$defaultvalue = $defaultvalues->{'callnumber'} if $defaultvalues; |
| 2535 |
} |
| 2536 |
} |
| 2537 |
if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.holdingbranch' || $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.homebranch' ) |
| 2538 |
&& $defaultvalues |
| 2539 |
&& $defaultvalues->{'branchcode'} ) { |
| 2540 |
my $temp; |
| 2541 |
if ($itemrecord) { |
| 2542 |
$temp = $itemrecord->field($subfield); |
| 2543 |
} |
| 2544 |
unless ($temp) { |
| 2545 |
$defaultvalue = $defaultvalues->{branchcode} if $defaultvalues; |
| 2546 |
} |
| 2547 |
} |
| 2548 |
if ( ( $tagslib->{$tag}->{$subfield}->{kohafield} eq 'items.location' ) |
| 2549 |
&& $defaultvalues |
| 2550 |
&& $defaultvalues->{'location'} ) { |
| 2551 |
my $temp = $itemrecord->field($subfield) if ($itemrecord); |
| 2552 |
unless ($temp) { |
| 2553 |
$defaultvalue = $defaultvalues->{location} if $defaultvalues; |
| 2554 |
} |
| 2555 |
} |
| 2556 |
if ( $tagslib->{$tag}->{$subfield}->{authorised_value} ) { |
| 2557 |
my @authorised_values; |
| 2558 |
my %authorised_lib; |
| 2559 |
|
| 2560 |
# builds list, depending on authorised value... |
| 2561 |
#---- branch |
| 2562 |
if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) { |
| 2563 |
if ( ( C4::Context->preference("IndependantBranches") ) |
| 2564 |
&& ( C4::Context->userenv->{flags} % 2 != 1 ) ) { |
| 2565 |
my $sth = $dbh->prepare( "SELECT branchcode,branchname FROM branches WHERE branchcode = ? ORDER BY branchname" ); |
| 2566 |
$sth->execute( C4::Context->userenv->{branch} ); |
| 2567 |
push @authorised_values, "" |
| 2568 |
unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); |
| 2569 |
while ( my ( $branchcode, $branchname ) = $sth->fetchrow_array ) { |
| 2570 |
push @authorised_values, $branchcode; |
| 2571 |
$authorised_lib{$branchcode} = $branchname; |
| 2572 |
} |
| 2573 |
} else { |
| 2574 |
my $sth = $dbh->prepare( "SELECT branchcode,branchname FROM branches ORDER BY branchname" ); |
| 2575 |
$sth->execute; |
| 2576 |
push @authorised_values, "" |
| 2577 |
unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); |
| 2578 |
while ( my ( $branchcode, $branchname ) = $sth->fetchrow_array ) { |
| 2579 |
push @authorised_values, $branchcode; |
| 2580 |
$authorised_lib{$branchcode} = $branchname; |
| 2581 |
} |
| 2582 |
} |
| 2583 |
|
| 2584 |
#----- itemtypes |
| 2585 |
} elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) { |
| 2586 |
my $sth = $dbh->prepare( "SELECT itemtype,description FROM itemtypes ORDER BY description" ); |
| 2587 |
$sth->execute; |
| 2588 |
push @authorised_values, "" |
| 2589 |
unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); |
| 2590 |
while ( my ( $itemtype, $description ) = $sth->fetchrow_array ) { |
| 2591 |
push @authorised_values, $itemtype; |
| 2592 |
$authorised_lib{$itemtype} = $description; |
| 2593 |
} |
| 2594 |
#---- class_sources |
| 2595 |
} elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "cn_source" ) { |
| 2596 |
push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); |
| 2597 |
|
| 2598 |
my $class_sources = GetClassSources(); |
| 2599 |
my $default_source = C4::Context->preference("DefaultClassificationSource"); |
| 2600 |
|
| 2601 |
foreach my $class_source (sort keys %$class_sources) { |
| 2602 |
next unless $class_sources->{$class_source}->{'used'} or |
| 2603 |
($class_source eq $default_source); |
| 2604 |
push @authorised_values, $class_source; |
| 2605 |
$authorised_lib{$class_source} = $class_sources->{$class_source}->{'description'}; |
| 2606 |
} |
| 2607 |
|
| 2608 |
#---- "true" authorised value |
| 2609 |
} else { |
| 2610 |
$authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value} ); |
| 2611 |
push @authorised_values, "" |
| 2612 |
unless ( $tagslib->{$tag}->{$subfield}->{mandatory} ); |
| 2613 |
while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) { |
| 2614 |
push @authorised_values, $value; |
| 2615 |
$authorised_lib{$value} = $lib; |
| 2616 |
} |
| 2617 |
} |
| 2618 |
$subfield_data{marc_value} = CGI::scrolling_list( |
| 2619 |
-name => 'field_value', |
| 2620 |
-values => \@authorised_values, |
| 2621 |
-default => "$defaultvalue", |
| 2622 |
-labels => \%authorised_lib, |
| 2623 |
-size => 1, |
| 2624 |
-tabindex => '', |
| 2625 |
-multiple => 0, |
| 2626 |
); |
| 2627 |
} elsif ( $tagslib->{$tag}->{$subfield}->{value_builder} ) { |
| 2628 |
# opening plugin |
| 2629 |
my $plugin = C4::Context->intranetdir . "/cataloguing/value_builder/" . $tagslib->{$tag}->{$subfield}->{'value_builder'}; |
| 2630 |
if (do $plugin) { |
| 2631 |
my $temp; |
| 2632 |
my $extended_param = plugin_parameters( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); |
| 2633 |
my ( $function_name, $javascript ) = plugin_javascript( $dbh, $temp, $tagslib, $subfield_data{id}, undef ); |
| 2634 |
$subfield_data{random} = int(rand(1000000)); # why do we need 2 different randoms? |
| 2635 |
my $index_subfield = int(rand(1000000)); |
| 2636 |
$subfield_data{id} = "tag_".$tag."_subfield_".$subfield."_".$index_subfield; |
| 2637 |
$subfield_data{marc_value} = qq[<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" |
| 2638 |
onfocus="Focus$function_name($subfield_data{random}, '$subfield_data{id}');" |
| 2639 |
onblur=" Blur$function_name($subfield_data{random}, '$subfield_data{id}');" /> |
| 2640 |
<a href="#" class="buttonDot" onclick="Clic$function_name('$subfield_data{id}'); return false;" title="Tag Editor">...</a> |
| 2641 |
$javascript]; |
| 2642 |
} else { |
| 2643 |
warn "Plugin Failed: $plugin"; |
| 2644 |
$subfield_data{marc_value} = qq(<input tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" />); # supply default input form |
| 2645 |
} |
| 2646 |
} |
| 2647 |
elsif ( $tag eq '' ) { # it's an hidden field |
| 2648 |
$subfield_data{marc_value} = qq(<input type="hidden" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); |
| 2649 |
} |
| 2650 |
elsif ( $tagslib->{$tag}->{$subfield}->{'hidden'} ) { # FIXME: shouldn't input type be "hidden" ? |
| 2651 |
$subfield_data{marc_value} = qq(<input type="text" tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255" value="$defaultvalue" />); |
| 2652 |
} |
| 2653 |
elsif ( length($defaultvalue) > 100 |
| 2654 |
or (C4::Context->preference("marcflavour") eq "UNIMARC" and |
| 2655 |
300 <= $tag && $tag < 400 && $subfield eq 'a' ) |
| 2656 |
or (C4::Context->preference("marcflavour") eq "MARC21" and |
| 2657 |
500 <= $tag && $tag < 600 ) |
| 2658 |
) { |
| 2659 |
# oversize field (textarea) |
| 2660 |
$subfield_data{marc_value} = qq(<textarea tabindex="1" id="$subfield_data{id}" name="field_value" class="input_marceditor" size="67" maxlength="255">$defaultvalue</textarea>\n"); |
| 2661 |
} else { |
| 2662 |
$subfield_data{marc_value} = "<input type=\"text\" name=\"field_value\" value=\"$defaultvalue\" size=\"50\" maxlength=\"255\" />"; |
| 2663 |
} |
| 2664 |
push( @loop_data, \%subfield_data ); |
| 2665 |
} |
| 2666 |
} |
| 2667 |
} |
| 2668 |
my $itemnumber; |
| 2669 |
if ( $itemrecord && $itemrecord->field($itemtagfield) ) { |
| 2670 |
$itemnumber = $itemrecord->subfield( $itemtagfield, $itemtagsubfield ); |
| 2671 |
} |
| 2672 |
return { |
| 2673 |
'itemtagfield' => $itemtagfield, |
| 2674 |
'itemtagsubfield' => $itemtagsubfield, |
| 2675 |
'itemnumber' => $itemnumber, |
| 2676 |
'iteminformation' => \@loop_data |
| 2677 |
}; |
| 2678 |
} |
| 2679 |
|
2450 |
|
| 2680 |
#" |
2451 |
#" |
| 2681 |
|
2452 |
|
|
Lines 2839-2844
sub EmbedItemsInMarcBiblio {
Link Here
|
| 2839 |
my @item_fields; |
2610 |
my @item_fields; |
| 2840 |
my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
2611 |
my ( $itemtag, $itemsubfield ) = GetMarcFromKohaField( "items.itemnumber", $frameworkcode ); |
| 2841 |
while (my ($itemnumber) = $sth->fetchrow_array) { |
2612 |
while (my ($itemnumber) = $sth->fetchrow_array) { |
|
|
2613 |
require C4::Items; |
| 2842 |
my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); |
2614 |
my $item_marc = C4::Items::GetMarcItem($biblionumber, $itemnumber); |
| 2843 |
push @item_fields, $item_marc->field($itemtag); |
2615 |
push @item_fields, $item_marc->field($itemtag); |
| 2844 |
} |
2616 |
} |
|
Lines 3632-3743
sub ModBiblioMarc {
Link Here
|
| 3632 |
return $biblionumber; |
3404 |
return $biblionumber; |
| 3633 |
} |
3405 |
} |
| 3634 |
|
3406 |
|
| 3635 |
=head2 z3950_extended_services |
|
|
| 3636 |
|
| 3637 |
z3950_extended_services($serviceType,$serviceOptions,$record); |
| 3638 |
|
| 3639 |
z3950_extended_services is used to handle all interactions with Zebra's extended serices package, which is employed to perform all management of the MARC data stored in Zebra. |
| 3640 |
|
| 3641 |
C<$serviceType> one of: itemorder,create,drop,commit,update,xmlupdate |
| 3642 |
|
| 3643 |
C<$serviceOptions> a has of key/value pairs. For instance, if service_type is 'update', $service_options should contain: |
| 3644 |
|
| 3645 |
action => update action, one of specialUpdate, recordInsert, recordReplace, recordDelete, elementUpdate. |
| 3646 |
|
| 3647 |
and maybe |
| 3648 |
|
| 3649 |
recordidOpaque => Opaque Record ID (user supplied) or recordidNumber => Record ID number (system number). |
| 3650 |
syntax => the record syntax (transfer syntax) |
| 3651 |
databaseName = Database from connection object |
| 3652 |
|
| 3653 |
To set serviceOptions, call set_service_options($serviceType) |
| 3654 |
|
| 3655 |
C<$record> the record, if one is needed for the service type |
| 3656 |
|
| 3657 |
A record should be in XML. You can convert it to XML from MARC by running it through marc2xml(). |
| 3658 |
|
| 3659 |
=cut |
| 3660 |
|
| 3661 |
sub z3950_extended_services { |
| 3662 |
my ( $server, $serviceType, $action, $serviceOptions ) = @_; |
| 3663 |
|
| 3664 |
# get our connection object |
| 3665 |
my $Zconn = C4::Context->Zconn( $server, 0, 1 ); |
| 3666 |
|
| 3667 |
# create a new package object |
| 3668 |
my $Zpackage = $Zconn->package(); |
| 3669 |
|
| 3670 |
# set our options |
| 3671 |
$Zpackage->option( action => $action ); |
| 3672 |
|
| 3673 |
if ( $serviceOptions->{'databaseName'} ) { |
| 3674 |
$Zpackage->option( databaseName => $serviceOptions->{'databaseName'} ); |
| 3675 |
} |
| 3676 |
if ( $serviceOptions->{'recordIdNumber'} ) { |
| 3677 |
$Zpackage->option( recordIdNumber => $serviceOptions->{'recordIdNumber'} ); |
| 3678 |
} |
| 3679 |
if ( $serviceOptions->{'recordIdOpaque'} ) { |
| 3680 |
$Zpackage->option( recordIdOpaque => $serviceOptions->{'recordIdOpaque'} ); |
| 3681 |
} |
| 3682 |
|
| 3683 |
# this is an ILL request (Zebra doesn't support it, but Koha could eventually) |
| 3684 |
#if ($serviceType eq 'itemorder') { |
| 3685 |
# $Zpackage->option('contact-name' => $serviceOptions->{'contact-name'}); |
| 3686 |
# $Zpackage->option('contact-phone' => $serviceOptions->{'contact-phone'}); |
| 3687 |
# $Zpackage->option('contact-email' => $serviceOptions->{'contact-email'}); |
| 3688 |
# $Zpackage->option('itemorder-item' => $serviceOptions->{'itemorder-item'}); |
| 3689 |
#} |
| 3690 |
|
| 3691 |
if ( $serviceOptions->{record} ) { |
| 3692 |
$Zpackage->option( record => $serviceOptions->{record} ); |
| 3693 |
|
| 3694 |
# can be xml or marc |
| 3695 |
if ( $serviceOptions->{'syntax'} ) { |
| 3696 |
$Zpackage->option( syntax => $serviceOptions->{'syntax'} ); |
| 3697 |
} |
| 3698 |
} |
| 3699 |
|
| 3700 |
# send the request, handle any exception encountered |
| 3701 |
eval { $Zpackage->send($serviceType) }; |
| 3702 |
if ( $@ && $@->isa("ZOOM::Exception") ) { |
| 3703 |
return "error: " . $@->code() . " " . $@->message() . "\n"; |
| 3704 |
} |
| 3705 |
|
| 3706 |
# free up package resources |
| 3707 |
$Zpackage->destroy(); |
| 3708 |
} |
| 3709 |
|
| 3710 |
=head2 set_service_options |
| 3711 |
|
| 3712 |
my $serviceOptions = set_service_options($serviceType); |
| 3713 |
|
| 3714 |
C<$serviceType> itemorder,create,drop,commit,update,xmlupdate |
| 3715 |
|
| 3716 |
Currently, we only support 'create', 'commit', and 'update'. 'drop' support will be added as soon as Zebra supports it. |
| 3717 |
|
| 3718 |
=cut |
| 3719 |
|
| 3720 |
sub set_service_options { |
| 3721 |
my ($serviceType) = @_; |
| 3722 |
my $serviceOptions; |
| 3723 |
|
| 3724 |
# FIXME: This needs to be an OID ... if we ever need 'syntax' this sub will need to change |
| 3725 |
# $serviceOptions->{ 'syntax' } = ''; #zebra doesn't support syntaxes other than xml |
| 3726 |
|
| 3727 |
if ( $serviceType eq 'commit' ) { |
| 3728 |
|
| 3729 |
# nothing to do |
| 3730 |
} |
| 3731 |
if ( $serviceType eq 'create' ) { |
| 3732 |
|
| 3733 |
# nothing to do |
| 3734 |
} |
| 3735 |
if ( $serviceType eq 'drop' ) { |
| 3736 |
die "ERROR: 'drop' not currently supported (by Zebra)"; |
| 3737 |
} |
| 3738 |
return $serviceOptions; |
| 3739 |
} |
| 3740 |
|
| 3741 |
=head2 get_biblio_authorised_values |
3407 |
=head2 get_biblio_authorised_values |
| 3742 |
|
3408 |
|
| 3743 |
find the types and values for all authorised values assigned to this biblio. |
3409 |
find the types and values for all authorised values assigned to this biblio. |