|
Wikibase
MediaWiki Wikibase extension
|
RDF mapping for wikibase data model. More...
Inheritance diagram for Wikibase\Repo\Rdf\RdfBuilder:
Collaboration diagram for Wikibase\Repo\Rdf\RdfBuilder:Public Member Functions | |
| __construct (SiteList $sites, RdfVocabulary $vocabulary, ValueSnakRdfBuilderFactory $valueSnakRdfBuilderFactory, PropertyDataTypeLookup $propertyLookup, EntityRdfBuilderFactory $entityRdfBuilderFactory, $flavor, RdfWriter $writer, DedupeBag $dedupeBag, EntityTitleLookup $titleLookup) | |
| startDocument () | |
| Start writing RDF document Note that this builder does not have to finish it, it may be finished later. | |
| finishDocument () | |
| Finish writing the document After that, nothing should ever be written into the document. | |
| getRDF () | |
| Returns the RDF generated by the builder. | |
| getNamespaces () | |
| Returns a map of namespace names to URIs. | |
| getPageProperties () | |
| Get map of page properties used by this builder. | |
| entityReferenceMentioned (EntityId $id) | |
| propertyMentioned (PropertyId $id) | |
| subEntityMentioned (EntityDocument $entity) | |
| addEntityRevisionInfo (EntityId $entityId, $revision, $timestamp) | |
| Adds revision information about an entity's revision to the RDF graph. | |
| setPageProps (PageProps $pageProps) | |
| Set page props handler. | |
| addEntityPageProps (EntityId $entityId) | |
| Add page props information. | |
| addEntity (EntityDocument $entity) | |
| Add an entity to the RDF graph, including all supported structural components of the entity and its sub entities. | |
| resolveMentionedEntities (EntityLookup $entityLookup) | |
| Add stubs for any entities that were previously mentioned (e.g. | |
| addEntityStub (EntityDocument $entity) | |
| Adds stub information for the given Entity to the RDF graph. | |
| addEntityRedirect (EntityId $from, EntityId $to) | |
| Declares $from to be an alias for $to, using the owl:sameAs relationship. | |
| addDumpHeader ( $timestamp=0) | |
| Create header structure for the dump (this makes RdfProducer::PRODUCE_VERSION_INFO redundant) | |
Private Member Functions | |
| newSnakBuilder ( $flavorFlags) | |
| newTruthyStatementRdfBuilder () | |
| newFullStatementRdfBuilder () | |
| shouldProduce ( $what) | |
| Should we produce this aspect? | |
| entityToResolve (EntityId $entityId) | |
| Registers an entity as mentioned. | |
| entityResolved (EntityId $entityId) | |
| Registers an entity as resolved. | |
| addEntityMetaData (EntityDocument $entity) | |
| Adds meta-information about an entity (such as the ID and type) to the RDF graph. | |
| addSingleEntity (EntityDocument $entity) | |
| Add a single entity to the RDF graph, including all supported structural components of the entity. | |
| addQueuedEntities () | |
| Add the RDF serialization of all entities in the entitiesToOutput queue. | |
RDF mapping for wikibase data model.
| Wikibase\Repo\Rdf\RdfBuilder::__construct | ( | SiteList | $sites, |
| RdfVocabulary | $vocabulary, | ||
| ValueSnakRdfBuilderFactory | $valueSnakRdfBuilderFactory, | ||
| PropertyDataTypeLookup | $propertyLookup, | ||
| EntityRdfBuilderFactory | $entityRdfBuilderFactory, | ||
| $flavor, | |||
| RdfWriter | $writer, | ||
| DedupeBag | $dedupeBag, | ||
| EntityTitleLookup | $titleLookup | ||
| ) |
| SiteList | $sites | |
| RdfVocabulary | $vocabulary | |
| ValueSnakRdfBuilderFactory | $valueSnakRdfBuilderFactory | |
| PropertyDataTypeLookup | $propertyLookup | |
| EntityRdfBuilderFactory | $entityRdfBuilderFactory | |
| int | $flavor | |
| RdfWriter | $writer | |
| DedupeBag | $dedupeBag | |
| EntityTitleLookup | $titleLookup |
| Wikibase\Repo\Rdf\RdfBuilder::addDumpHeader | ( | $timestamp = 0 | ) |
Create header structure for the dump (this makes RdfProducer::PRODUCE_VERSION_INFO redundant)
| int | $timestamp | Timestamp (for testing) |
| Wikibase\Repo\Rdf\RdfBuilder::addEntity | ( | EntityDocument | $entity | ) |
Add an entity to the RDF graph, including all supported structural components of the entity and its sub entities.
| EntityDocument | $entity | the entity to output. |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
|
private |
Adds meta-information about an entity (such as the ID and type) to the RDF graph.
| EntityDocument | $entity |
| Wikibase\Repo\Rdf\RdfBuilder::addEntityPageProps | ( | EntityId | $entityId | ) |
Add page props information.
| EntityId | $entityId |
| Wikibase\Repo\Rdf\RdfBuilder::addEntityRedirect | ( | EntityId | $from, |
| EntityId | $to | ||
| ) |
Declares $from to be an alias for $to, using the owl:sameAs relationship.
| EntityId | $from | |
| EntityId | $to |
| Wikibase\Repo\Rdf\RdfBuilder::addEntityRevisionInfo | ( | EntityId | $entityId, |
| $revision, | |||
| $timestamp | |||
| ) |
Adds revision information about an entity's revision to the RDF graph.
| EntityId | $entityId | |
| int | $revision | |
| string | $timestamp | in TS_MW format |
| Wikibase\Repo\Rdf\RdfBuilder::addEntityStub | ( | EntityDocument | $entity | ) |
Adds stub information for the given Entity to the RDF graph.
Stub information means meta information and labels.
| EntityDocument | $entity |
Implements Wikibase\Repo\Rdf\EntityRdfBuilder.
|
private |
Add the RDF serialization of all entities in the entitiesToOutput queue.
|
private |
Add a single entity to the RDF graph, including all supported structural components of the entity.
| EntityDocument | $entity | the entity to output. |
| Wikibase\Repo\Rdf\RdfBuilder::entityReferenceMentioned | ( | EntityId | $id | ) |
| EntityId | $id |
Implements Wikibase\Repo\Rdf\EntityMentionListener.
|
private |
Registers an entity as resolved.
| EntityId | $entityId |
|
private |
Registers an entity as mentioned.
Will be recorded as unresolved if it wasn't already marked as resolved.
| EntityId | $entityId |
| Wikibase\Repo\Rdf\RdfBuilder::finishDocument | ( | ) |
Finish writing the document After that, nothing should ever be written into the document.
| Wikibase\Repo\Rdf\RdfBuilder::getNamespaces | ( | ) |
Returns a map of namespace names to URIs.
| Wikibase\Repo\Rdf\RdfBuilder::getPageProperties | ( | ) |
Get map of page properties used by this builder.
| Wikibase\Repo\Rdf\RdfBuilder::getRDF | ( | ) |
Returns the RDF generated by the builder.
|
private |
|
private |
| int | $flavorFlags | Flavor flags to use for this builder |
|
private |
| Wikibase\Repo\Rdf\RdfBuilder::propertyMentioned | ( | PropertyId | $id | ) |
| PropertyId | $id |
Implements Wikibase\Repo\Rdf\EntityMentionListener.
| Wikibase\Repo\Rdf\RdfBuilder::resolveMentionedEntities | ( | EntityLookup | $entityLookup | ) |
Add stubs for any entities that were previously mentioned (e.g.
as properties or data values).
| EntityLookup | $entityLookup |
| Wikibase\Repo\Rdf\RdfBuilder::setPageProps | ( | PageProps | $pageProps | ) |
Set page props handler.
| PageProps | $pageProps |
|
private |
Should we produce this aspect?
| int | $what |
| Wikibase\Repo\Rdf\RdfBuilder::startDocument | ( | ) |
Start writing RDF document Note that this builder does not have to finish it, it may be finished later.
| Wikibase\Repo\Rdf\RdfBuilder::subEntityMentioned | ( | EntityDocument | $entity | ) |
| EntityDocument | $entity |
Implements Wikibase\Repo\Rdf\EntityMentionListener.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |