AcdhDcMetadata
in package
implements
MetadataInterface
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: [dcRes] --cfg:eqProp--> acdhProp
Requires metadata format configuration properties:
- eqProp - RDF property denoting properties equivalence
- titleProp - RDF property denoting a resource title/label
- acdhNmsp - ACDH properties namespace
- mode - URL/title/both - how RDF properties pointing to other resources should be handled (by providing thei URLs, their titles or both)
Tags
Table of Contents
Interfaces
- MetadataInterface
- Interface for different metadata providers.
Constants
- MODE_BOTH = 'both'
- MODE_TITLE = 'title'
- MODE_URL = 'URL'
Properties
- $dcNmsp : string
- Dublin Core namespace
- $format : MetadataFormat
- Metadata format descriptor
- $mappings : array<string, string>|null
- Stores metadata property to Dublic Core property mappings
- $res : RepoResourceDb
- Repository resource object
Methods
- __construct() : mixed
- Creates a metadata object for a given repository resource.
- extendSearchDataQuery() : QueryPart
- This implementation has no need to extend the search query.
- extendSearchFilterQuery() : QueryPart
- This implementation has no need to extend the search query.
- getXml() : DOMElement
- Creates resource's XML metadata
- init() : void
- Fetches mappings from the triplestore
Constants
MODE_BOTH
public
mixed
MODE_BOTH
= 'both'
MODE_TITLE
public
mixed
MODE_TITLE
= 'title'
MODE_URL
public
mixed
MODE_URL
= 'URL'
Properties
$dcNmsp
Dublin Core namespace
private
static string
$dcNmsp
= 'http://purl.org/dc/elements/1.1/'
$format
Metadata format descriptor
private
MetadataFormat
$format
$mappings
Stores metadata property to Dublic Core property mappings
private
static array<string, string>|null
$mappings
= null
$res
Repository resource object
private
RepoResourceDb
$res
Methods
__construct()
Creates a metadata object for a given repository resource.
public
__construct(RepoResourceDb $resource, object $searchResultRow, MetadataFormat $format) : mixed
Parameters
- $resource : RepoResourceDb
-
a repository resource object
- $searchResultRow : object
-
SPARQL search query result row
- $format : MetadataFormat
-
metadata format descriptor describing this resource
extendSearchDataQuery()
This implementation has no need to extend the search query.
public
static extendSearchDataQuery(MetadataFormat $format) : QueryPart
Parameters
- $format : MetadataFormat
Return values
QueryPartextendSearchFilterQuery()
This implementation has no need to extend the search query.
public
static extendSearchFilterQuery(MetadataFormat $format) : QueryPart
Parameters
- $format : MetadataFormat
Return values
QueryPartgetXml()
Creates resource's XML metadata
public
getXml() : DOMElement
Return values
DOMElementinit()
Fetches mappings from the triplestore
private
static init(RepoDb $repo, MetadataFormat $format) : void
Parameters
- $repo : RepoDb
- $format : MetadataFormat