MetadataCrawler
in package
Description of DirectoryCrawler
Tags
Table of Contents
Constants
- FILE_DEFAULT_CLASS = 'resource'
- FILECHECKER_FILE = 'fileList.json'
- SPREADSHEET_EXTENSIONS = ['csv', 'xls', 'xlsx', 'ods']
Properties
- $defaultLang : string
- $entitiesDb : EntitiesDatabase
- $files : array<string|int, mixed>
- $idgen : FileId
- $idPrefix : string
- $idProp : NamedNode
- $log : LoggerInterface|null
- $metaPrimary : Dataset
- $metaSecondary : Dataset
- $ontology : Ontology
- $schema : Schema
Methods
- __construct() : mixed
- crawl() : DatasetInterface
- addMetaSecondary() : int
- mapVocabularies() : void
- Custom implementation because Ontology::getVocabularyValue() has no caching.
- parseFilecheckerOutput() : NamedNode
- readMetadata() : void
Constants
FILE_DEFAULT_CLASS
private
mixed
FILE_DEFAULT_CLASS
= 'resource'
FILECHECKER_FILE
private
mixed
FILECHECKER_FILE
= 'fileList.json'
SPREADSHEET_EXTENSIONS
private
mixed
SPREADSHEET_EXTENSIONS
= ['csv', 'xls', 'xlsx', 'ods']
Properties
$defaultLang
private
string
$defaultLang
$entitiesDb
private
EntitiesDatabase
$entitiesDb
$files
private
array<string|int, mixed>
$files
$idgen
private
FileId
$idgen
$idPrefix
private
string
$idPrefix
$idProp
private
NamedNode
$idProp
$log
private
LoggerInterface|null
$log
$metaPrimary
private
Dataset
$metaPrimary
$metaSecondary
private
Dataset
$metaSecondary
$ontology
private
Ontology
$ontology
$schema
private
Schema
$schema
Methods
__construct()
public
__construct(string $metaDir, Ontology $ontology, Schema $schema, string $idPrefix, string $filecheckerBaseDir, string $defaultLang[, LoggerInterface|null $log = null ]) : mixed
Parameters
crawl()
public
crawl() : DatasetInterface
Return values
DatasetInterfaceaddMetaSecondary()
private
addMetaSecondary(iterable<string|int, Quad> $meta) : int
Parameters
- $meta : iterable<string|int, Quad>
Return values
intmapVocabularies()
Custom implementation because Ontology::getVocabularyValue() has no caching.
private
mapVocabularies(Dataset $meta) : void
Parameters
- $meta : Dataset
parseFilecheckerOutput()
private
parseFilecheckerOutput(string $path, string $basePath) : NamedNode
Parameters
- $path : string
- $basePath : string
Return values
NamedNodereadMetadata()
private
readMetadata(string $metaDir, string $filecheckerBaseDir) : void
Parameters
- $metaDir : string
- $filecheckerBaseDir : string