\acdhOeaw\oai\metadataMetadataInterface

Interface for different metadata providers.

OAI-PMH metadata can be generated in various ways. This interface provides a common API enabling the \acdhOeaw\oai\Oai class to handle metadata no matter how they are generated.

Summary

Methods
Constants
__construct()
getXml()
extendSearchQuery()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

__construct()

__construct(\acdhOeaw\fedora\FedoraResource  $resource, \stdClass  $sparqlResultRow, \acdhOeaw\oai\data\MetadataFormat  $format) 

Creates a metadata object for a given repository resource.

Parameters

\acdhOeaw\fedora\FedoraResource $resource

repository resource object

\stdClass $sparqlResultRow

SPARQL search query result row

\acdhOeaw\oai\data\MetadataFormat $format

metadata format descriptor describing this resource

getXml()

getXml() 

Returns resource's XML metadata

extendSearchQuery()

extendSearchQuery(\acdhOeaw\oai\data\MetadataFormat  $format, string  $resVar) 

Allows to extend a search query with additional clauses specific to the given metadata source.

Returned string must be a valid SPARQL query part one can insert as ... in a query like SELECT * WHERE { ... LIMIT (someRule)}. It means if you need your own LIMIT clause or other advanced constructs, you must return a subquery.

Remark! PHP doesn't consider static methods as an interface part therefore existance of this method in classes implementing this interface is not enforced.

Parameters

\acdhOeaw\oai\data\MetadataFormat $format

metadata format descriptor

string $resVar

variable used in the search query to denote the repository resource