Wikibase
MediaWiki Wikibase extension
|
"Truthy" RDF mapping for wikibase statements, directly mapping properties to "best" values without modelling statements as identifiable objects. More...
Public Member Functions | |
__construct (RdfVocabulary $vocabulary, RdfWriter $writer, SnakRdfBuilder $snakBuilder) | |
addStatements (EntityId $entityId, StatementList $statementList) | |
Adds Statements to the RDF graph. | |
addEntity (EntityDocument $entity) | |
Add truthy statements for the given entity to the RDF graph. | |
addEntityStub (EntityDocument $entity) | |
Does nothing, since Statements should not be part of entity stubs. | |
Private Member Functions | |
addMainSnak (EntityId $entityId, Statement $statement) | |
Adds the given Statement's main Snak to the RDF graph. | |
Private Attributes | |
$vocabulary | |
$writer | |
$snakBuilder | |
"Truthy" RDF mapping for wikibase statements, directly mapping properties to "best" values without modelling statements as identifiable objects.
"Best" statements per property are statements that have the best non-deprecated rank.
This simple property to value mapping excludes deprecated and non-"best" statements, ranks, qualifiers, and references. This allows for a much simpler, much easier to query RDF structure that allows searching for values similar to what would have been shown in infoboxes via Lua.
If more information is needed, use FullStatementRdfBuilder instead.
Wikibase\Repo\Rdf\TruthyStatementRdfBuilder::__construct | ( | RdfVocabulary | $vocabulary, |
RdfWriter | $writer, | ||
SnakRdfBuilder | $snakBuilder | ||
) |
Wikibase\Repo\Rdf\TruthyStatementRdfBuilder::addEntity | ( | EntityDocument | $entity | ) |
Add truthy statements for the given entity to the RDF graph.
EntityDocument | $entity | the entity to output. |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
Wikibase\Repo\Rdf\TruthyStatementRdfBuilder::addEntityStub | ( | EntityDocument | $entity | ) |
Does nothing, since Statements should not be part of entity stubs.
EntityDocument | $entity | the entity to output. |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
|
private |
Adds the given Statement's main Snak to the RDF graph.
EntityId | $entityId | |
Statement | $statement |
InvalidArgumentException |
Wikibase\Repo\Rdf\TruthyStatementRdfBuilder::addStatements | ( | EntityId | $entityId, |
StatementList | $statementList | ||
) |
Adds Statements to the RDF graph.
EntityId | $entityId | |
StatementList | $statementList |
|
private |
|
private |
|
private |