Documentation

MetadataHorizontal
in package
implements IteratorAggregate Uses MetadataSpreadsheetTrait

Description of MetadataHorizontal

Tags
author

zozlak

Table of Contents

Interfaces

IteratorAggregate

Constants

COL_PROPERTY  = 'property'
COL_VALUE  = '/^value *[1-9]$/'
MAP_COL_FROM  = 1
MAP_COL_TO  = 100
MAP_ROW_FROM  = 1
MAP_ROW_TO  = 20

Properties

$horizontal  : bool
$idPrefix  : string
$log  : LoggerInterface|null
$mapping  : array<string, PropertyMapping>
$meta  : Dataset
$ontology  : Ontology
$schema  : Schema
$valueColumn  : int
$valueMaps  : array<string, array<string, NamedNode>>
Stores value maps for cells with list-controlled values.

Methods

__construct()  : mixed
getIterator()  : Traversable
getPropertyLang()  : array<string|int, string>
getValue()  : NamedNode|Literal|null
mapReferenceCells()  : void
mapReferenceCols()  : void
mapReferenceRows()  : void
mapStructure()  : bool
readMetadata()  : void

Constants

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 $idPrefix, string $defaultLang[, LoggerInterface|null $log = null ]) : mixed
Parameters
$path : string
$ontology : Ontology
$schema : Schema
$idPrefix : string
$defaultLang : string
$log : LoggerInterface|null = null

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

mapStructure()

private mapStructure(Worksheet $sheet, string $defaultLang) : bool
Parameters
$sheet : Worksheet
$defaultLang : string
Return values
bool

readMetadata()

private readMetadata(Worksheet $sheet) : void
Parameters
$sheet : Worksheet

        
On this page

Search results