Construct a stream ID style identifier.
the datum kind, or kind key or name value
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum stream ID
Optional
aggregation: Aggregationthe aggregation
Construct an object and source ID style identifier.
the datum kind, or kind key or name value
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum object ID
Optional
aggregation: Aggregationthe aggregation
Construct an object and source ID style identifier along with a stream ID.
the datum kind, or kind key or name value
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum object ID
Optional
aggregation: Aggregationthe aggregation
Optional
streamId: stringthe datum stream ID
Optional
Readonly
aggregationThe aggregation.
Readonly
kindThe datum stream kind (node, location).
Optional
Readonly
objectThe object ID (node, location).
Optional
Readonly
sourceThe source ID.
Optional
Readonly
streamThe datum stream ID.
Readonly
timestampThe datum creation/capture date.
Test if this identifier is fully specified.
A datum identifier is considered fully specified if all of the following are true:
kind
and timestamp
properties are definedstreamId
property is defined, or both the objectId
and sourceId
properties are definedIn essence, there are two styles of datum identifier:
An object and source ID pair are alises for a corresponding stream ID, but are often more convenient for people to use.
true
if this identifier if fully specified
Get this object as a standard JSON encoded string value.
This method calls Domain.DatumIdentifier#toJsonEncoding and then turns that into a JSON string.
the JSON encoded string
Get this object in standard JSON form.
An example result looks like this:
{
"kind": "n",
"timestamp": "2025-02-01 12:00:00.000Z"
"streamId": "7714f762-2361-4ec2-98ab-7e96807b32a6",
"objectId": 123,
"sourceId": "/power/1",
"aggregation": "None"
}
an object, ready for JSON encoding
Static
fromParse a JSON string into a Domain.DatumIdentifier instance.
The JSON must be encoded the same way Domain.DatumIdentifier#toJsonEncoding does.
the JSON to parse
the datum identifier instance, or undefined
if json
is undefined
Static
fromCreate an identifier instance from an object parsed from a JSON string.
The object must have been parsed from JSON that was encoded the same way Domain.DatumIdentifier#toJsonEncoding does.
the object parsed from JSON
the datum identifier instance, or undefined
if obj
is undefined
Static
locationCreate a location stream ID style identifier.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum stream ID
Optional
aggregation: Aggregationthe aggregation
Create a location and source ID style identifier.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum location ID
Optional
aggregation: Aggregationthe aggregation
Create a location and source ID style identifier along with a stream ID.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum location ID
Optional
aggregation: Aggregationthe aggregation
Optional
streamId: stringthe datum stream ID
Static
nodeCreate a stream ID style identifier.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum stream ID
Optional
aggregation: Aggregationthe aggregation
Create a node and source ID style identifier.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum node ID
Optional
aggregation: Aggregationthe aggregation
Create a node and source ID style identifier along with a stream ID.
the datum timestamp, either as a Date
instance or a form suitable for constructing as new Date(ts)
the datum source ID
the datum node ID
Optional
aggregation: Aggregationthe aggregation
Optional
streamId: stringthe datum stream ID
A general datum identifier class.
A datum identifier must be fully specified to be valid. A fully specified identifier must meet either of these requirements (in addition to having
kind
andtimestamp
values):streamId
valueobjectId
andsourceId
valuesThe
objectId
plussourceId
values together represent an alias for thestreamId
.The absence of an
aggregation
implies "no aggregation", or theNone
aggregation value.Create instances of this class like: