Unified standards ingestion into an EntityCollection.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
Loader options.
|
Members
Default per-schema ID extraction.
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`, or `OCM`). |
record |
object | Uint8Array | ArrayBuffer | string | Standards record payload. |
options |
object | optional Attachment options. |
Returns:
Attachment summary.
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.
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 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 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.
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.