Documentation

TemplateCreator
in package

Description of TemplateCreator

Tags
author

zozlak

Table of Contents

Constants

LOCK_PSWD  = 'ARCHE'
AGENT_CLASS  = 'https://vocabs.acdh.oeaw.ac.at/schema#Agent'
ENTRY_ROWS  = 200
FIRST_ROW_ID_ONLY  = 9
FIRST_ROW_OTHER  = 8
HORIZONTAL_ROW_HEIGHT  = 2
ID_ONLY_CLASSES  = ['https://vocabs.acdh.oeaw.ac.at/schema#Person', 'https://vocabs.acdh.oeaw.ac.at/schema#Organisation', 'https://vocabs.acdh.oeaw.ac.at/schema#Place']
SKIP_PROPERTIES  = ['https://vocabs.acdh.oeaw.ac.at/schema#hasPid']
STYLES  = ['title' => ['font' => ['name' => 'Calibri', 'size' => 14, 'bold' => true], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FF88DBDF']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'center']], 'header1' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFD7F3F4']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'header2' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFE1F6F7']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'header3' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFEBF9FA']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'content' => ['font' => ['name' => 'Calibri', 'size' => 11], 'alignment' => ['wrapText' => true, 'horizontal' => 'left', 'vertical' => 'bottom']]]
URL_FORMULA  = '=LEFT(%cell%, 4)="http"'
VOCABULARY_SHEET  = 'Vocabularies'

Properties

$log  : LoggerInterface|null
$ontology  : Ontology
$repoBaseUrl  : string
$schema  : Schema

Methods

__construct()  : mixed
createHorizontalTemplate()  : void
createNamedEntitiesTemplate()  : void
addGuidelines()  : void
covers()  : bool
createInstanceList()  : string
getCardinality()  : string
getFirstRow()  : int
getStyle()  : array<string|int, mixed>
importVocabulary()  : string
initVocabulary()  : array<string|int, mixed>
processValidation()  : void
protectSheet()  : void
setValidation()  : void
shortenUri()  : string

Constants

AGENT_CLASS

private mixed AGENT_CLASS = 'https://vocabs.acdh.oeaw.ac.at/schema#Agent'

ID_ONLY_CLASSES

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

SKIP_PROPERTIES

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

STYLES

private mixed STYLES = ['title' => ['font' => ['name' => 'Calibri', 'size' => 14, 'bold' => true], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FF88DBDF']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'center']], 'header1' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFD7F3F4']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'header2' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFE1F6F7']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'header3' => ['font' => ['name' => 'Calibri', 'size' => 11, 'bold' => false], 'fill' => ['fillType' => 'solid', 'startColor' => ['argb' => 'FFEBF9FA']], 'alignment' => ['wrapText' => true, 'horizontal' => 'center', 'vertical' => 'bottom']], 'content' => ['font' => ['name' => 'Calibri', 'size' => 11], 'alignment' => ['wrapText' => true, 'horizontal' => 'left', 'vertical' => 'bottom']]]

Properties

Methods

__construct()

public __construct(Ontology $ontology, Schema $schema, string $repoBaseUrl[, LoggerInterface|null $log = null ]) : mixed
Parameters
$ontology : Ontology
$schema : Schema
$repoBaseUrl : string
$log : LoggerInterface|null = null

createHorizontalTemplate()

public createHorizontalTemplate(string $path, string $class, string $guidelines) : void
Parameters
$path : string
$class : string
$guidelines : string

createNamedEntitiesTemplate()

public createNamedEntitiesTemplate(string $path, array<string|int, string> $classes, string $guidelines) : void
Parameters
$path : string
$classes : array<string|int, string>
$guidelines : string

addGuidelines()

private addGuidelines(Worksheet $sheet, string $guidelines) : void
Parameters
$sheet : Worksheet
$guidelines : string

covers()

private covers(array<string|int, mixed> $coveredClasses, ClassDesc $class) : bool
Parameters
$coveredClasses : array<string|int, mixed>
$class : ClassDesc
Return values
bool

createInstanceList()

private createInstanceList(string $name, array<string|int, mixed> $classes, Worksheet $sheet, string $prevRange) : string
Parameters
$name : string
$classes : array<string|int, mixed>
$sheet : Worksheet
$prevRange : string
Return values
string

getFirstRow()

private getFirstRow(string $class) : int
Parameters
$class : string
Return values
int

getStyle()

private getStyle(string $name[, bool|null $bold = null ][, bool|null $border = null ][, string|null $align = null ]) : array<string|int, mixed>
Parameters
$name : string
$bold : bool|null = null
$border : bool|null = null
$align : string|null = null
Return values
array<string|int, mixed>

importVocabulary()

private importVocabulary(string $name, array<string|int, SkosConceptDesc$values, Worksheet $sheet, string $prevRange) : string
Parameters
$name : string
$values : array<string|int, SkosConceptDesc>
$sheet : Worksheet
$prevRange : string
Return values
string

initVocabulary()

private initVocabulary(Worksheet $sheet, string $name, string $prevRange) : array<string|int, mixed>
Parameters
$sheet : Worksheet
$name : string
$prevRange : string
Return values
array<string|int, mixed>

processValidation()

private processValidation(PropertyDesc $prop, array<string|int, mixed> &$vocabularies, Worksheet $sheet, string $valuesRange, Worksheet $vocabularySheet, array<string|int, mixed> $classes) : void
Parameters
$prop : PropertyDesc
$vocabularies : array<string|int, mixed>
$sheet : Worksheet
$valuesRange : string
$vocabularySheet : Worksheet
$classes : array<string|int, mixed>

protectSheet()

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

setValidation()

private setValidation(Worksheet $sheet, string $type, string $range, string $formula1, string $formula2, bool $allowBlank) : void
Parameters
$sheet : Worksheet
$type : string
$range : string
$formula1 : string
$formula2 : string
$allowBlank : bool

shortenUri()

private shortenUri(string $uri) : string
Parameters
$uri : string
Return values
string

        
On this page

Search results