O:39:"phpDocumentor\Descriptor\FileDescriptor":22:{s:7:"*hash";s:32:"2172d40616da46b8456848d228f9e489";s:7:"*path";s:23:"OaiPmh/RecordWriter.php";s:9:"*source";s:6708:" * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/indexing:oai-pmh Wiki */ namespace VuFindHarvest\OaiPmh; use VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyInterface; /** * OAI-PMH Record Writer * * @category VuFind * @package Harvest_Tools * @author Demian Katz * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/indexing:oai-pmh Wiki */ class RecordWriter { /** * Filename for logging harvested IDs (false for none) * * @var string|bool */ protected $harvestedIdLog = false; /** * OAI prefix to strip from ID values * * @var string */ protected $idPrefix = ''; /** * Regular expression searches * * @var array */ protected $idSearch = []; /** * Replacements for regular expression matches * * @var array */ protected $idReplace = []; /** * XML record formatter * * @var RecordXmlFormatter */ protected $recordFormatter; /** * Writer strategy * * @var RecordWriterStrategyInterface */ protected $strategy; /** * Constructor * * @param RecordWriterStrategyInterface $strategy Writing strategy * @param RecordXmlFormatter $formatter XML record formatter * @param array $settings Configuration settings */ public function __construct($strategy, $formatter, $settings = []) { $this->recordFormatter = $formatter; $this->strategy = $strategy; // Settings that may be mapped directly from $settings to class properties: $mappableSettings = [ 'harvestedIdLog', 'idPrefix', 'idReplace', 'idSearch', ]; foreach ($mappableSettings as $current) { if (isset($settings[$current])) { $this->$current = $settings[$current]; } } } /** * Extract the ID from a record object (support method for processRecords()). * * @param object $record SimpleXML record. * * @return string The ID value. */ protected function extractID($record) { // Normalize to string: $id = (string)$record->header->identifier; // Strip prefix if found: if (substr($id, 0, strlen($this->idPrefix)) == $this->idPrefix) { $id = substr($id, strlen($this->idPrefix)); } // Apply regular expression matching: if (!empty($this->idSearch)) { $id = preg_replace($this->idSearch, $this->idReplace, $id); } // Return final value: return $id; } /** * Normalize a date to a Unix timestamp. * * @param string $date Date (ISO-8601 or YYYY-MM-DD HH:MM:SS) * * @return integer Unix timestamp (or false if $date invalid) */ protected function normalizeDate($date) { // Remove timezone markers -- we don't want PHP to outsmart us by adjusting // the time zone! $date = str_replace(['T', 'Z'], [' ', ''], $date); // Translate to a timestamp: return strtotime($date); } /** * Write a log file of harvested IDs (if configured to do so). * * @param array $harvestedIds Harvested IDs * * @return void * @throws \Exception */ protected function writeHarvestedIdsLog($harvestedIds) { // Do we have IDs to log and a log filename? If so, log them: if (!empty($this->harvestedIdLog) && !empty($harvestedIds)) { $file = fopen($this->getBasePath() . $this->harvestedIdLog, 'a'); if (!$file) { throw new \Exception("Problem opening {$this->harvestedIdLog}."); } fputs($file, implode(PHP_EOL, $harvestedIds) . PHP_EOL); fclose($file); } } /** * Get base path for writes. * * @return string */ public function getBasePath() { return $this->strategy->getBasePath(); } /** * Save harvested records to disk and return the end date. * * @param object $records SimpleXML records. * * @return int */ public function write($records) { // Array for tracking successfully harvested IDs: $harvestedIds = []; // Date of most recent record encountered: $endDate = 0; $this->strategy->beginWrite(); // Loop through the records: foreach ($records as $record) { // Die if the record is missing its header: if (empty($record->header)) { throw new \Exception('Unexpected missing record header.'); } // Get the ID of the current record: $id = $this->extractID($record); // Save the current record, either as a deleted or as a regular file: $attribs = $record->header->attributes(); if (strtolower($attribs['status']) == 'deleted') { $this->strategy->addDeletedRecord($id); } else { $recordXML = $this->recordFormatter->format($id, $record); $this->strategy->addRecord($id, $recordXML); $harvestedIds[] = $id; } // If the current record's date is newer than the previous end date, // remember it for future reference: $date = $this->normalizeDate($record->header->datestamp); if ($date && $date > $endDate) { $endDate = $date; } } $this->strategy->endWrite(); $this->writeHarvestedIdsLog($harvestedIds); return $endDate; } } ";s:19:"*namespaceAliases";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:29:"RecordWriterStrategyInterface";s:65:"\VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyInterface";}}s:11:"*includes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:12:"*constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:12:"*functions";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*classes";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:34:"\VuFindHarvest\OaiPmh\RecordWriter";O:40:"phpDocumentor\Descriptor\ClassDescriptor":19:{s:9:"*parent";s:0:"";s:13:"*implements";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:11:"*abstract";b:0;s:8:"*final";b:0;s:12:"*constants";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:13:"*properties";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:6:{s:14:"harvestedIdLog";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";s:5:"false";s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:50:"\VuFindHarvest\OaiPmh\RecordWriter::harvestedIdLog";s:7:"*name";s:14:"harvestedIdLog";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:51:"Filename for logging harvested IDs (false for none)";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:48;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}i:1;O:47:"phpDocumentor\Descriptor\Type\BooleanDescriptor":0:{}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:8:"idPrefix";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";s:2:"''";s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:44:"\VuFindHarvest\OaiPmh\RecordWriter::idPrefix";s:7:"*name";s:8:"idPrefix";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:34:"OAI prefix to strip from ID values";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:55;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:8:"idSearch";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";s:7:"array()";s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:44:"\VuFindHarvest\OaiPmh\RecordWriter::idSearch";s:7:"*name";s:8:"idSearch";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:27:"Regular expression searches";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:62;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:9:"idReplace";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";s:7:"array()";s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:45:"\VuFindHarvest\OaiPmh\RecordWriter::idReplace";s:7:"*name";s:9:"idReplace";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:43:"Replacements for regular expression matches";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:69;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:15:"recordFormatter";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";N;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:51:"\VuFindHarvest\OaiPmh\RecordWriter::recordFormatter";s:7:"*name";s:15:"recordFormatter";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:20:"XML record formatter";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:76;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:40:"\VuFindHarvest\OaiPmh\RecordXmlFormatter";}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:8:"strategy";O:43:"phpDocumentor\Descriptor\PropertyDescriptor":16:{s:9:"*parent";r:16;s:8:"*types";N;s:10:"*default";N;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:8:"*fqsen";s:44:"\VuFindHarvest\OaiPmh\RecordWriter::strategy";s:7:"*name";s:8:"strategy";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:15:"Writer strategy";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:83;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:3:"var";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:42:"phpDocumentor\Descriptor\Tag\VarDescriptor":5:{s:15:"*variableName";s:0:"";s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:65:"\VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyInterface";}}}s:7:"*name";s:3:"var";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:10:"*methods";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:6:{s:11:"__construct";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{s:9:"$strategy";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:213;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:65:"\VuFindHarvest\RecordWriterStrategy\RecordWriterStrategyInterface";}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:9:"$strategy";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:16:"Writing strategy";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:10:"$formatter";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:213;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:40:"\VuFindHarvest\OaiPmh\RecordXmlFormatter";}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:10:"$formatter";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:20:"XML record formatter";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:9:"$settings";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:213;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:10:"*default";s:7:"array()";s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:9:"$settings";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:22:"Configuration settings";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:49:"\VuFindHarvest\OaiPmh\RecordWriter::__construct()";s:7:"*name";s:11:"__construct";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:11:"Constructor";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:92;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:9:"$strategy";s:8:"*types";r:223;s:7:"*name";s:5:"param";s:14:"*description";s:16:"Writing strategy";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}i:1;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:10:"$formatter";s:8:"*types";r:245;s:7:"*name";s:5:"param";s:14:"*description";s:20:"XML record formatter";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}i:2;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:9:"$settings";s:8:"*types";r:267;s:7:"*name";s:5:"param";s:14:"*description";s:22:"Configuration settings";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:9:"extractID";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:7:"$record";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:325;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:6:"object";}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:7:"$record";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:17:"SimpleXML record.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:47:"\VuFindHarvest\OaiPmh\RecordWriter::extractID()";s:7:"*name";s:9:"extractID";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:74:"Extract the ID from a record object (support method for processRecords()).";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:115;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:7:"$record";s:8:"*types";r:335;s:7:"*name";s:5:"param";s:14:"*description";s:17:"SimpleXML record.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:13:"The ID value.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:13:"normalizeDate";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:5:"$date";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:387;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:5:"$date";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:38:"Date (ISO-8601 or YYYY-MM-DD HH:MM:SS)";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:51:"\VuFindHarvest\OaiPmh\RecordWriter::normalizeDate()";s:7:"*name";s:13:"normalizeDate";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:37:"Normalize a date to a Unix timestamp.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:141;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:5:"$date";s:8:"*types";r:397;s:7:"*name";s:5:"param";s:14:"*description";s:38:"Date (ISO-8601 or YYYY-MM-DD HH:MM:SS)";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:47:"phpDocumentor\Descriptor\Type\IntegerDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:42:"Unix timestamp (or false if $date invalid)";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:20:"writeHarvestedIdsLog";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:9:"protected";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:13:"$harvestedIds";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:448;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:5:"array";}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:13:"$harvestedIds";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:13:"Harvested IDs";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:58:"\VuFindHarvest\OaiPmh\RecordWriter::writeHarvestedIdsLog()";s:7:"*name";s:20:"writeHarvestedIdsLog";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:59:"Write a log file of harvested IDs (if configured to do so).";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:159;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:3:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:13:"$harvestedIds";s:8:"*types";r:458;s:7:"*name";s:5:"param";s:14:"*description";s:13:"Harvested IDs";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:4:"void";}}}s:7:"*name";s:6:"return";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"throws";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ThrowsDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:10:"\Exception";}}}s:7:"*name";s:6:"throws";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:11:"getBasePath";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:49:"\VuFindHarvest\OaiPmh\RecordWriter::getBasePath()";s:7:"*name";s:11:"getBasePath";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:25:"Get base path for writes.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:177;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:46:"phpDocumentor\Descriptor\Type\StringDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}s:5:"write";O:41:"phpDocumentor\Descriptor\MethodDescriptor":17:{s:9:"*parent";r:16;s:11:"*abstract";b:0;s:8:"*final";b:0;s:9:"*static";b:0;s:13:"*visibility";s:6:"public";s:12:"*arguments";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{s:8:"$records";O:43:"phpDocumentor\Descriptor\ArgumentDescriptor":16:{s:9:"*method";r:555;s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:51:"phpDocumentor\Descriptor\Type\UnknownTypeDescriptor":1:{s:7:"*name";s:6:"object";}}}s:10:"*default";N;s:14:"*byReference";b:0;s:13:"*isVariadic";b:0;s:8:"*fqsen";s:0:"";s:7:"*name";s:8:"$records";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:0:"";s:14:"*description";s:18:"SimpleXML records.";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:8:"*fqsen";s:43:"\VuFindHarvest\OaiPmh\RecordWriter::write()";s:7:"*name";s:5:"write";s:12:"*namespace";N;s:10:"*package";s:0:"";s:10:"*summary";s:55:"Save harvested records to disk and return the end date.";s:14:"*description";s:0:"";s:17:"*fileDescriptor";N;s:7:"*line";i:189;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:2:{s:5:"param";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:44:"phpDocumentor\Descriptor\Tag\ParamDescriptor":5:{s:15:"*variableName";s:8:"$records";s:8:"*types";r:565;s:7:"*name";s:5:"param";s:14:"*description";s:18:"SimpleXML records.";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"return";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\ReturnDescriptor":4:{s:8:"*types";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:47:"phpDocumentor\Descriptor\Type\IntegerDescriptor":0:{}}}s:7:"*name";s:6:"return";s:14:"*description";s:0:"";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:13:"*usedTraits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:34:"\VuFindHarvest\OaiPmh\RecordWriter";s:7:"*name";s:12:"RecordWriter";s:12:"*namespace";s:21:"\VuFindHarvest\OaiPmh";s:10:"*package";s:13:"Harvest_Tools";s:10:"*summary";s:21:"OAI-PMH Record Writer";s:14:"*description";s:0:"";s:17:"*fileDescriptor";r:1;s:7:"*line";i:41;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:6:{s:8:"category";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:8:"category";s:14:"*description";s:6:"VuFind";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"package";s:14:"*description";s:13:"Harvest_Tools";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"author";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\AuthorDescriptor":3:{s:7:"*name";s:6:"author";s:14:"*description";s:39:"Demian Katz ";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:7:"license";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"license";s:14:"*description";s:69:"http://opensource.org/licenses/gpl-2.0.php GNU General Public License";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:4:"link";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:43:"phpDocumentor\Descriptor\Tag\LinkDescriptor":4:{s:7:"*link";s:40:"https://vufind.org/wiki/indexing:oai-pmh";s:7:"*name";s:4:"link";s:14:"*description";s:4:"Wiki";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}}}s:13:"*interfaces";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:9:"*traits";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:10:"*markers";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:8:"*fqsen";s:0:"";s:7:"*name";s:16:"RecordWriter.php";s:12:"*namespace";N;s:10:"*package";s:13:"Harvest_Tools";s:10:"*summary";s:21:"OAI-PMH Record Writer";s:14:"*description";s:667:"PHP version 7 Copyright (c) Demian Katz 2016. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA";s:17:"*fileDescriptor";N;s:7:"*line";i:0;s:7:"*tags";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:6:{s:8:"category";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:8:"category";s:14:"*description";s:6:"VuFind";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:7:"package";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"package";s:14:"*description";s:13:"Harvest_Tools";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:6:"author";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:45:"phpDocumentor\Descriptor\Tag\AuthorDescriptor":3:{s:7:"*name";s:6:"author";s:14:"*description";s:39:"Demian Katz ";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:7:"license";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:38:"phpDocumentor\Descriptor\TagDescriptor":3:{s:7:"*name";s:7:"license";s:14:"*description";s:69:"http://opensource.org/licenses/gpl-2.0.php GNU General Public License";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:4:"link";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:1:{i:0;O:43:"phpDocumentor\Descriptor\Tag\LinkDescriptor":4:{s:7:"*link";s:40:"https://vufind.org/wiki/indexing:oai-pmh";s:7:"*name";s:4:"link";s:14:"*description";s:4:"Wiki";s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}}s:10:"subpackage";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}}}s:9:"*errors";O:35:"phpDocumentor\Descriptor\Collection":1:{s:8:"*items";a:0:{}}s:19:"*inheritedElement";N;}