Entities

Format Description
Each entity is represented by one JS object. The eClass
field contains the entity class name.
Field-names have their first letter lower-cased.
Thus, a sample might be represented as:
{
eClass: 'Sample',
id: 'S123',
name: 'C1234-MP'
type: 'MiniPrep',
status: 'Completed',
format: 'Vial',
content: 'C1234'
}
This is a simplified example; if you get entities from the server, they will always have more information, e.g. the audit info (created/modified time and user).
Cross-References and Attributes
Associated row of shared types such as cross-references, attributes and tags may be included in the entity, although they need not be:
{
eClass: 'ResultSet',
id: 'RS123',
attributes: [
{ type: 'Text', name: 'TimePoint', valueText: 'T2' }
]
}
Other Associated Records
Some entities have specific associated records, e.g. a RackSet has RackTube associated rows. These are represented in the same way:
{
eClass: 'RackSet',
id: 'RACK123',
rackTubes: [
{ posRow: 0, posCol: 0, sampleID: 'S123' },
{ posRow: 1, posCol: 0, sampleID: 'S321' }
]
}
Parent Records
Steps and Experiments can have a single parent entity, linked by the parentID
field.
ResultSets and plates can have multiple parents, and they are listed in the parent
array:
WARNING: It's yet undecided whether samples are single- og multi-parent entities
{
eClass: 'ResultSet',
id: 'RS123',
parents: ['RS120', 'RS118']
}
Decimal numbers
All decimal numbers are represented using dot (.) as the decimal separator and without a thousand separator.
Scientific notation can be used, e.g. 1.34E-6
.
JSON fields
The content of JSON fields is included in raw form, i.e. not 'escaped', e.g.:
{
eClass: 'PlateLayer',
id: 'PL123',
content: {
wells: [
{ posRow: 0, posCol: 0, valueText: 'na' }
]
}
}
The Content
field is a JSON field and the JSON content is stored in a CLOB column
in the database. In this case, the Content field in the database would contain:
{
wells: [
{ posRow: 0, posCol: 0, valueText: 'na' }
]
}
BLOB fields
BLOB content is serialized as Base64.
Date information
When sent from the server, dates are represented like this:
2016-12-27T00:00:00
Date/time values are represented as:
2016-12-27T07:52:25.3368581
When sending date and date-time information to the server, it will try to make sense of a few other formats, but it's generally recommended to use the formats shown above.
When the field-name ends with 'Date', it's local date. When ending in 'Dti', it local date & time. When ending in 'Utc', it's UTC (GMT).
WARNING: UTC is currently not serialized with a 'Z' suffix - this will be fixed at some later time, so don't rely on it not being there.
We aim to comply with ISO8601, although we are still non-compliant in a few issues (the Z suffix, in particular).