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

Rdfbuilder to create the triples that describe: More...

Public Member Functions

 __construct (RdfVocabulary $vocabulary, RdfWriter $writer, PropertyDataTypeLookup $dataTypeLookup, array $dataTypes=[])
 
 addEntity (EntityDocument $entity)
 Map a property to the RDF graph.
 

Public Attributes

const OBJECT_PROPERTY = 'ObjectProperty'
 

Private Member Functions

 writePropertyPredicates ( $localName, $repositoryName, $propertyRdfType, $normalizedPropertyRdfType)
 Write predicates linking property entity to property predicates.
 
 getPropertyRdfType (Property $property)
 Check if the property describes link between objects or just data item.
 
 getNormalizedPropertyRdfType (Property $property)
 
 writeNovalueClass ( $localName, $repositoryName)
 Write definition for wdno:P123 class to use as novalue.
 
 addProperty (Property $property)
 

Private Attributes

const DATATYPE_PROPERTY = 'DatatypeProperty'
 
const NO_NORMALIZATION = null
 
 $vocabulary
 
 $writer
 
 $dataTypes
 
 $dataTypeLookup
 

Detailed Description

Rdfbuilder to create the triples that describe:

  • the datatypes of properties
  • the predicates that will be used when creating value triples
  • classes for making novalue statements

This RDF builder should only write content for properties and should do nothing for other entities.

Author
Amir Sarabadani ladsg.nosp@m.roup.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::__construct ( RdfVocabulary $vocabulary,
RdfWriter $writer,
PropertyDataTypeLookup $dataTypeLookup,
array $dataTypes = [] )

Member Function Documentation

◆ addEntity()

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

Map a property to the RDF graph.

Parameters
EntityDocument$entity

◆ addProperty()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::addProperty ( Property $property)
private

◆ getNormalizedPropertyRdfType()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::getNormalizedPropertyRdfType ( Property $property)
private
Parameters
Property$property
Returns
string|null

◆ getPropertyRdfType()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::getPropertyRdfType ( Property $property)
private

Check if the property describes link between objects or just data item.

Parameters
Property$property
Returns
string RDF/OWL type name for this property.

◆ writeNovalueClass()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::writeNovalueClass ( $localName,
$repositoryName )
private

Write definition for wdno:P123 class to use as novalue.

Parameters
string$localName
string$repositoryName

◆ writePropertyPredicates()

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::writePropertyPredicates ( $localName,
$repositoryName,
$propertyRdfType,
$normalizedPropertyRdfType )
private

Write predicates linking property entity to property predicates.

Parameters
string$localName
string$repositoryName
string$propertyRdfTypeOWL data type (OBJECT_PROPERTY or DATATYPE_PROPERTY)
string | null$normalizedPropertyRdfTypeDoes the property have normalized predicates, and if so does the property normalize to data or objects?

Member Data Documentation

◆ $dataTypeLookup

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::$dataTypeLookup
private

◆ $dataTypes

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::$dataTypes
private

◆ $vocabulary

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

◆ $writer

Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::$writer
private

◆ DATATYPE_PROPERTY

const Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::DATATYPE_PROPERTY = 'DatatypeProperty'
private

◆ NO_NORMALIZATION

const Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::NO_NORMALIZATION = null
private

◆ OBJECT_PROPERTY

const Wikibase\Repo\Rdf\PropertySpecificComponentsRdfBuilder::OBJECT_PROPERTY = 'ObjectProperty'

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