/**
  * Retrieve list of files to be harvested, filter by date
  *
  * @throws Exception
  * @return string[]
  */
 protected function retrieveFileList()
 {
     $list = parent::retrieveFileList();
     // Take only the latest file
     if ($list) {
         $list = [array_pop($list)];
     }
     return $list;
 }
示例#2
0
 /**
  * Fetch a file to be harvested
  *
  * @param string $filename File to retrieve
  *
  * @return string xml
  * @throws Exception
  */
 protected function retrieveFile($filename)
 {
     $data = parent::retrieveFile($filename);
     $data = str_replace('<collection xmlns="http://www.loc.gov/MARC21/slim">', '<collection>', $data);
     return $data;
 }