SWIM-INFO-012 Use of data types
Last updated: JANUARY 24th, 2019
Requirement
Guidance
Basic data types include:
- booleans
- strings
- numbers such as reals and decimals
- dates
The AIRM import ISO 19103:2005 - Geographic information — Conceptual schema language as the reference for its basic types. In effect, this requirement asks that information definitions use a set of basic data types that are compatible with ISO 19103:2005. UML examples of ISO 19103 are given below.
Compatible is defined in the dictionary as "able to exist or occur together without problems or conflict". This means that the basic types used in an information definition must not "break" those used in the AIRM. This does allow some flexibility:
- A basic type used in the information definition may be more restricted than that in the AIRM. For example, a real is more restricted than a Number. A string of length 4 is more restricted that a string of length 32.
- The compatibility may be achieved by "casting" basic types. For example, an integer may be cast to a string. However, this is not always true in the reverse direction.
Assuming XML is the final output, the following mapping from ISO to XML types shall be used (based on "ISO 19118:2005 - Geographic information — Encoding") :
ISO19103:2005 | XML Schema Definition Language |
---|---|
Number | decimal |
Integer | integer |
Decimal | decimal |
Real | decimal |
CharacterString | string |
Date | date |
Time | time |
DateTime | dateTime |
Boolean | boolean |
Verification Support
Consistency
Check that:
[ ] The information definition’s basic data types do not conflict with those in the AIRM.