Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Rdf\EntityRdfBuilderFactory Class Reference

Factory for EntityRdfBuilder based on factory callbacks. More...

Public Member Functions

 __construct (array $factoryCallbacks, array $labelPredicates)
 
 getEntityRdfBuilders ( $flavorFlags, RdfVocabulary $vocabulary, RdfWriter $writer, EntityMentionListener $mentionedEntityTracker, DedupeBag $dedupe)
 Returns an associative array mapping entity type to EntityRdfBuilder implementations.
 
 getTermRdfBuilder (RdfVocabulary $vocabulary, RdfWriter $writer)
 Produce new TermRdfWriter.
 

Private Member Functions

 createEntityRdfBuilders ( $flavorFlags, RdfVocabulary $vocabulary, RdfWriter $writer, EntityMentionListener $mentionedEntityTracker, DedupeBag $dedupe)
 

Private Attributes

 $factoryCallbacks
 
 $labelPredicates
 

Detailed Description

Factory for EntityRdfBuilder based on factory callbacks.

For use with EntityTypeDefinitions.

Author
Amir Sarabadani ladsg.nosp@m.roup.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::__construct ( array  $factoryCallbacks,
array  $labelPredicates 
)
Parameters
callable[]$factoryCallbacksFactory callback functions as returned for EntityTypeDefinitions::RDF_BUILDER_FACTORY_CALLBACK. Callbacks will be invoked with the signature ($mode, RdfVocabulary, RdfWrite, EntityMentionListener, DedupeBag) and must return a EntityRdfBuilder (or null).
string[][][]$labelPredicates

Member Function Documentation

◆ createEntityRdfBuilders()

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::createEntityRdfBuilders (   $flavorFlags,
RdfVocabulary  $vocabulary,
RdfWriter  $writer,
EntityMentionListener  $mentionedEntityTracker,
DedupeBag  $dedupe 
)
private
Parameters
int$flavorFlagsFlavor flags to use for the entity rdf builder
RdfVocabulary$vocabulary
RdfWriter$writer
EntityMentionListener$mentionedEntityTracker
DedupeBag$dedupe
Returns
EntityRdfBuilder[] array mapping entity types to their EntityRdfBuilders

◆ getEntityRdfBuilders()

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::getEntityRdfBuilders (   $flavorFlags,
RdfVocabulary  $vocabulary,
RdfWriter  $writer,
EntityMentionListener  $mentionedEntityTracker,
DedupeBag  $dedupe 
)

Returns an associative array mapping entity type to EntityRdfBuilder implementations.

Parameters
int$flavorFlagsFlavor flags to use for the entity rdf builder
RdfVocabulary$vocabulary
RdfWriter$writer
EntityMentionListener$mentionedEntityTracker
DedupeBag$dedupe
Returns
EntityRdfBuilder[] array mapping entity types to their EntityRdfBuilders

◆ getTermRdfBuilder()

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::getTermRdfBuilder ( RdfVocabulary  $vocabulary,
RdfWriter  $writer 
)

Produce new TermRdfWriter.

Parameters
RdfVocabulary$vocabulary
RdfWriter$writer
Returns
TermsRdfBuilder

Member Data Documentation

◆ $factoryCallbacks

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::$factoryCallbacks
private

◆ $labelPredicates

Wikibase\Repo\Rdf\EntityRdfBuilderFactory::$labelPredicates
private

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