MetadataHorizontal
in package
implements
IteratorAggregate
Uses
MetadataSpreadsheetTrait
Description of MetadataHorizontal
Tags
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
COL_PROPERTY
private
mixed
COL_PROPERTY
= 'property'
COL_VALUE
private
mixed
COL_VALUE
= '/^value *[1-9]$/'
MAP_COL_FROM
private
mixed
MAP_COL_FROM
= 1
MAP_COL_TO
private
mixed
MAP_COL_TO
= 100
MAP_ROW_FROM
private
mixed
MAP_ROW_FROM
= 1
MAP_ROW_TO
private
mixed
MAP_ROW_TO
= 20
Properties
$horizontal
private
bool
$horizontal
$idPrefix
private
string
$idPrefix
$log
private
LoggerInterface|null
$log
$mapping
private
array<string, PropertyMapping>
$mapping
$meta
private
Dataset
$meta
$ontology
private
Ontology
$ontology
$schema
private
Schema
$schema
$valueColumn
private
int
$valueColumn
$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
getIterator()
public
getIterator() : Traversable
Return values
TraversablegetPropertyLang()
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|nullmapReferenceCells()
private
mapReferenceCells(Spreadsheet $worksheet, DataValidation $validation, string $mapName) : void
Parameters
- $worksheet : Spreadsheet
- $validation : DataValidation
- $mapName : string
mapReferenceCols()
private
mapReferenceCols(WorksheetConfig $cfg) : void
Parameters
- $cfg : WorksheetConfig
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
boolreadMetadata()
private
readMetadata(Worksheet $sheet) : void
Parameters
- $sheet : Worksheet