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

Factory to return Rdf builders for special parts of properties. More...

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

Public Member Functions

 __construct (RdfVocabulary $vocabulary, RdfWriter $writer, array $dataTypes=[])
 
 addEntity (EntityDocument $entity)
 Map a property to the RDF graph.
 
 addEntityStub (EntityDocument $entity)
 Map some aspects of a property to the RDF graph, as it should appear in the stub representation of the property.
 

Public Attributes

const OBJECT_PROPERTY = 'ObjectProperty'
 
const DATATYPE_PROPERTY = 'DatatypeProperty'
 
const NO_NORMALIZATION = null
 

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

 $vocabulary
 
 $writer
 
 $dataTypes
 

Detailed Description

Factory to return Rdf builders for special parts of properties.

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

Constructor & Destructor Documentation

◆ __construct()

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

Member Function Documentation

◆ addEntity()

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

Map a property to the RDF graph.

Parameters
EntityDocument$entity

Implements Wikibase\Repo\Rdf\EntityRdfBuilder.

◆ addEntityStub()

Wikibase\Repo\Rdf\PropertyRdfBuilder::addEntityStub ( EntityDocument  $entity)

Map some aspects of a property to the RDF graph, as it should appear in the stub representation of the property.

Parameters
EntityDocument$entity

Implements Wikibase\Repo\Rdf\EntityRdfBuilder.

◆ addProperty()

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

◆ getNormalizedPropertyRdfType()

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

◆ getPropertyRdfType()

Wikibase\Repo\Rdf\PropertyRdfBuilder::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\PropertyRdfBuilder::writeNovalueClass (   $localName,
  $repositoryName 
)
private

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

Parameters
string$localName
string$repositoryName

◆ writePropertyPredicates()

Wikibase\Repo\Rdf\PropertyRdfBuilder::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

◆ $dataTypes

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

◆ $vocabulary

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

◆ $writer

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

◆ DATATYPE_PROPERTY

const Wikibase\Repo\Rdf\PropertyRdfBuilder::DATATYPE_PROPERTY = 'DatatypeProperty'

◆ NO_NORMALIZATION

const Wikibase\Repo\Rdf\PropertyRdfBuilder::NO_NORMALIZATION = null

◆ OBJECT_PROPERTY

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

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