Helper object for mapping DataValues to complex RDF structures (value nodes).
More...
Helper object for mapping DataValues to complex RDF structures (value nodes).
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
-
Stas Malyshev
◆ __construct()
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::__construct |
( |
RdfVocabulary |
$vocabulary, |
|
|
RdfWriter |
$valueNodeWriter, |
|
|
DedupeBag |
$dedupeBag = null |
|
) |
| |
◆ attachValueNode()
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::attachValueNode |
( |
RdfWriter |
$writer, |
|
|
|
$propertyValueNamespace, |
|
|
|
$propertyValueLName, |
|
|
|
$dataType, |
|
|
|
$snakNamespace, |
|
|
DataValue |
$value, |
|
|
|
$normalized = false |
|
) |
| |
Creates a value node for $value, and attaches it to the current subject of $writer.
If a value node for $value was already created, null is returned. Otherwise, the value node's lname is returned, which should be used to generate detailed about the value into the writer returned by getValueNodeWriter().
When this method returns a non-null lname, the current subject of the RdfWriter returned by getValueNodeWriter() will the be value node with that lname.
- Parameters
-
RdfWriter | $writer | |
string | $propertyValueNamespace | Property value relation namespace |
string | $propertyValueLName | Property value relation name |
string | $dataType | Property data type (unused, passed here for symmetry with the signature of ValueSnakRdfBuilder::addValue). |
DataValue | $value | |
bool | $normalized | Is 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).
◆ getValueNodeWriter()
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::getValueNodeWriter |
( |
| ) |
|
◆ $dedupeBag
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::$dedupeBag |
|
private |
◆ $valueNodeWriter
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::$valueNodeWriter |
|
private |
◆ $vocabulary
Wikibase\Repo\Rdf\Values\ComplexValueRdfHelper::$vocabulary |
|
private |
The documentation for this class was generated from the following file: