NAME
Catmandu::Fix::pica_add - add new subfields to record
SYNOPSIS
# Copy value of dc.identifier to PICA field 003A as subfield 0
pica_add('dc.identifier', '003A$0');
# Same as above, but use another record path ('pica')
pica_add('dc.identifier', '003A$0', record:'pica');
# force the creation of a new field 003A
pica_add('dc.identifier', '003A$0', force_new:1);
# Add multiple subfields
# "dc": {"subjects": ["foo", "bar"]}
pica_add('dc.subjects', '004F$af')
DESCRIPTION
This fix adds subfields with value of PATH to the PICA field. The value of PATH must be either a scalar or an array.
If PICA field does not exist, it will be created.
FUNCTIONS
pica_add(PATH, PICA_PATH, [OPTIONS])
Options
record - alternative record key (default is 'record')
force_new - force the creation of a new field
SEE ALSO
See Catmandu::Fix::pica_set and Catmandu::Fix:pica_update for setting new values to (sub)fields.
See Catmandu::Fix::pica_map if you want to copy values from a PICA record.
See PICA::Path for a definition of PICA path expressions and PICA::Data for more methods to process parsed PICA+ records.