There should be an extension point for definign new data types. Currently, data types are hard coded in several places, at least:
- In WikiBaseDataTypeBuilders
- In WikibaseRepo, when initializing the DeserializerFactory
- in Wikibase.php, when setting up $wgValueParsers
And probably more places, for JS, etc.
For DataTypes, we have:
- DataValueFactory
- WikibaseValueFormatterBuilders