|
Grima 2018-08
Whispering into Alma's ear
|
Methods for fields and subfields in Alma's MARCXML. More...
Public Member Functions | |
| useNormac () | |
| addControlField ($tag, $data) | |
| add a data field to the MARC record using Normac More... |
|
| addDataField ($tag, $indicators, $subfields) | |
| add a data field to the MARC record using Normac More... |
|
| normacToXML () | |
| convert normac fields back to XML More... |
|
| appendField ($tag, $ind1, $ind2, $subfields) ## XXX | |
| add a field to the MARC record More... |
|
| getFields ($tag) | |
| get fields for the given MARC tag More... |
|
| getMarcFields ($tag) | |
| get fields for the given MARC tag More... |
|
| getSubfieldValues ($tag, $code) | |
| get subfield value More... |
|
| deleteField ($tag) | |
| delete all $tag fields from the MARC record More... |
|
| deleteSubfieldMatching ($tag, $code, $regex) | |
| delete subfields matching a regex More... |
|
| deleteFieldMatching ($tag, $code, $regex) | |
| delete fields with subfields matching a regex More... |
|
| replaceOrAddSubfield ($tag, $code, $value) ## XXX | |
| replace or add subfield value in marc More... |
|
Public Member Functions inherited from AlmaObject
| |
| __construct () | |
| create new blank Alma Object More... |
|
| offsetExists ($offset) | |
| offsetGet ($offset) | |
| offsetSet ($offset, $value) | |
| offsetUnset ($offset) | |
Public Attributes | |
| $marc | |
Public Attributes inherited from AlmaObject
| |
| $el_access = array() | |
| $xml | |
| $templateDir = __DIR__ . "/templates" | |
| AlmaObjectWithMARC::addControlField | ( | $tag, | |
| $data | |||
| ) |
add a data field to the MARC record using Normac
| string | $tag | a three character MARC tag |
| string | $data | control field data |
Definition at line 2260 of file grima-lib.php.
References useNormac().
| AlmaObjectWithMARC::addDataField | ( | $tag, | |
| $indicators, | |||
| $subfields | |||
| ) |
add a data field to the MARC record using Normac
| string | $tag | a three character MARC tag |
| string | $indicators | both indicators in one string |
| Array | $subfields | each entry of the form $code => $value |
Definition at line 2277 of file grima-lib.php.
References useNormac().
| AlmaObjectWithMARC::appendField | ( | $tag, | |
| $ind1, | |||
| $ind2, | |||
| $subfields | |||
| ) |
add a field to the MARC record
| string | $tag | a three character MARC tag |
| Int | $ind1 | one digit, first indicator |
| Int | $ind2 | second digit, second indicator |
| Array | $subfields | each entry of the form $code => $value |
Definition at line 2336 of file grima-lib.php.
References useNormac().
Referenced by replaceOrAddSubfield().
| AlmaObjectWithMARC::deleteField | ( | $tag | ) |
delete all $tag fields from the MARC record
| string | $tag | a three character MARC tag |
Definition at line 2432 of file grima-lib.php.
| AlmaObjectWithMARC::deleteFieldMatching | ( | $tag, | |
| $code, | |||
| $regex | |||
| ) |
delete fields with subfields matching a regex
For example, delete all 856 fields with $u that contain "ezproxy" case insensitively, like: $this->deleteFieldMatching("856","u","/ezproxy/i");
| string | $tag | a three character MARC tag |
| string | $code | a subfield code |
| string | $regex | a regular expression |
Reimplemented in Holding.
Definition at line 2472 of file grima-lib.php.
References getFields(), and useNormac().
| AlmaObjectWithMARC::deleteSubfieldMatching | ( | $tag, | |
| $code, | |||
| $regex | |||
| ) |
delete subfields matching a regex
| Array | $subfields | each entry of the form $code => $value |
Reimplemented in Holding.
Definition at line 2448 of file grima-lib.php.
| AlmaObjectWithMARC::getFields | ( | $tag | ) |
get fields for the given MARC tag
| String | $tag | field |
Definition at line 2369 of file grima-lib.php.
References useNormac().
Referenced by deleteFieldMatching(), Holding\deleteFieldMatching(), Holding\deleteSubfieldMatching(), Holding\getInstitutionCode(), Holding\getLibraryCode(), Holding\getLocationCode(), Holding\getMethodOfAcquisition(), Bib\offsetGet(), Holding\setCallNumberType(), Holding\setInstitutionCode(), Holding\setLibraryCode(), Holding\setLocationCode(), and Holding\setMethodOfAcquisition().
| AlmaObjectWithMARC::getMarcFields | ( | $tag | ) |
get fields for the given MARC tag
| String | $tag | field |
Definition at line 2383 of file grima-lib.php.
| AlmaObjectWithMARC::getSubfieldValues | ( | $tag, | |
| $code | |||
| ) |
get subfield value
| String | $tag | field |
| String | $code | subfield |
Definition at line 2414 of file grima-lib.php.
Referenced by Holding\offsetGet().
| AlmaObjectWithMARC::normacToXML | ( | ) |
convert normac fields back to XML
Definition at line 2307 of file grima-lib.php.
References $marc.
Referenced by Bib\addToAlma(), Holding\addToAlmaBib(), Holding\setCallNumber(), Bib\updateAlma(), and Holding\updateAlma().
| AlmaObjectWithMARC::replaceOrAddSubfield | ( | $tag, | |
| $code, | |||
| $value | |||
| ) |
replace or add subfield value in marc
| string | $tag | a three character MARC tag |
| string | $code | a one letter subfield code |
| string | $value | what to set the value to |
Definition at line 2494 of file grima-lib.php.
References appendField().
Referenced by Bib\offsetSet().
| AlmaObjectWithMARC::useNormac | ( | ) |
Definition at line 2244 of file grima-lib.php.
Referenced by addControlField(), addDataField(), appendField(), deleteFieldMatching(), Holding\deleteFieldMatching(), Holding\deleteSubfieldMatching(), getFields(), Holding\getInstitutionCode(), Holding\getLibraryCode(), Holding\getLocationCode(), Holding\getMethodOfAcquisition(), Bib\loadFromAlma(), Holding\setCallNumberType(), Holding\setInstitutionCode(), Holding\setLibraryCode(), Holding\setLocationCode(), and Holding\setMethodOfAcquisition().
| AlmaObjectWithMARC::$marc |
Definition at line 2242 of file grima-lib.php.
Referenced by normacToXML().