Koha::Metadata - Koha Metadata Object class
my $record = $metadata->record;
Returns an object representing the metadata record. The expected record type corresponds to this table:
-------------------------------
| format | object type |
-------------------------------
| marcxml | MARC::Record |
-------------------------------
$record = $biblio->metadata->record({
{
embed_items => 0|1
itemnumbers => $itemnumbers,
opac => $opac
}
);
Koha::Biblio::Metadata::record(
{
record => $record,
embed_items => 1,
biblionumber => $biblionumber,
itemnumbers => $itemnumbers,
opac => $opac
}
);
Given a MARC::Record object containing a bib record, modify it to include the items attached to it as 9XX per the bib's MARC framework. if $itemnumbers is defined, only specified itemnumbers are embedded.
If $opac is true, then opac-relevant suppressions are included.
If opac filtering will be done, patron should be passed to properly override if necessary.
my $record = $metadata->record_strip_nonxml;
This subroutine is intended for cases where we encounter a record that cannot be parsed, but want to make a good effort to present the record (for harvesting, deletion, editing) rather than throwing an exception
Will return undef if the record cannot be built
if ( $metadata->source_allows_editing ) { ... }
Returns a boolean denoting whether the metadata's record source allows it to be edited.
my $record_source = $metadata->record_source;
Returns a Koha::RecordSource object for the linked record source.