Writing data values

From semantic-mediawiki.org
Table of Contents

This documentation is work in progress; some sections are not finished yet.

This page explains how to create new SMWDataValue deriving classes, which represent data types that can be used by SMW (ie SMWBoolValue, SMWTimeValue, SMGeoCoordsValue) This is a developers topic, and is not relevant to regular users.

What is a DataValue[edit]

You can find a detailed description of what a DataValue within SMW is in the Architecture guide.

Compatibility notice[edit]

In SMW 1.5.x and earlier versions DataValues are responsible for parsing user input, formatting output, representing values and storage serialization. In SMW 1.6 the later two got split off into what's now know as a Help:DataItem. There are plans to further split this up into specialized components. Work on this is already being done as part of the DataValues and associated extensions for the Wikidata project. A lot of the new code being written there is based on existing SMW code and is being designed in such a way we can later replace the DataValue and DataItem classes in SMW with this new system.


See also[edit]