server/src/app/Repositories/RdfDocumentRepository.php
changeset 20 a9b98b16b053
parent 19 eadaf0b8f02e
child 22 a50cbd7d702f
equal deleted inserted replaced
19:eadaf0b8f02e 20:a9b98b16b053
   132     {
   132     {
   133         assert(is_numeric($perPage));
   133         assert(is_numeric($perPage));
   134 
   134 
   135         $page = Paginator::resolveCurrentPage($pageName);
   135         $page = Paginator::resolveCurrentPage($pageName);
   136 
   136 
   137         assert(is_numeric($page));
   137         assert(is_null($page) || is_numeric($page));
   138 
   138 
   139         $total = $this->getCount();
   139         $total = $this->getCount();
   140 
   140 
   141         $offset = max(0,($page - 1) * $perPage);
   141         $offset = max(0,($page - 1) * $perPage);
   142         
   142 
   143         $query =
   143         $query =
   144             "SELECT DISTINCT ?uri ?doc ?title ?issued ?modified".
   144             "SELECT DISTINCT ?uri ?doc ?title ?issued ?modified".
   145             "    WHERE {".
   145             "    WHERE {".
   146             "        GRAPH ?uri { ?doc a <http://www.europeana.eu/schemas/edm/ProvidedCHO>.".
   146             "        GRAPH ?uri { ?doc a <http://www.europeana.eu/schemas/edm/ProvidedCHO>.".
   147             "        ?doc <http://purl.org/dc/elements/1.1/title> ?title.".
   147             "        ?doc <http://purl.org/dc/elements/1.1/title> ?title.".