Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Rdf\EntityMentionListener Interface Reference

Interface for tracking entities mentioned while generating RDF. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\EntityMentionListener:

Public Member Functions

 entityReferenceMentioned (EntityId $id)
 Should be called when an entity reference (an EntityIdValue object) is encountered.
 
 propertyMentioned (PropertyId $id)
 Should be called when a property is used in a PropertySnak.
 
 subEntityMentioned (EntityDocument $entity)
 Should be called when a sub entity is encountered.
 

Detailed Description

Interface for tracking entities mentioned while generating RDF.

This information can be used to generate "stub" entries for entities that are referenced in the RDF output. Such stubs would typically give at least a type and a label for the entity.

Author
Daniel Kinzler
Thomas Pellissier Tanon

Member Function Documentation

◆ entityReferenceMentioned()

Wikibase\Repo\Rdf\EntityMentionListener::entityReferenceMentioned ( EntityId $id)

Should be called when an entity reference (an EntityIdValue object) is encountered.

Parameters
EntityId$id

Implemented in Wikibase\Repo\Rdf\NullEntityMentionListener, and Wikibase\Repo\Rdf\RdfBuilder.

◆ propertyMentioned()

Wikibase\Repo\Rdf\EntityMentionListener::propertyMentioned ( PropertyId $id)

Should be called when a property is used in a PropertySnak.

Parameters
PropertyId$id

Implemented in Wikibase\Repo\Rdf\NullEntityMentionListener, and Wikibase\Repo\Rdf\RdfBuilder.

◆ subEntityMentioned()

Wikibase\Repo\Rdf\EntityMentionListener::subEntityMentioned ( EntityDocument $entity)

Should be called when a sub entity is encountered.

For example, in WikibaseLexeme, when a Form or a Sense is encountered when serializing a Lexeme.

Parameters
EntityDocument$entity

Implemented in Wikibase\Repo\Rdf\NullEntityMentionListener, and Wikibase\Repo\Rdf\RdfBuilder.


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