Documentation

MetaLookupGraph
in package
implements MetaLookupInterface

Searches for file metadata inside an RDF graph.

Tags
author

zozlak

Table of Contents

Interfaces

MetaLookupInterface
It is a common problem to couple binary data with their metadata.

Properties

$debug  : bool
Debug flag - setting it to true causes loggin messages to be displayed.
$graph  : DatasetInterface
Graph with all metadata
$idProp  : NamedNodeInterface

Methods

__construct()  : mixed
Creates a MetaLookupGraph from a given dataset
getMetadata()  : DatasetNodeInterface
Searches for metadata of a given file.

Properties

$debug

Debug flag - setting it to true causes loggin messages to be displayed.

public static bool $debug = false

Methods

__construct()

Creates a MetaLookupGraph from a given dataset

public __construct(DatasetInterface $graph, NamedNodeInterface $idProp) : mixed
Parameters
$graph : DatasetInterface
$idProp : NamedNodeInterface

getMetadata()

Searches for metadata of a given file.

public getMetadata(string $path, array<string|int, string|NamedNodeInterface$identifiers[, bool $require = false ]) : DatasetNodeInterface
Parameters
$path : string

path to the file (just for conformance with the interface, it is not used)

$identifiers : array<string|int, string|NamedNodeInterface>

file's identifiers (URIs)

$require : bool = false

should error be thrown when no metadata was found (when false a resource with no triples is returned)

Tags
throws
MetaLookupException
Return values
DatasetNodeInterface

fetched metadata


        
On this page

Search results