Inheritance: extends Nlm30Openurl10CrosswalkFilter
 /**
  * @covers Nlm30CitationSchemaOpenurl10CrosswalkFilter
  * @covers Nlm30Openurl10CrosswalkFilter
  */
 public function testExecute()
 {
     $nlm30Description = $this->getTestNlm30Description();
     $openurl10Description = $this->getTestOpenurl10Description();
     $filter = new Nlm30CitationSchemaOpenurl10CrosswalkFilter();
     self::assertEquals($openurl10Description, $filter->execute($nlm30Description));
 }
 /**
  * @covers Nlm30CitationSchemaOpenurl10CrosswalkFilter
  * @covers Nlm30Openurl10CrosswalkFilter
  */
 public function testExecute()
 {
     $this->markTestSkipped('Weird class interaction with ControlledVocabEntryDAO leads to failure');
     $nlm30Description = $this->getTestNlm30Description();
     $openurl10Description = $this->getTestOpenurl10Description();
     $filter = new Nlm30CitationSchemaOpenurl10CrosswalkFilter();
     self::assertEquals($openurl10Description, $filter->execute($nlm30Description));
 }
 /**
  * Prepare a search with the CrossRef OpenURL resolver
  * @param $citationDescription MetadataDescription
  * @return array an array of search parameters
  */
 function &_prepareOpenurl10Search(&$citationDescription)
 {
     $nullVar = null;
     // Crosswalk to OpenURL.
     import('lib.pkp.plugins.metadata.nlm30.filter.Nlm30CitationSchemaOpenurl10CrosswalkFilter');
     $nlm30Openurl10Filter = new Nlm30CitationSchemaOpenurl10CrosswalkFilter();
     if (is_null($openurl10Citation =& $nlm30Openurl10Filter->execute($citationDescription))) {
         return $nullVar;
     }
     // Prepare the search.
     $searchParams = array('url_ver' => 'Z39.88-2004');
     // Configure the meta-data schema.
     $openurl10CitationSchema =& $openurl10Citation->getMetadataSchema();
     switch (true) {
         case is_a($openurl10CitationSchema, 'Openurl10JournalSchema'):
             $searchParams['rft_val_fmt'] = 'info:ofi/fmt:kev:mtx:journal';
             break;
         case is_a($openurl10CitationSchema, 'Openurl10BookSchema'):
             $searchParams['rft_val_fmt'] = 'info:ofi/fmt:kev:mtx:book';
             break;
         case is_a($openurl10CitationSchema, 'Openurl10DissertationSchema'):
             $searchParams['rft_val_fmt'] = 'info:ofi/fmt:kev:mtx:dissertation';
             break;
         default:
             assert(false);
     }
     // Add all OpenURL meta-data to the search parameters.
     // FIXME: Implement a looping search like for other lookup services.
     $searchProperties = array('aufirst', 'aulast', 'btitle', 'jtitle', 'atitle', 'issn', 'artnum', 'date', 'volume', 'issue', 'spage', 'epage');
     foreach ($searchProperties as $property) {
         if ($openurl10Citation->hasStatement($property)) {
             $searchParams['rft.' . $property] = $openurl10Citation->getStatement($property);
         }
     }
     return $searchParams;
 }