Wikibase
MediaWiki Wikibase extension
Wikibase\DataAccess\EntitySourceDefinitions Class Reference

A collection of EntitySource objects. More...

Public Member Functions

 __construct (array $sources, EntityTypeDefinitions $entityTypeDefinitions)
 
 getSources ()
 
 getSourceForEntityType (string $entityType)
 
 getEntityTypeToSourceMapping ()
 
 getConceptBaseUris ()
 
 getRdfNodeNamespacePrefixes ()
 
 getRdfPredicateNamespacePrefixes ()
 

Private Member Functions

 assertNoDuplicateSourcesOrEntityTypes (array $sources)
 
 buildSubEntityTypeMap (EntityTypeDefinitions $entityTypeDefinitions)
 
 buildEntityTypeToSourceMapping ()
 

Private Attributes

 $sources
 
 $entityTypeToSourceMapping = null
 
 $sourceToConceptBaseUriMap = null
 
 $sourceToRdfNodeNamespacePrefixMap = null
 
 $sourceToRdfPredicateNamespacePrefixMap = null
 
 $subEntityTypeMap
 

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,
EntityTypeDefinitions  $entityTypeDefinitions 
)
Parameters
EntitySource[]$sourceswith unique names. An single entity type can not be used in two different sources.
EntityTypeDefinitions$entityTypeDefinitions

Member Function Documentation

◆ assertNoDuplicateSourcesOrEntityTypes()

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

◆ buildEntityTypeToSourceMapping()

Wikibase\DataAccess\EntitySourceDefinitions::buildEntityTypeToSourceMapping ( )
private

◆ buildSubEntityTypeMap()

Wikibase\DataAccess\EntitySourceDefinitions::buildSubEntityTypeMap ( EntityTypeDefinitions  $entityTypeDefinitions)
private

◆ getConceptBaseUris()

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

◆ getEntityTypeToSourceMapping()

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

◆ getRdfNodeNamespacePrefixes()

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

◆ getRdfPredicateNamespacePrefixes()

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

◆ getSourceForEntityType()

Wikibase\DataAccess\EntitySourceDefinitions::getSourceForEntityType ( string  $entityType)
Todo:
when the same entity type can be provided by multiple source (currently forbidden), this should return all sources
Parameters
string$entityTypeEntity type or sub type
Returns
EntitySource|null EntitySource or null if no EntitySource configured for the type

◆ getSources()

Wikibase\DataAccess\EntitySourceDefinitions::getSources ( )

Member Data Documentation

◆ $entityTypeToSourceMapping

Wikibase\DataAccess\EntitySourceDefinitions::$entityTypeToSourceMapping = 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

◆ $subEntityTypeMap

Wikibase\DataAccess\EntitySourceDefinitions::$subEntityTypeMap
private

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