Resource
in package
Maps ARCHE resource metadata to a BibLaTeX bibliographic entry.
Fro BibTeX/BibLaTeX bibliographic entry reference see:
- https://www.bibtex.com/g/bibtex-format/#fields
- chapter 8 of http://tug.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf
- https://mirror.kumi.systems/ctan/macros/latex/contrib/biblatex/doc/biblatex.pdf
Tags
Table of Contents
Constants
- NO_OVERRIDE = 'NOOVERRIDE'
- SRC_PARENT = 'parent'
- SRC_TOP_COLLECTION = 'topCollection'
- TYPE_CONST = 'const'
- TYPE_CURRENT_DATE = 'currentDate'
- TYPE_EPRINT = 'eprint'
- TYPE_LITERAL = 'literal'
- TYPE_PERSON = 'person'
- TYPE_URL = 'url'
Properties
- $config : object
- $lang : string
- $log : LoggerInterface|null
- $mapping : object
- $meta : DatasetInterface
- $node : TermInterface
- $res : RepoResourceInterface
- $schema : Schema
Methods
- __construct() : mixed
- cacheHandler() : ResponseCacheItem
- getBiblatex() : string
- applyOverrides() : void
- escapeBiblatex() : string
- formatAll() : string
- Gathers all values of given properties.
- formatKey() : string
- formatParent() : string|null
- formatPerson() : string
- formatPersons() : string
- formatProperty() : string|null
- getLiteral() : string|null
Constants
NO_OVERRIDE
public
mixed
NO_OVERRIDE
= 'NOOVERRIDE'
SRC_PARENT
public
mixed
SRC_PARENT
= 'parent'
SRC_TOP_COLLECTION
public
mixed
SRC_TOP_COLLECTION
= 'topCollection'
TYPE_CONST
public
mixed
TYPE_CONST
= 'const'
TYPE_CURRENT_DATE
public
mixed
TYPE_CURRENT_DATE
= 'currentDate'
TYPE_EPRINT
public
mixed
TYPE_EPRINT
= 'eprint'
TYPE_LITERAL
public
mixed
TYPE_LITERAL
= 'literal'
TYPE_PERSON
public
mixed
TYPE_PERSON
= 'person'
TYPE_URL
public
mixed
TYPE_URL
= 'url'
Properties
$config
private
object
$config
$lang
private
string
$lang
$log
private
LoggerInterface|null
$log
= null
$mapping
private
object
$mapping
$meta
private
DatasetInterface
$meta
$node
private
TermInterface
$node
$res
private
RepoResourceInterface
$res
$schema
private
Schema
$schema
Methods
__construct()
public
__construct(RepoResourceInterface $res, object $config[, LoggerInterface|null $log = null ]) : mixed
Parameters
- $res : RepoResourceInterface
- $config : object
- $log : LoggerInterface|null = null
cacheHandler()
public
static cacheHandler(RepoResourceInterface $res, array<string|int, mixed> $param, object $config[, LoggerInterface|null $log = null ]) : ResponseCacheItem
Parameters
- $res : RepoResourceInterface
- $param : array<string|int, mixed>
- $config : object
- $log : LoggerInterface|null = null
Return values
ResponseCacheItemgetBiblatex()
public
getBiblatex(string $lang[, string|null $override = null ][, string|null $property = null ]) : string
Parameters
- $lang : string
- $override : string|null = null
- $property : string|null = null
Return values
stringapplyOverrides()
private
applyOverrides(array<string, string> &$fields[, string|null $override = null ]) : void
Parameters
- $fields : array<string, string>
- $override : string|null = null
Tags
escapeBiblatex()
private
escapeBiblatex(string $value) : string
Parameters
- $value : string
Return values
stringformatAll()
Gathers all values of given properties.
private
formatAll(array<string|int, string> $properties[, TermInterface|null $resource = null ][, bool $onlyUrl = false ][, string|null $nmsp = null ][, bool $reqNmsp = false ]) : string
If a given property has at least one literal value in the preferred language, literal values in other language are discarded.
Empty values are discarded.
Parameters
- $properties : array<string|int, string>
- $resource : TermInterface|null = null
- $onlyUrl : bool = false
- $nmsp : string|null = null
- $reqNmsp : bool = false
Return values
stringformatKey()
private
formatKey() : string
Return values
stringformatParent()
private
formatParent(string $type, string $property) : string|null
Parameters
- $type : string
- $property : string
Return values
string|nullformatPerson()
private
formatPerson(TermInterface $person) : string
Parameters
- $person : TermInterface
Return values
stringformatPersons()
private
formatPersons(array<string|int, string> $properties[, TermInterface|string|null $resource = null ]) : string
Parameters
- $properties : array<string|int, string>
- $resource : TermInterface|string|null = null
Return values
stringformatProperty()
private
formatProperty(mixed $definition) : string|null
Parameters
- $definition : mixed
Tags
Return values
string|nullgetLiteral()
private
getLiteral(QuadTemplate|PredicateTemplate $tmpl) : string|null
Parameters
- $tmpl : QuadTemplate|PredicateTemplate