Help:Notes on record types
From semantic-mediawiki.org
Record related datatypes rely on special treatment in Semantic MediaWiki as the Help:DataItem is stored as separate entity while display characteristics are that of a "flat" Help:DataValue where in fact it is represented as DIContainer
using ContainerSemanticData
.
ResultArray
1 2 contains special handing to allow to use the |+index=...
output selector and QueryResultSerializer
to contain extra export data necessary for the serialization for this datatype.
Extension[edit]
A new record type should be registered with the name to include `_rec` 1 so existing container related handling (as in case of ResultArray
) can be make use of it.
Register a newly created record type as subtype 3.
$dataTypeRegistry->registerDatatype(
'_sci_freq_rec',
'\SCI\DataValues\CitationFrequencyValue',
DataItem::TYPE_WIKIPAGE,
false,
true // subtype
);
SMW\DataValues\MonolingualTextValue
as_mlt_rec
SCI\DataValues\CitationFrequencyValue
as_sci_freq_rec
References
- a b
- GitHub commit gh:smw:8e4351f
- ^ Semantic External Query Lookup: GitHub pull request gh:seql:22
- ^ Semantic MediaWiki: GitHub pull request gh:smw:1275