\acdhOeaw\oai\searchSearchInterface

Interface for classes implementing OAI-PMH resources search.

For performance reasons the search should be implemented as a single SPARQL query gathering all data needed to generate the OAI-PMH

resource descriptions.

Good implementation takes into account search query extensions provided by requested metadata format class. Such extension can be gathered by calling the static method extendSearchQuery() (see the acdhOeaw\oai\metadataMetadataInterface) on the metadata class. The metadata class is provided by the class method of the metadata format descriptor (see the __construct() method).

Summary

Methods
Constants
__construct()
find()
getCount()
getHeader()
getMetadata()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__construct()

__construct(\acdhOeaw\oai\data\MetadataFormat  $format, \acdhOeaw\fedora\Fedora  $fedora) 

Creates a search engine object.

Parameters

\acdhOeaw\oai\data\MetadataFormat $format

metadata format descriptor

\acdhOeaw\fedora\Fedora $fedora

repository connection object

find()

find(string  $id, string  $from, string  $until, string  $set) 

Performs search using given filter values.

Parameters

string $id

id filter value

string $from

date from filter value

string $until

date to filter value

string $set

set filter value

getCount()

getCount() 

Returns number of resources matching last search (last call of the `find()` method).

getHeader()

getHeader(integer  $pos) 

Provides the `HeaderData` object for a given search result.

Parameters

integer $pos

seach result resource index

getMetadata()

getMetadata(integer  $pos) 

Provides the `MetadataInterface` object for a given search result.

The exact class of the returned object is defined by the class field of the metadata descriptor (see the $format parameter of the constructor method).

Parameters

integer $pos

seach result resource index