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

RDF mapping for entity terms. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\TermsRdfBuilder:
+ Collaboration diagram for Wikibase\Repo\Rdf\TermsRdfBuilder:

Public Member Functions

 __construct (RdfVocabulary $vocabulary, RdfWriter $writer, array $labelPredicates=[], array $languages=null)
 
 addEntity (EntityDocument $entity)
 Add the entity's labels, descriptions, and aliases to the RDF graph.
 

Private Member Functions

 getLabelPredicates (EntityDocument $entity)
 Get predicates that will be used for labels.
 
 addLabels ( $entityNamespace, $entityLName, TermList $labels, array $labelPredicates)
 Adds the labels of the given entity to the RDF graph.
 
 addDescriptions ( $entityNamespace, $entityLName, TermList $descriptions)
 Adds the descriptions of the given entity to the RDF graph.
 

Private Attributes

 $vocabulary
 
 $writer
 
 $languages
 
 $labelPredicates
 

Detailed Description

RDF mapping for entity terms.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\TermsRdfBuilder::__construct ( RdfVocabulary $vocabulary,
RdfWriter $writer,
array $labelPredicates = [],
array $languages = null )
Parameters
RdfVocabulary$vocabulary
RdfWriter$writer
string[][][]$labelPredicatesMap of type to array of [ ns, local ] for each label predicate
string[] | null$languages

Member Function Documentation

◆ addDescriptions()

Wikibase\Repo\Rdf\TermsRdfBuilder::addDescriptions ( $entityNamespace,
$entityLName,
TermList $descriptions )
private

Adds the descriptions of the given entity to the RDF graph.

Parameters
string$entityNamespace
string$entityLName
TermList$descriptions

◆ addEntity()

Wikibase\Repo\Rdf\TermsRdfBuilder::addEntity ( EntityDocument $entity)

Add the entity's labels, descriptions, and aliases to the RDF graph.

See also
EntityRdfBuilder::addEntity
Parameters
EntityDocument$entitythe entity to output.

Implements Wikibase\Repo\Rdf\EntityRdfBuilder.

◆ addLabels()

Wikibase\Repo\Rdf\TermsRdfBuilder::addLabels ( $entityNamespace,
$entityLName,
TermList $labels,
array $labelPredicates )
private

Adds the labels of the given entity to the RDF graph.

Parameters
string$entityNamespace
string$entityLName
TermList$labels
string[][]$labelPredicatesarray of [ ns, local ] for each label predicate

◆ getLabelPredicates()

Wikibase\Repo\Rdf\TermsRdfBuilder::getLabelPredicates ( EntityDocument $entity)
private

Get predicates that will be used for labels.

Parameters
EntityDocument$entity
Returns
string[][] array of [ ns, local ] for each label predicate

Member Data Documentation

◆ $labelPredicates

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

◆ $languages

Wikibase\Repo\Rdf\TermsRdfBuilder::$languages
private

◆ $vocabulary

Wikibase\Repo\Rdf\TermsRdfBuilder::$vocabulary
private

◆ $writer

Wikibase\Repo\Rdf\TermsRdfBuilder::$writer
private

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