Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\DataAccess\EntitySourceDefinitions Class Reference

A collection of EntitySource objects. More...

Public Member Functions

 __construct (array $sources, SubEntityTypesMapper $subEntityTypesMapper)
 
 getSources ()
 
 getDatabaseSourceForEntityType (string $entityType)
 
 getApiSourceForEntityType (string $entityType)
 As of Federated Properties v2 there is only one source of federation per entity type, so returning a single EntitySource is ok.
 
 getEntityTypeToDatabaseSourceMapping ()
 
 getConceptBaseUris ()
 
 getRdfNodeNamespacePrefixes ()
 
 getRdfPredicateNamespacePrefixes ()
 

Private Member Functions

 assertNoDuplicateSourcesOrEntityTypes (array $sources)
 
 buildEntityTypeToDatabaseSourceMapping ()
 

Private Attributes

 $sources
 
 $entityTypeToDatabaseSourceMapping = null
 
 $sourceToConceptBaseUriMap = null
 
 $sourceToRdfNodeNamespacePrefixMap = null
 
 $sourceToRdfPredicateNamespacePrefixMap = null
 
 $subEntityTypesMapper
 

Detailed Description

A collection of EntitySource objects.

Allows looking up an EntitySource object for a given entity type.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\DataAccess\EntitySourceDefinitions::__construct ( array $sources,
SubEntityTypesMapper $subEntityTypesMapper )
Parameters
EntitySource[]$sourceswith unique names. An single entity type can not be used in two different sources.
SubEntityTypesMapper$subEntityTypesMapper

Member Function Documentation

◆ assertNoDuplicateSourcesOrEntityTypes()

Wikibase\DataAccess\EntitySourceDefinitions::assertNoDuplicateSourcesOrEntityTypes ( array $sources)
private
Parameters
EntitySource[]$sources

◆ buildEntityTypeToDatabaseSourceMapping()

Wikibase\DataAccess\EntitySourceDefinitions::buildEntityTypeToDatabaseSourceMapping ( )
private

◆ getApiSourceForEntityType()

Wikibase\DataAccess\EntitySourceDefinitions::getApiSourceForEntityType ( string $entityType)

As of Federated Properties v2 there is only one source of federation per entity type, so returning a single EntitySource is ok.

◆ getConceptBaseUris()

Wikibase\DataAccess\EntitySourceDefinitions::getConceptBaseUris ( )
Returns
string[]

◆ getDatabaseSourceForEntityType()

Wikibase\DataAccess\EntitySourceDefinitions::getDatabaseSourceForEntityType ( string $entityType)
Parameters
string$entityTypeEntity type or sub type
Returns
DatabaseEntitySource|null DatabaseEntitySource or null if no DatabaseEntitySource configured for the type

◆ getEntityTypeToDatabaseSourceMapping()

Wikibase\DataAccess\EntitySourceDefinitions::getEntityTypeToDatabaseSourceMapping ( )
Returns
DatabaseEntitySource[]

◆ getRdfNodeNamespacePrefixes()

Wikibase\DataAccess\EntitySourceDefinitions::getRdfNodeNamespacePrefixes ( )
Returns
string[]

◆ getRdfPredicateNamespacePrefixes()

Wikibase\DataAccess\EntitySourceDefinitions::getRdfPredicateNamespacePrefixes ( )
Returns
string[]

◆ getSources()

Wikibase\DataAccess\EntitySourceDefinitions::getSources ( )
Returns
EntitySource[]

Member Data Documentation

◆ $entityTypeToDatabaseSourceMapping

Wikibase\DataAccess\EntitySourceDefinitions::$entityTypeToDatabaseSourceMapping = null
private

◆ $sources

Wikibase\DataAccess\EntitySourceDefinitions::$sources
private

◆ $sourceToConceptBaseUriMap

Wikibase\DataAccess\EntitySourceDefinitions::$sourceToConceptBaseUriMap = null
private

◆ $sourceToRdfNodeNamespacePrefixMap

Wikibase\DataAccess\EntitySourceDefinitions::$sourceToRdfNodeNamespacePrefixMap = null
private

◆ $sourceToRdfPredicateNamespacePrefixMap

Wikibase\DataAccess\EntitySourceDefinitions::$sourceToRdfPredicateNamespacePrefixMap = null
private

◆ $subEntityTypesMapper

Wikibase\DataAccess\EntitySourceDefinitions::$subEntityTypesMapper
private

The documentation for this class was generated from the following file: