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

RDF mapping for UnboundedQuantityValue and QuantityValue. More...

+ Inheritance diagram for Wikibase\Repo\Rdf\Values\QuantityRdfBuilder:
+ Collaboration diagram for Wikibase\Repo\Rdf\Values\QuantityRdfBuilder:

Public Member Functions

 __construct (ComplexValueRdfHelper $complexValueHelper=null, UnitConverter $unitConverter=null)
 
 writeQuantityValue (UnboundedQuantityValue $value)
 Write data for the value.
 
- Public Member Functions inherited from Wikibase\Repo\Rdf\ValueSnakRdfBuilder
 addValue (RdfWriter $writer, $propertyValueNamespace, $propertyValueLName, $dataType, $snakNamespace, PropertyValueSnak $snak)
 Adds specific value.
 

Private Member Functions

 linkNormalizedValue ( $valueNamespace, $valueLName, $normLName)
 Connects a normalized value node to its base node via the quantityNormalized predicate.
 
 addValueNode (RdfWriter $writer, $propertyValueNamespace, $propertyValueLName, $dataType, $valueNamespace, UnboundedQuantityValue $value, $normalized=false)
 Adds a value node representing all details of $value.
 

Private Attributes

 $complexValueHelper
 
 $unitConverter
 

Detailed Description

RDF mapping for UnboundedQuantityValue and QuantityValue.

Author
Daniel Kinzler
Stas Malyshev

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::__construct ( ComplexValueRdfHelper $complexValueHelper = null,
UnitConverter $unitConverter = null )

Member Function Documentation

◆ addValueNode()

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::addValueNode ( RdfWriter $writer,
$propertyValueNamespace,
$propertyValueLName,
$dataType,
$valueNamespace,
UnboundedQuantityValue $value,
$normalized = false )
private

Adds a value node representing all details of $value.

Parameters
RdfWriter$writer
string$propertyValueNamespaceProperty value relation namespace
string$propertyValueLNameProperty value relation name
string$dataTypeProperty data type
string$valueNamespace
UnboundedQuantityValue$value
bool$normalizedIs this a normalized value?
Returns
string|null The LName of the value node (in the RdfVocabulary::NS_VALUE namespace), or null if the value node should not be processed (generally, because it already has been processed).

◆ linkNormalizedValue()

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::linkNormalizedValue ( $valueNamespace,
$valueLName,
$normLName )
private

Connects a normalized value node to its base node via the quantityNormalized predicate.

Parameters
string$valueNamespace
string | null$valueLName
string | null$normLName

◆ writeQuantityValue()

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::writeQuantityValue ( UnboundedQuantityValue $value)

Write data for the value.

This expects the current subject of the RDF writer to be the value node. No instance-of statement is written about the value.

Parameters
UnboundedQuantityValue$value

Member Data Documentation

◆ $complexValueHelper

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::$complexValueHelper
private

◆ $unitConverter

Wikibase\Repo\Rdf\Values\QuantityRdfBuilder::$unitConverter
private

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