Service for creating a relationship between a lookup key and another that is the base data type it is built around. For example, LookupKey.Integer uses a number as the base data type. So it has a relationship with LookupKey.Number. This service keeps these relationships. The DataTypeFormatterService and DataTypeParserService consume this as they try to find the best fitting Formatter or Parser.

Suppose that your InputValueHost has its datatype="PositiveInteger". Initially DataTypeFormatterService and DataTypeParserService look for a Formatter or Parser whose LookupKey is "PositiveInteger". If not found, we don't want to force the user to either create a new class or register a map with "PositiveInteger" and a suitable class: NumberFormatter or NumberParser.

As a result, the user should register each NEW lookupkey they create if it has a natural base data type.

Jivs will automatically register its own built-in LookupKeys (see LookupKeys.ts)

Base data types are LookupKey.Number, LookupKey.String, LookupKey.Boolean, LookupKey.Date, LookupKey.DateTime, LookupKey.LocalDate, LookupKey.TimeOfDay. However, if you create a new type that you consider "base data type", you can use it too.

It is valid to do this: "PositiveInteger" fallback to LookupKey.Integer fallback to LookupKey.Number. That way, the formatter or parser can first try for an IntegerFormatter or IntegerParser (Note: IntegerParser does not exist.)

Hierarchy (view full)

Implements

Constructors

Accessors

Methods

Generated using TypeDoc v0.25.12