Mapper
From DISMARC Help
Mappers are part of an Importer. They convert the XML they get from a Reader and try to create an XML that fulfills the DISMARC application profile.
Each archive needs it's own mapper, except if they use a predefined format like MAB, OAI and so on.
A mapper is capable of doing some things to your XML. This topic is quite technical for the AbstractDismarcImporter is discussed here.
Class [ <user> abstract class AbstractDismarcMapper extends AbstractMapper ] { Method [ <user, overwrites AbstractMapper, ctor> public method __construct ] /** * Parses a string into a date and returns a value suitable for the dmEras thesaurus or empty string * * @param String $date * @return String */ Method [ <user> protected method getYearForDmEras ]
Method [ <user, inherits AbstractMapper> public method setAdditionalSubstFile ] /** * Adds the approriate thesaurus fields to the record * * @param String $thesaurus * @param String $term * @param MdmMappedDocument $mdoc * @param String $section * @param String $fieldname * @param String $setAtt which attribute shall hold the thesaurus name * @param boolean $addIfNotFound add the searchterm if the thesaurusterm was not found * @param GetTreeNodeScope $scopeNode * @return boolean */ Method [ <user, inherits AbstractMapper> public method lookupThesaurus ] /** * language for thesaurus terms * * @param String $lang iso3 */ Method [ <user, inherits AbstractMapper> public method setLang ] Method [ <user, inherits AbstractMapper> public method getLang ] /** * Maps records gathered from AbstractRecordReader to valid MDM Docs * * @param DOMDocument $doc * @param Boolean $appendRawData * @return [DOMDocument] */ Method [ <user, inherits AbstractMapper> public method map ] /** * checks if the document is valid or not by writing the XML and pasing it again * * @param DOMDocument $doc */ Method [ <user, inherits AbstractMapper> private method checkDoc ] /** * @param DOMDocument $doc * @return MdmMappedDocument */ Method [ <user, inherits AbstractMapper> abstract protected method map_ ] /** * * @param array $descrDoc * */ Method [ <user, inherits AbstractMapper> public method setFieldHierarchy ] /** * Is no collection specified during the mapping, this collection will be used * * @param String $collection */ Method [ <user, inherits AbstractMapper> public method setDefaultCollection ] /** * @param String $string */ Method [ <user, inherits AbstractMapper> public method stdout ] /** * @param String $string */ Method [ <user, inherits AbstractMapper> public method stderr ] /** * @param Boolean $verbose */ Method [ <user, inherits AbstractMapper> public method setVerbose ] /** * @return MdmMappedDocument */ Method [ <user, inherits AbstractMapper> protected method getNewMappedDoc ]
/** * @param NamedArray $array * @param String &$io_text * @param String[] &$io_found * @param String[] $keep * @param String $seperator * @param String $lencl * @param String $rencl * @return Boolean if something was found */ Method [ <user, inherits AbstractMapper> protected method findInString ] /** * @param NamedArray $array * @param String &$io_text * @param String $seperator * @param String $lencl * @param String $rencl * @return Boolean if something was found */ Method [ <user, inherits AbstractMapper> protected method replaceInString ] /** * @param String $filename filename of the substitutionfile * @param boolean $override shall old files be overwritten */ Method [ <user, inherits AbstractMapper> public method loadSubstitutionfile ] /** * returns the substituted value of if $defualt is set to null and no term was found, the term will be returned * * @param String $field * @param String $namespace * @param String $term * @return Array */ Method [ <user, inherits AbstractMapper> public method getFromSubstitution ] /** * Returns the array needed for the findInString function from the substitutiontable * * @param String $field * @param String $namespace * @param Array $ioArray * @param array $ioKeey */ Method [ <user, inherits AbstractMapper> public method getForFindInStringFromSubstitution ] }