<<

NAME

C4::Heading

SYNOPSIS

 use C4::Heading;
 my $heading = C4::Heading->new_from_field($field, $frameworkcode);
 my $thesaurus = $heading->thesaurus();
 my $type = $heading->type();
 my $display_heading = $heading->display_form();
 my $search_form = $heading->search_form();

DESCRIPTION

C4::Heading implements a simple class to representing headings found in bibliographic and authority records.

METHODS

new_from_field

  my $heading = C4::Heading->new_from_field($field, $frameworkcode, [, $auth]);

Given a MARC::Field object containing a heading from a bib record, create a C4::Heading object.

The optional third parameter is 'auth' - it is handled as boolean. If supplied we treat the field as an auth record field. Otherwise if it is a bib field. The fields checked are the same in a UNIMARC system and this parameter is ignored

If the MARC field supplied is not a valid heading, undef is returned.

auth_type

  my $auth_type = $heading->auth_type();

Return the auth_type of the heading.

field

  my $field = $heading->field();

Return the MARC::Field the heading is based on.

display_form

  my $display = $heading->display_form();

Return the "canonical" display form of the heading.

search_form

  my $search_form = $heading->search_form();

Return the "canonical" search form of the heading.

authorities

  my $authorities = $heading->authorities([$skipmetadata]);

Return a list of authority records for this heading. If passed a true value for $skipmetadata, SearchAuthorities will return only authids.

preferred_authorities

  my $preferred_authorities = $heading->preferred_authorities;

Return a list of authority records for headings that are a preferred form of the heading.

valid_heading_subfield

    if (C4::Heading::valid_heading_subfield('100', 'e', '')) ...

INTERNAL METHODS

_search

INTERNAL FUNCTIONS

_marc_format_handler

Returns a C4::Heading::MARC21 or C4::Heading::UNIMARC object depending on the selected MARC flavour.

AUTHOR

Koha Development Team <http://koha-community.org/>

Galen Charlton <galen.charlton@liblime.com>

<<