Classes
Methods
# get(key, defaultValueopt) → {*}
Retrieves a top-level member of the internal #_data object by key.
Common keys include: "info", "properties", "geometry", etc.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string
|
The name of the member to retrieve. |
||
defaultValue |
*
|
<optional> |
{} | Value returned if the key does not exist. |
The value of the specified member, or the defaultValue if missing.
*
# getAsJson() → {object}
Get object as JSON in COLNEO Generic Object Model format (cnGOM).
Object as JSON in GOM format (Generic Object Model)
object
# getId() → {string|null}
Get ID
- Since:
- 1.0, 09.2025, jh
Object ID, null if object is empty
string
|
null
# getPropertyValue(typeid, defaultValueopt) → {*}
Retrieves the value of a property from the internal json object.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
typeid |
string
|
The property key to retrieve. |
||
defaultValue |
*
|
<optional> |
null | A fallback value returned if the property does not exist. |
The property value if found, otherwise the defaultValue.
*
# getShortId() → {string|null}
Retrieves the short object ID from the internal json object.
- Since:
- 1.0, 09.2025, jh
The short ID if available, otherwise null.
string
|
null
# setFromJson(obj_as_data)
Set object from JSON in COLNEO Generic Object Model (GOM) format.
Parameters:
Name | Type | Description |
---|---|---|
obj_as_data |
object
|