Unified standards ingestion into an EntityCollection.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Loader options.
|
Members
Default per-schema ID extraction.
Association keys that more than one catalogd object presented, and were
therefore refused. Each entry is
`{ lookupKey, claimed, incoming }` — `claimed` is the catalog number that
owns the key, `incoming` the one that was kept separate from it.
Methods
Attach one standards record directly to an entity and register it with the
shared mutation registry.
| Name | Type | Description |
|---|---|---|
entity |
Entity | Target entity. |
schema |
string | Standards schema (`OMM`, `CAT`, `OEM`, `OCM`, or `RFB`). |
record |
object | Uint8Array | ArrayBuffer | string | Standards record payload. |
options |
object | optional Attachment options. |
Returns:
Attachment summary.
Bind every `$RFB` record in a payload to an entity. A `$RFB` record carries
exactly ONE `LINK_DIRECTION`, so a transceiver arrives as two records and a
per-record call would drop one.
| Name | Type | Description |
|---|---|---|
entity |
Entity | Target entity. |
rfbRecords |
Array.<object> | Uint8Array | ArrayBuffer | string | RFB payload. |
options |
object | optional Attachment options. |
Returns:
Attachment summary with one recordKey per bound emitter.
Bind one `$RFB` emitter record to an entity.
Accepts `$RFB` FlatBuffer bytes (the shape an SDN record route serves), a
size-prefixed `$RFB` stream, RFB JSON, or an array/`{RFB: [...]}` wrapper.
Frequencies stay in MHz exactly as the schema defines them.
| Name | Type | Description |
|---|---|---|
entity |
Entity | Target entity. |
rfbRecord |
object | Uint8Array | ArrayBuffer | string | RFB record payload. |
options |
object | optional Attachment options. |
Returns:
Attachment summary.
Example:
const bytes = new Uint8Array(await (await fetch(rfbUrl)).arrayBuffer());
loader.attachRFBToEntity(satellite, bytes);
const downlinks = satellite.getRFBRecords({ direction: "DOWNLINK" });
Clear cached association index entries.
Compact tombstoned shared standards records immediately.
| Name | Type | Description |
|---|---|---|
options |
object | optional Compaction options. |
Returns:
Number of compacted tombstones.
Create a size-prefixed binary stream handler.
| Name | Type | Description | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Stream options.
|
Returns:
Stream handler with pushBytes().
Example:
const loader = new StandardsLoader({
entityCollection: viewer.entities,
schemaEntityTypeMap: { CZM: "space", KML: "space", GJN: "space" },
associationKeyStrategy: {
space: {
default: (record) =>
record?.OBJECT_ID ?? record?.id ?? record?.properties?.OBJECT_ID,
},
},
});
const stream = loader.createStreamHandler({
// Default adapters decode framed $OCM/$CZM/$KML/$GJN payload bodies.
streamFramePolicyMap: { $OEM: { latestOnly: true } },
frameRouter: {
$TDM: (payload, context) => {
// custom route for app-specific framed payloads
return false; // fall through to default loader route when not handled
},
},
});
Wait until the shared standards mutation queue is idle.
| Name | Type | Description |
|---|---|---|
options |
object | optional Queue options. |
Returns:
Resolves when queued mutations are finished.
Read one page of a group's membership.
A folder view pages; it does not enumerate. The catalog folder asserts
37,189 members and the transmitter folder 5,014, so a view that materialises
a whole group before drawing it has already lost. This returns a bounded
page, and reports the total separately so a pager can size itself without
touching the rest.
TWO KINDS OF GROUP, ONE CALL. An enumerated group pages over the ids it
resolved at load. A query-defined group holds no members at all — the
standard's QUERY_SNAPSHOT and QUERY_LIVE modes carry the query instead — so
the page comes back empty with `query` set, and the caller pages at the
source that can evaluate the dialect. Either way the caller asks the same
question and reads `total`.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
groupId |
string | The group's publisher-stable `GROUP_ID`. | ||||||||||||||||||||
options |
object |
optional
Paging options.
|
Returns:
`{ groupId, total, offset, limit, members, entities, unresolved, query, filtered }`.
Example:
// Groups themselves enumerate like any other ingested standard; this pages
// inside one of them, by its GROUP_ID.
const page = loader.getGroupMembers("orbital-study:folder:ground-stations", {
offset: 0,
limit: 50,
filter: "svalbard",
});
Read active standard records attached to one entity. The returned
descriptors retain schema, recordKey, role, attachment metadata, payload,
and available decoded metadata. All objects and binary views are detached
snapshots; editing them does not update the entity or publish a record.
Binary-only records still require their generated SDS decoder. Host-local
ENTITY query metadata is excluded. This method neither initializes the
native backend nor rebuilds its SQL index.
An entity without explicitly registered SDS records uses its public
CAT/OMM/RFB accessors, including propagator-backed catalog records. Creating
an ETM-only query consumer (for example, a child-entity query) does not
supersede these records.
Those snapshots carry accessor and attachedVia="native-accessor"; they do
not invent ingestion record keys, attachment roles, or publisher provenance.
They cover the current native catalog records, not a complete attachment
history. Once SDS records are explicitly registered for an entity, that
registry remains authoritative for its id until the consumer is disposed,
even after tombstone compaction. Native accessors cannot revive its deleted
records, and unrelated entities retain their native record readers.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
entity |
Entity | string | Entity or stable collection-local id. | ||||||
options |
object |
optional
Read options.
|
Returns:
Detached record descriptors or native snapshots;
undefined means neither a consumer nor supported member accessors exist,
while [] means the supported reader has no records.
Resolve mapped entity type for a schema.
| Name | Type | Description |
|---|---|---|
schema |
string | Standards schema (OMM/OEM/CAT/CZM/KML/GJN...). |
Returns:
Entity type mapping.
Check whether the target collection is backed by the shared query consumer.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Consumer options.
|
Returns:
True when shared query state is active.
Inspect the shared mutation state for the target collection.
| Name | Type | Description |
|---|---|---|
options |
object | optional Inspection options. |
Returns:
Shared mutation snapshot.
Auto-detect format and load.
| Name | Type | Description |
|---|---|---|
data |
Resource | string | ArrayBuffer | Uint8Array | object | Input data. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load CAT records and index them in plugin sqlite by NORAD ID.
| Name | Type | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
catRecords |
Array.<object> | string | ArrayBuffer | Uint8Array | CAT input. | ||||||||
options |
object |
optional
Per-load options.
|
Returns:
Load summary.
Load CDM records.
| Name | Type | Description |
|---|---|---|
cdmData |
object | Array.<object> | ArrayBuffer | Uint8Array | CDM input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load CZML packets and merge into target collection.
| Name | Type | Description |
|---|---|---|
czmlPackets |
Resource | string | object | CZML input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load `$EGP` groups as folder entities and attach their members.
A folder is a graphics-less parent entity, which is what makes `show` cascade
to everything inside it. Membership is an ASSERTION, not a foreign key: a
member this collection does not hold is counted as dangling and skipped,
never a reason to drop the group.
ONE PARENT, MANY GROUPS. An entity has exactly one `parent`, but it belongs
to as many groups as assert it: every ILRS station is both a ground station
and a laser ranging station. Parent is therefore assigned ONCE — to the first
folder that claims an entity, which gives that folder a working `show`
cascade — while membership itself is recorded on BOTH sides and is what a
folder view should read: `groupMembers` on the folder lists the entity ids it
resolved, and `groupIds` on each member lists every folder it belongs to.
Reading membership from `parent` alone would show one of these folders full
and the rest empty.
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
groupData |
Uint8Array | ArrayBuffer | string | object | Array.<object> | `$EGP` bytes, a size-prefixed stream, JSON, or records. | ||||||||||||||||
options |
object |
optional
Load options.
|
Returns:
Load summary, including `dangling` and `alreadyParented` counts.
Load GeoJSON and merge into target collection.
| Name | Type | Description |
|---|---|---|
geojsonData |
Resource | string | object | GeoJSON input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load standalone `$IDM` instrument records.
| Name | Type | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
instrumentData |
Uint8Array | ArrayBuffer | string | object | Array.<object> | `$IDM` bytes, a size-prefixed stream, JSON, or records. | ||||||||||||||||
options |
object |
optional
Load options.
|
Returns:
Load summary.
Load KML and merge into target collection.
| Name | Type | Description |
|---|---|---|
kmlData |
Resource | string | Document | Blob | KML input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load OCM data.
| Name | Type | Description |
|---|---|---|
ocmData |
object | Array.<object> | OCM input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load OEM data.
| Name | Type | Description |
|---|---|---|
oemData |
Array.<object> | string | ArrayBuffer | Uint8Array | OEM input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load OMM records with batch propagator initialization.
| Name | Type | Description |
|---|---|---|
ommRecords |
Array.<object> | string | ArrayBuffer | Uint8Array | OMM input. |
options |
object | optional Per-load options. |
Returns:
Load summary.
Load `$SIT` site records as positioned entities, with their integrated
devices as child entities.
| Name | Type | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
siteData |
Uint8Array | ArrayBuffer | string | object | Array.<object> | `$SIT` bytes, a size-prefixed stream, JSON, or records. | ||||||||||||||||||||||||||||
options |
object |
optional
Load options.
|
Returns:
Load summary.
Decode a `$RFB` payload into normalized emitter metadata WITHOUT binding it
to an entity. Accepts the same shapes as
StandardsLoader#attachRFBToEntity
(single `$RFB` FlatBuffer, size-prefixed `$RFB` stream, RFB JSON, arrays).
Exists so consumers never have to reach for the FlatBuffers reader
themselves: emitter pickers and band filters read records long before any
of them is bound to an entity.
| Name | Type | Description |
|---|---|---|
payload |
Array.<object> | Uint8Array | ArrayBuffer | string | RFB payload. |
Returns:
Normalized RFB metadata records.
Example:
const bytes = new Uint8Array(await (await fetch(streamUrl)).arrayBuffer());
const sBand = loader.parseRFBRecords(bytes).filter((r) => r.BAND === "S");
Query entity IDs by name/id across the full target collection.
| Name | Type | Default | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
query |
string | Text query. | |||||||
maxCount |
number |
100
|
optional Max ids to return. | ||||||
options |
object |
optional
Query options.
|
Returns:
Matching ids.
Execute an arbitrary shared SQL query and extract unique entity ids from the
projected `entity_id`/`ENTITY_ID` column.
| Name | Type | Default | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
sql |
string | SQL query text. | |||||||
maxCount |
number |
100
|
optional Max ids to return. | ||||||
options |
object |
optional
Query options.
|
Returns:
Matching entity ids.
Query entity rows by name/id across the full target collection.
| Name | Type | Default | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
query |
string | Text query. | |||||||
maxCount |
number |
100
|
optional Max rows to return. | ||||||
options |
object |
optional
Query options.
|
Returns:
Matching rows.
Execute an arbitrary shared SQL query against the target collection's
FlatSQL-backed entity metadata table.
| Name | Type | Default | Description | ||||||
|---|---|---|---|---|---|---|---|---|---|
sql |
string | SQL query text. | |||||||
maxRows |
number |
1000
|
optional Max rows to materialize. | ||||||
options |
object |
optional
Query options.
|
Returns:
Query rows.
queryVisibilityMaskByName(query, options) → EntityCollection.VisibilityMaskResult
Build a visibility mask by name/id across the full target collection.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
query |
string | Text query. | ||||||
options |
object |
optional
Query options.
|
Returns:
Visibility result.
queryVisibilityMaskBySql(sql, options) → EntityCollection.VisibilityMaskResult
Execute an arbitrary shared SQL query and build a visibility mask from the
projected `entity_id`/`ENTITY_ID` column.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
sql |
string | SQL query text. | ||||||
options |
object |
optional
Query options.
|
Returns:
Visibility result.
Register the target collection as a shared standards-query consumer.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Consumer options.
|
Returns:
Stable consumer handle.
Set association key strategy for one entity type.
| Name | Type | Description |
|---|---|---|
entityType |
string | Entity type name. |
strategy |
function | Object.<string, function()> | Association strategy function or per-schema map. |
Set one schema mutation-key strategy.
| Name | Type | Description |
|---|---|---|
schema |
string | Standards schema. |
strategy |
function | Record-identity strategy. |
Set one schema → entity-type mapping.
| Name | Type | Description |
|---|---|---|
schema |
string | Standards schema. |
entityType |
string | Entity type name. |
Replace schema → entity-type map used for association lookup routing.
| Name | Type | Description |
|---|---|---|
schemaEntityTypeMap |
Object.<string, string> | Mapping object. |
Set one framed stream adapter.
| Name | Type | Description |
|---|---|---|
fileId |
string | FlatBuffer file ID token (for example "$OEM"). |
adapter |
function | null | Adapter function, or null to remove mapping. |
Merge framed stream adapter mappings.
| Name | Type | Description |
|---|---|---|
streamFrameAdapterMap |
Object.<string, function()> | Mapping from file ID (for example "$OMM") to adapter function. |
Set one framed stream policy.
| Name | Type | Description |
|---|---|---|
fileId |
string | FlatBuffer file ID token. |
policy |
Object | boolean | null | Policy object/boolean, or null to remove mapping. |
Merge framed stream policy mappings.
| Name | Type | Description |
|---|---|---|
streamFramePolicyMap |
Object.<string, (Object|boolean)> | Mapping from file ID to policy. |
Unregister the target collection from shared standards-query updates.
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Consumer options.
|
Returns:
True when a registered consumer was removed.