Documentation

PropertyMappings
in package

Description of PropertyMappings

Tags
author

zozlak

Table of Contents

Constants

WIKIDATA_INSTANCE_OF  = 'http://www.wikidata.org/prop/direct/P31'

Properties

$dbNames  : array<string|int, string>
$idProp  : NamedNodeInterface
$mappings  : array<string, array<string|int, PropertyMapping>>
$normalizer  : UriNormalizer
$rules  : array<string, UriNormalizerRule>

Methods

__construct()  : mixed
addExternalDatabase()  : void
Adds URI normalization rule for a given external database.
addExternalDatabaseClass()  : void
Adds property mappings for a given class of a given external database.
getDbNames()  : array<string|int, string>
getRule()  : UriNormalizerRule
mapIdentifiers()  : array<string|int, string>
matchExternalDatabase()  : string
parseConfig()  : void
resolveAndMerge()  : void
getClasses()  : array<string|int, string>
getId()  : string

Constants

WIKIDATA_INSTANCE_OF

public mixed WIKIDATA_INSTANCE_OF = 'http://www.wikidata.org/prop/direct/P31'

Properties

Methods

addExternalDatabaseClass()

Adds property mappings for a given class of a given external database.

public addExternalDatabaseClass(string $dbName, string $class, array<string|int, mixed> $mappings) : void
Parameters
$dbName : string
$class : string
$mappings : array<string|int, mixed>

getDbNames()

public getDbNames() : array<string|int, string>
Return values
array<string|int, string>

mapIdentifiers()

public mapIdentifiers(DatasetNodeInterface $meta[, string|null $dbName = null ]) : array<string|int, string>
Parameters
$meta : DatasetNodeInterface
$dbName : string|null = null
Return values
array<string|int, string>

matchExternalDatabase()

public matchExternalDatabase(string $uri) : string
Parameters
$uri : string
Return values
string

parseConfig()

public parseConfig(object $cfg) : void
Parameters
$cfg : object

resolveAndMerge()

public resolveAndMerge(string $dbName, DatasetNodeInterface $meta, DatasetNodeInterface $extDbMeta) : void
Parameters
$dbName : string
$meta : DatasetNodeInterface
$extDbMeta : DatasetNodeInterface

getClasses()

private getClasses(DatasetNodeInterface $meta, string|null $dbName) : array<string|int, string>
Parameters
$meta : DatasetNodeInterface
$dbName : string|null
Return values
array<string|int, string>

getId()

private getId(string $dbName, string $class) : string
Parameters
$dbName : string
$class : string
Return values
string

        
On this page

Search results