\acdhOeaw\oai\metadataAcdhDcMetadata

Creates OAI-PMH <metadata> element in Dublin Core format from a FedoraResource RDF metadata.

It reads the metadata property mappings from the ontology being part of the repository by searching for: [ontologyRes] --cfg:fedoraIdProp--> acdhProp [ontologyRes] --cfg:oaiEqProp--> dcProp and [dcRes] --cfg:oaiEqProp--> acdhProp [dcRes] --cfg:fedoraIdProp--> dcProp

Requires metadata format configuration properties:

  • idProp -RDF property used to store repository resource identifiers
  • eqProp - RDF property used to denote properties equivalence
  • acdhNmsp - ACDH properties namespace

Summary

Methods
Properties
Constants
__construct()
getXml()
extendSearchQuery()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
init()
$dcNmsp
$mappings
$res
$format
N/A

Properties

$dcNmsp

$dcNmsp : string

Dublin Core namespace

Type

string

$mappings

$mappings : array

Stores metadata property to Dublic Core property mappings

Type

array

$res

$res : \acdhOeaw\fedora\FedoraResource

Repository resource object

Type

\acdhOeaw\fedora\FedoraResource

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() : \DOMElement

Creates resource's XML metadata

Returns

\DOMElement

extendSearchQuery()

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

This implementation has no need to extend the SPRARQL search query.

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

Returns

string

init()

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

Fetches mappings from the triplestore

Parameters

\acdhOeaw\fedora\Fedora $fedora
\acdhOeaw\oai\data\MetadataFormat $format