Component Type Printable Representations

Previous

General Rules

The Cu.toString() representation of an Item is very simple. Each primitive component is displayed like its Java-code constant, and other component types have easily remembered representations like {nn.nn} for byte arrays or [nnn] for Index components. Because the Cu.toString() format clearly separates the components, it is possible to recreate the Item from such a string. This characteristic is used in the ItemEditor, which is a GUI-based low-level ItemSpace explorer and modifier. The EntityClass and Attribute component types do not have the luxury of knowing the names assigned to them in their corresponding static final constants, so they print as 'Enn' and 'Ann'. A metadata system in the future may alleviate this problem.

Table of Representations

Here are all the InfinityDB Item component type representations:

boolean 'true' or 'false'
long A positive or negative 64 bit integer: * No decimal point.
floatA scientific or decimal number ending in 'f'.
double a scientific or decimal number.
Date A date in the format yyyy/mm/dd hh:mm:ss.mmm-zzzz. The parts of the date at the right may be truncated if zero, except for the month, so that at least one slash is always present to differentiate a date from a long. Because the hh:mm:ss is separated from the yyyy/mm/dd by a space, at least one colon must be present to differentiate it from a following long.
String Quoted with '"'. Backslash escapes quotes and itself.
char[] A quoted string surrounded by braces, as for String above
byte[] Braces containing a space-separated sequence of positive 8 bit integers. (hex is not available yet.)
ByteString#nn nn..nn# where nn are positive decimals 0..255
Index Square brackets surrounding a positive 64 bit integer
EntityClass 'E' followed immediately by a positive 64 bit integer. (A future formatter may allow metadata to be used to translate this raw number into a name.)
Attribute'A' followed immediately by a positive 64 bit integer (A future formatter may allow metadata to be used to translate this raw number into a name.)
InfinityInfinity

Previous


Copyright © 1997-2006 Boiler Bay.