Wikibase
MediaWiki Wikibase extension
|
RDF mapping for entity terms. More...
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. More... | |
addEntityStub (EntityDocument $entity) | |
Add the entity's labels and descriptions to the RDF graph. More... | |
Private Member Functions | |
getLabelPredicates (EntityDocument $entity) | |
Get predicates that will be used for labels. More... | |
addLabels ( $entityNamespace, $entityLName, TermList $labels, array $labelPredicates) | |
Adds the labels of the given entity to the RDF graph. More... | |
addDescriptions ( $entityNamespace, $entityLName, TermList $descriptions) | |
Adds the descriptions of the given entity to the RDF graph. More... | |
Private Attributes | |
$vocabulary | |
$writer | |
$languages | |
$labelPredicates | |
RDF mapping for entity terms.
Wikibase\Repo\Rdf\TermsRdfBuilder::__construct | ( | RdfVocabulary | $vocabulary, |
RdfWriter | $writer, | ||
array | $labelPredicates = [] , |
||
array | $languages = null |
||
) |
RdfVocabulary | $vocabulary | |
RdfWriter | $writer | |
string[][][] | $labelPredicates | Map of type to array of [ ns, local ] for each label predicate |
string[] | null | $languages |
|
private |
Adds the descriptions of the given entity to the RDF graph.
string | $entityNamespace | |
string | $entityLName | |
TermList | $descriptions |
Wikibase\Repo\Rdf\TermsRdfBuilder::addEntity | ( | EntityDocument | $entity | ) |
Add the entity's labels, descriptions, and aliases to the RDF graph.
EntityDocument | $entity | the entity to output. PhanTypeMismatchArgument |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
Wikibase\Repo\Rdf\TermsRdfBuilder::addEntityStub | ( | EntityDocument | $entity | ) |
Add the entity's labels and descriptions to the RDF graph.
EntityDocument | $entity | the entity to output. PhanTypeMismatchArgument |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
|
private |
Adds the labels of the given entity to the RDF graph.
string | $entityNamespace | |
string | $entityLName | |
TermList | $labels | |
string[][] | $labelPredicates | array of [ ns, local ] for each label predicate |
|
private |
Get predicates that will be used for labels.
EntityDocument | $entity |
|
private |
|
private |
|
private |
|
private |