Documentation

Resource
in package
Uses RunTestsTrait

Description of Doorkeeper

Tags
author

zozlak

Table of Contents

Constants

DB_LOCK_TIMEOUT  = 1000
LITERAL_TYPES  = [\zozlak\RdfConstants::XSD_ANY_URI, \zozlak\RdfConstants::XSD_DATE, \zozlak\RdfConstants::XSD_DATE_TIME, \zozlak\RdfConstants::XSD_DECIMAL, \zozlak\RdfConstants::XSD_FLOAT, \zozlak\RdfConstants::XSD_DOUBLE, \zozlak\RdfConstants::XSD_INTEGER, \zozlak\RdfConstants::XSD_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_LONG, \zozlak\RdfConstants::XSD_INT, \zozlak\RdfConstants::XSD_SHORT, \zozlak\RdfConstants::XSD_BYTE, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE, \zozlak\RdfConstants::XSD_BOOLEAN]
NON_NEGATIVE_NUMBERS  = [\zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE]
OPENAIRE_OAIPMH_SET  = 'https://vocabs.acdh.oeaw.ac.at/archeoaisets/openaire_data'

Properties

$log  : LoggerInterface|null
$meta  : DatasetNodeInterface
$ontology  : Ontology
$pdo  : PDO|null
$schema  : Schema
$uriNorm  : UriNormalizer

Methods

__construct()  : mixed
check01TitleProp()  : void
Every resource must have a title property (cfg.schema.label).
check02PropertyTypes()  : void
Checks property types (datatype/object).
check03Cardinalities()  : void
Checks property cardinalities according to the ontology.
check04IdCount()  : void
Every resource must have at least one repository ID and one non-repository ID.
check05Language()  : void
check06UnknownProperties()  : void
If a property is in the ontology namespace it has to be part of the ontology.
check07Biblatex()  : void
check08DateRanges()  : void
onResEdit()  : DatasetNodeInterface
post01MaintainCmdiPid()  : void
CMDI records must have their very own PIDs but this requires special handling as in ARCHE CMDI is just a metadata serialization format and not a separate repository resource.
post02MaintainPid()  : void
pre01MaintainDefaultValues()  : void
pre02MaintainEndDates()  : void
pre03MaintainOpenAire()  : void
pre04MaintainWkt()  : void
pre05MaintainAccessRights()  : void
Access rights should be maintained according to the `cfg.schema.accessRestriction` value:
pre06MaintainPropertyRange()  : void
pre07NormalizeIds()  : void
runTests()  : void
castLiteral()  : LiteralInterface
inArcheCoreContext()  : bool
maintainPropertyRangeLiteral()  : void
maintainPropertyRangeVocabs()  : void
verifyPropertyRangeUri()  : void

Constants

DB_LOCK_TIMEOUT

public mixed DB_LOCK_TIMEOUT = 1000

LITERAL_TYPES

public mixed LITERAL_TYPES = [\zozlak\RdfConstants::XSD_ANY_URI, \zozlak\RdfConstants::XSD_DATE, \zozlak\RdfConstants::XSD_DATE_TIME, \zozlak\RdfConstants::XSD_DECIMAL, \zozlak\RdfConstants::XSD_FLOAT, \zozlak\RdfConstants::XSD_DOUBLE, \zozlak\RdfConstants::XSD_INTEGER, \zozlak\RdfConstants::XSD_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_NON_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_POSITIVE_INTEGER, \zozlak\RdfConstants::XSD_LONG, \zozlak\RdfConstants::XSD_INT, \zozlak\RdfConstants::XSD_SHORT, \zozlak\RdfConstants::XSD_BYTE, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE, \zozlak\RdfConstants::XSD_BOOLEAN]

NON_NEGATIVE_NUMBERS

public mixed NON_NEGATIVE_NUMBERS = [\zozlak\RdfConstants::XSD_NON_NEGATIVE_INTEGER, \zozlak\RdfConstants::XSD_UNSIGNED_LONG, \zozlak\RdfConstants::XSD_UNSIGNED_INT, \zozlak\RdfConstants::XSD_UNSIGNED_SHORT, \zozlak\RdfConstants::XSD_UNSIGNED_BYTE]

OPENAIRE_OAIPMH_SET

public mixed OPENAIRE_OAIPMH_SET = 'https://vocabs.acdh.oeaw.ac.at/archeoaisets/openaire_data'

Properties

$log

private LoggerInterface|null $log = null

$meta

private DatasetNodeInterface $meta

Methods

__construct()

public __construct(DatasetNodeInterface $meta, Schema $schema, Ontology $ontology[, PDO|null $pdo = null ][, LoggerInterface|null $log = null ]) : mixed
Parameters
$meta : DatasetNodeInterface
$schema : Schema
$ontology : Ontology
$pdo : PDO|null = null
$log : LoggerInterface|null = null

check01TitleProp()

Every resource must have a title property (cfg.schema.label).

public check01TitleProp() : void
Tags
throws
DoorkeeperException

check02PropertyTypes()

Checks property types (datatype/object).

public check02PropertyTypes() : void

As the property type doesn't depend on the class context, the check can and should be done for all metadata properties.

Tags
throws
DoorkeeperException

check03Cardinalities()

Checks property cardinalities according to the ontology.

public check03Cardinalities() : void
Tags
throws
DoorkeeperException

check04IdCount()

Every resource must have at least one repository ID and one non-repository ID.

public check04IdCount() : void

The non-repository ID is obligatory because repository IDs are sequential and don't have any meaning. Therefore it is very unlikely anyone knows them and uses them in the resources' metadata which causes a serious risk of mismatch on the next import.

Moreover resources representing ontology can have only one non-repository ID (so they must always have exactly two).

Tags
throws
DoorkeeperException

check05Language()

public check05Language() : void

check06UnknownProperties()

If a property is in the ontology namespace it has to be part of the ontology.

public check06UnknownProperties() : void

check07Biblatex()

public check07Biblatex() : void

check08DateRanges()

public check08DateRanges() : void

onResEdit()

public static onResEdit(int $id, DatasetNodeInterface $meta, string|null $path) : DatasetNodeInterface
Parameters
$id : int
$meta : DatasetNodeInterface
$path : string|null
Return values
DatasetNodeInterface

post01MaintainCmdiPid()

CMDI records must have their very own PIDs but this requires special handling as in ARCHE CMDI is just a metadata serialization format and not a separate repository resource.

public post01MaintainCmdiPid() : void

Because of that we need to store CMDI PIDs in a separate property and we want it to be automatically filled in for resources in a given (cfg.schema.doorkeeper.epicPid.clarinSetProperty with value cfg.doorkeeper.epicPid.clarinSet) OAI-PMH set.

This method takes care of it.

Tags
throws
DoorkeeperException

post02MaintainPid()

public post02MaintainPid() : void

pre01MaintainDefaultValues()

public pre01MaintainDefaultValues() : void

pre02MaintainEndDates()

public pre02MaintainEndDates() : void

pre03MaintainOpenAire()

public pre03MaintainOpenAire() : void

pre04MaintainWkt()

public pre04MaintainWkt() : void

pre05MaintainAccessRights()

Access rights should be maintained according to the `cfg.schema.accessRestriction` value:

public pre05MaintainAccessRights() : void
  • in all cases write access should be revoked from the public and academic
  • when public read access to the public should be granted
  • when academic read access to the cfg.doorkeeper.roleAcademic should be granted and public read access should be revoked
  • when restricted read rights should be revoked from public and cfg.doorkeeper.roleAcademic and granted to users listed in cfg.schema.accessRole

pre06MaintainPropertyRange()

public pre06MaintainPropertyRange() : void

pre07NormalizeIds()

public pre07NormalizeIds() : void

runTests()

public runTests([string $attribute = CheckAttribute::class ][, int $filter = ReflectionMethod::IS_PUBLIC ]) : void
Parameters
$attribute : string = CheckAttribute::class
$filter : int = ReflectionMethod::IS_PUBLIC

castLiteral()

private castLiteral(LiteralInterface $l, string $range) : LiteralInterface
Parameters
$l : LiteralInterface
$range : string
Return values
LiteralInterface

inArcheCoreContext()

private inArcheCoreContext() : bool
Return values
bool

maintainPropertyRangeLiteral()

private maintainPropertyRangeLiteral(PropertyDesc $propDesc, NamedNodeInterface $prop) : void
Parameters
$propDesc : PropertyDesc
$prop : NamedNodeInterface

maintainPropertyRangeVocabs()

private maintainPropertyRangeVocabs(PropertyDesc $propDesc, NamedNodeInterface $prop) : void
Parameters
$propDesc : PropertyDesc
$prop : NamedNodeInterface

verifyPropertyRangeUri()

private verifyPropertyRangeUri(string $rangeUri, string $prop) : void
Parameters
$rangeUri : string
$prop : string

        
On this page

Search results