diff --git a/module/VuFind/src/VuFind/RecordDriver/WorldCat.php b/module/VuFind/src/VuFind/RecordDriver/WorldCat.php index 131a16e0b4911388e0202d3b57ce3caffdd65ba0..ee09e4f8c2fedcaad9a8da563d3c74f0a6550093 100644 --- a/module/VuFind/src/VuFind/RecordDriver/WorldCat.php +++ b/module/VuFind/src/VuFind/RecordDriver/WorldCat.php @@ -124,6 +124,16 @@ class WorldCat extends SolrMarc return $this->getFieldArray('245', array('h')); } + /** + * Get the OCLC number of the record. + * + * @return array + */ + public function getOCLC() + { + return array($this->getUniqueID()); + } + /** * Return the unique identifier of this record within the Solr index; * useful for retrieving additional information (like tags and user diff --git a/module/VuFind/src/VuFind/Related/WorldCatEditions.php b/module/VuFind/src/VuFind/Related/WorldCatEditions.php index 7f60d9b7ee9110cd6740c58f1bfca8d34453aac2..32d148299a34bac478db4481047f0f694fd0746b 100644 --- a/module/VuFind/src/VuFind/Related/WorldCatEditions.php +++ b/module/VuFind/src/VuFind/Related/WorldCatEditions.php @@ -80,17 +80,24 @@ class WorldCatEditions extends Editions protected function getQueryParts($driver) { $parts = array(); - if (method_exists($driver, 'getCleanISBN')) { - $isbn = $driver->getCleanISBN(); - if (!empty($isbn)) { - $isbnList = $this->wcUtils->getXISBN($isbn); + $oclcNum = $driver->tryMethod('getCleanOCLCNum'); + if (!empty($oclcNum)) { + $oclcList = $this->wcUtils->getXOCLCNUM($oclcNum); + if (!empty($oclcList)) { + $parts[] = '(srw.no any "' . implode(' ', $oclcList) . '")'; + } + } + $isbn = $driver->tryMethod('getCleanISBN'); + if (!empty($isbn)) { + $isbnList = $this->wcUtils->getXISBN($isbn); + if (!empty($isbnList)) { $parts[] = '(srw.bn any "' . implode(' ', $isbnList) . '")'; } } - if (method_exists($driver, 'getCleanISSN')) { - $issn = $driver->getCleanISSN(); - if (!empty($issn)) { - $issnList = $this->wcUtils->getXISSN($issn); + $issn = $driver->tryMethod('getCleanISSN'); + if (!empty($issn)) { + $issnList = $this->wcUtils->getXISSN($issn); + if (!empty($issnList)) { $parts[] = '(srw.sn any "' . implode(' ', $issnList) . '")'; } }