/**
  * {@inheritdoc}
  */
 protected function assertResponse(array $responseData, PayloadResponseInterface $payloadResponse)
 {
     $this->assertNotEmpty($payloadResponse->getItems());
     $this->assertInstanceOf('Doctrine\\Common\\Collections\\ArrayCollection', $payloadResponse->getItems());
     $this->assertProvidersItem($responseData['items'][0], $payloadResponse->getItems()->get(0));
     $this->assertEquals($responseData['itemsCount'], $payloadResponse->getItemsCount());
     $this->assertEquals($responseData['totalResults'], $payloadResponse->getTotalResults());
 }
 /**
  * {@inheritdoc}
  */
 public function parseResponse(PayloadResponseInterface $payloadResponse)
 {
     $rows = array();
     if ($payloadResponse->getTotalResults() > 0) {
         $items = $payloadResponse->getItems()->toArray();
         foreach ($items as $item) {
             $rows[] = array('identifier' => $item->getIdentifier(), 'country' => $item->getCountry(), 'name' => $item->getName(), 'acronym' => $item->getAcronym(), 'altName' => $item->getAltName(), 'scope' => $item->getScope(), 'domain' => $item->getDomain(), 'geolevel' => $item->getGeoLevel(), 'role' => $item->getRole(), 'website' => $item->getWebsite());
         }
     }
     return $rows;
 }
 /**
  * Parses the response.
  *
  * Lists all the records associated with the specified dataset id
  *
  * @param PayloadResponseInterface SearchPayloadResponse instance.
  * @return array An associative array of parsed data.
  */
 public function listRecordsResponse(PayloadResponseInterface $payloadResponse)
 {
     $rows = array();
     if ($payloadResponse->getTotalResults() > 0) {
         $items = $payloadResponse->getItems()->toArray();
         foreach ($items as $item) {
             $rows[] = array('title' => $item->getTitle()->get(0), 'type' => $item->getType(), 'creator' => !is_null($item->getDcCreator()) ? $item->getDcCreator()->get(0) : '', 'dataProvider' => $item->getDataProvider()->get(0), 'edmIsShownAt' => $item->getEdmIsShownAt()->get(0), 'rights' => $item->getRights()->get(0));
         }
     }
     return $rows;
 }