Wikidata/Development/Data values

From Meta, a Wikimedia project coordination wiki

Results from the specification for Bug 49265

  • Information about which formatter to use for which value will be in the FormatterFactory
  • Parsers are dealt with like Formatters
  • Validators are tied to the DataType
  • Instead of a BadValue, we have an UndeserializableValue (Naming by Committee) and it only refers to UndeserializableValues, not to Type Mismatches (those will be handled differently, no agreement has been reach as to exactly how)
  • a "BadSnak" throws an exception for now and can not be handled as a datastructure around (an UndeserialiazableValue is not a BadSnak in this sense)
  • Formatters are to follow the pattern used in Ask, i.e. Options are given to the constructor, it dispatches to different formatters ber format, etc.
  • FormatterFactory is injected wherever needed