ResMetadata
in package
implements
MetadataInterface
Creates <metadata> element by simply taking binary content of another repository resource.
Of course it will work only if the target resource is an XML file satisfying requested OAI-PMH metadata schema (but checking it is out of scope of this class)
Required metadata format definitition properties:
-
metaResProp
- RDF property pointing to the resource containing metadata -
requestOptions
- Guzzle request options (http://docs.guzzlephp.org/en/stable/request-options.html) to be used while fetching the metadata resource
Tags
Table of Contents
Interfaces
- MetadataInterface
- Interface for different metadata providers.
Properties
- $format : MetadataFormat
- $res : RepoResourceDb
- Repository resource object
Methods
- __construct() : mixed
- Creates a metadata object for a given repository resource.
- extendSearchDataQuery() : QueryPart
- This implementation has no fetch additional data trough the search query.
- extendSearchFilterQuery() : QueryPart
- Extends the search query - only resources having a resource-metadata are matched.
- getXml() : DOMElement
- Creates resource's XML metadata
Properties
$format
private
MetadataFormat
$format
$res
Repository resource object
private
RepoResourceDb
$res
Methods
__construct()
Creates a metadata object for a given repository resource.
public
__construct(RepoResourceDb $resource, HeaderData $searchResultRow, MetadataFormat $format) : mixed
Parameters
- $resource : RepoResourceDb
-
a repository resource object
- $searchResultRow : HeaderData
-
search query result row
- $format : MetadataFormat
-
metadata format descriptor describing this resource
extendSearchDataQuery()
This implementation has no fetch additional data trough the search query.
public
static extendSearchDataQuery(MetadataFormat $format) : QueryPart
Parameters
- $format : MetadataFormat
-
metadata format descriptor
Return values
QueryPartextendSearchFilterQuery()
Extends the search query - only resources having a resource-metadata are matched.
public
static extendSearchFilterQuery(MetadataFormat $format) : QueryPart
Parameters
- $format : MetadataFormat
-
metadata format descriptor
Return values
QueryPartgetXml()
Creates resource's XML metadata
public
getXml() : DOMElement