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

Fully reified RDF mapping for wikibase statements, including deprecated and non-"best" statements, ranks, qualifiers, and references. More...

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

Public Member Functions

 __construct (RdfVocabulary $vocabulary, RdfWriter $writer, SnakRdfBuilder $snakBuilder)
 
 setDedupeBag (DedupeBag $dedupeBag)
 
 getProduceQualifiers ()
 
 setProduceQualifiers ( $produceQualifiers)
 
 getProduceReferences ()
 
 setProduceReferences ( $produceReferences)
 
 addStatements (EntityId $entityId, StatementList $statementList)
 Adds Statements to the RDF graph.
 
 addEntity (EntityDocument $entity)
 Add fully reified statements for the given entity to the RDF graph.
 

Private Member Functions

 addMainSnak (EntityId $entityId, $statementLName, Statement $statement, $isBest)
 Adds the given Statement's main Snak to the RDF graph.
 

Private Attributes

 $dedupeBag
 
 $produceQualifiers = true
 
 $produceReferences = true
 
 $vocabulary
 
 $statementWriter
 
 $referenceWriter
 
 $snakBuilder
 

Detailed Description

Fully reified RDF mapping for wikibase statements, including deprecated and non-"best" statements, ranks, qualifiers, and references.

This modells statements as identifiable objects and does not output a direct property to value mapping as the TruthyStatementRdfBuilder does. If both forms (direct and full) are desired, use TruthyStatementRdfBuilder in addition to FullStatementRdfBuilder.

See also
TruthyStatementRdfBuilder
Author
Daniel Kinzler
Stas Malyshev

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::__construct ( RdfVocabulary $vocabulary,
RdfWriter $writer,
SnakRdfBuilder $snakBuilder )

Member Function Documentation

◆ addEntity()

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

Add fully reified statements for the given entity to the RDF graph.

This may include qualifiers and references, depending on calls to setProduceQualifiers() resp. setProduceReferences().

Parameters
EntityDocument$entitythe entity to output.

Implements Wikibase\Repo\Rdf\EntityRdfBuilder.

◆ addMainSnak()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::addMainSnak ( EntityId $entityId,
$statementLName,
Statement $statement,
$isBest )
private

Adds the given Statement's main Snak to the RDF graph.

Parameters
EntityId$entityId
string$statementLName
Statement$statement
bool$isBestIs this best ranked statement?

◆ addStatements()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::addStatements ( EntityId $entityId,
StatementList $statementList )

Adds Statements to the RDF graph.

Parameters
EntityId$entityId
StatementList$statementList

◆ getProduceQualifiers()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::getProduceQualifiers ( )
Returns
boolean

◆ getProduceReferences()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::getProduceReferences ( )
Returns
boolean

◆ setDedupeBag()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::setDedupeBag ( DedupeBag $dedupeBag)

◆ setProduceQualifiers()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::setProduceQualifiers ( $produceQualifiers)
Parameters
boolean$produceQualifiers

◆ setProduceReferences()

Wikibase\Repo\Rdf\FullStatementRdfBuilder::setProduceReferences ( $produceReferences)
Parameters
boolean$produceReferences

Member Data Documentation

◆ $dedupeBag

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$dedupeBag
private

◆ $produceQualifiers

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$produceQualifiers = true
private

◆ $produceReferences

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$produceReferences = true
private

◆ $referenceWriter

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$referenceWriter
private

◆ $snakBuilder

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$snakBuilder
private

◆ $statementWriter

Wikibase\Repo\Rdf\FullStatementRdfBuilder::$statementWriter
private

◆ $vocabulary

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

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