Documentation

EntityListWorksheet
in package
Uses MetadataSpreadsheetTrait

Description of EntityList

Tags
author

zozlak

Table of Contents

Constants

STRICT_OPTIONAL  = 3
STRICT_RECOMMENDED  = 2
STRICT_REQUIRED  = 1
ORGANISATION_CLASSES  = ['https://vocabs.acdh.oeaw.ac.at/schema#Organisation', 'https://vocabs.acdh.oeaw.ac.at/schema#Agent', 'https://vocabs.acdh.oeaw.ac.at/schema#Person']
SKIP_PROPERTIES  = ['https://vocabs.acdh.oeaw.ac.at/schema#hasPid']

Properties

$classes  : array<string, WorksheetConfig>
$defaultLang  : string
$horizontal  : bool
$log  : LoggerInterface|null
$ontology  : Ontology
$path  : string
$schema  : Schema
$valueMaps  : array<string, array<string, NamedNode>>
Stores value maps for cells with list-controlled values.

Methods

__construct()  : mixed
readEntities()  : Generator<string|int, DatasetNode>
checkEntity()  : bool
getPropertyLang()  : array<string|int, string>
getValue()  : NamedNode|Literal|null
loadEntities()  : array<string|int, mixed>
mapReferenceCells()  : void
mapReferenceCols()  : void
mapReferenceRows()  : void
mapWorksheets()  : void

Constants

ORGANISATION_CLASSES

private mixed ORGANISATION_CLASSES = ['https://vocabs.acdh.oeaw.ac.at/schema#Organisation', 'https://vocabs.acdh.oeaw.ac.at/schema#Agent', 'https://vocabs.acdh.oeaw.ac.at/schema#Person']

SKIP_PROPERTIES

private mixed SKIP_PROPERTIES = ['https://vocabs.acdh.oeaw.ac.at/schema#hasPid']

Properties

$valueMaps

Stores value maps for cells with list-controlled values.

private array<string, array<string, NamedNode>> $valueMaps

Needs to be recomputed with mapReferenceCols() every time you change the sheet.

Methods

__construct()

public __construct(string $path, Ontology $ontology, Schema $schema, string $defaultLang[, int $strictness = self::STRICT_OPTIONAL ][, LoggerInterface|null $log = null ]) : mixed
Parameters
$path : string
$ontology : Ontology
$schema : Schema
$defaultLang : string
$strictness : int = self::STRICT_OPTIONAL
$log : LoggerInterface|null = null

readEntities()

public readEntities() : Generator<string|int, DatasetNode>
Return values
Generator<string|int, DatasetNode>

getPropertyLang()

private getPropertyLang(string $value, string $defaultLang) : array<string|int, string>
Parameters
$value : string
$defaultLang : string
Return values
array<string|int, string>

getValue()

private getValue(Cell $cell, PropertyDesc $propDesc, string|null $defaultLang) : NamedNode|Literal|null
Parameters
$cell : Cell
$propDesc : PropertyDesc
$defaultLang : string|null
Return values
NamedNode|Literal|null

mapReferenceCells()

private mapReferenceCells(Spreadsheet $worksheet, DataValidation $validation, string $mapName) : void
Parameters
$worksheet : Spreadsheet
$validation : DataValidation
$mapName : string

mapReferenceRows()

private mapReferenceRows(Worksheet $sheet, array<string, PropertyMapping$propertyMap, string $valueColumn) : void
Parameters
$sheet : Worksheet
$propertyMap : array<string, PropertyMapping>
$valueColumn : string

mapWorksheets()

private mapWorksheets(Spreadsheet $spreadsheet, int $strictness) : void
Parameters
$spreadsheet : Spreadsheet
$strictness : int

        
On this page

Search results