Koha::MetadataRecord - base class for metadata records
my $record = new Koha::MetadataRecord({ 'record' => $record });
Object-oriented class that encapsulates all metadata (i.e. bibliographic and authority) records in Koha.
my $metadata_record = new Koha::MetadataRecord({ record => $record, schema => $schema, format => $format, id => $id });
Returns a Koha::MetadataRecord object encapsulating record metadata.
$record
is expected to be a deserialized object (for example a MARC::Record or XML::LibXML::Document object or JSON).
$schema
is used to describe the metadata schema (for example marc21, unimarc, dc, mods, etc).
$format
is used to specify the serialization format. It is important for Koha::RecordProcessor because it will pick the right Koha::Filter implementation based on this parameter. Valid values are:
MARC (for MARC::Record objects) XML (for XML::LibXML::Document objects) JSON (for JSON objects)
(optional) $id
is used so the record carries its own id and Koha doesn't need to look for it inside the record.
Create a hash for use when merging records. At the moment the only metadata schema supported is MARC.