API / geotoolkit / persistence / SerializationContext / SerializationContext
persistence.SerializationContext.SerializationContext
The serialization context
SerializationContext
Constructors
Methods
Methods
▸ Abstract addObject(name, object, type?): SerializationContext
Adds child element with the specified name and optional type to the current context. Unlike "setObject", this method creates a child node to store the object.
| Name | Type | Description |
|---|---|---|
name | string | number | unique property name |
object | any | object to be serialized |
Optional type | string | the optional serialization type |
▸ Abstract addReference(object): string | number
Add reference to the object
| Name | Type | Description |
|---|---|---|
object | any | object to get reference |
string | number
id of the reference
▸ Abstract addValue(name, value): void
Adds the specified value with name "name" to the current context
| Name | Type | Description |
|---|---|---|
name | string | unique property name |
value | any | object value |
void
▸ Abstract commit(): void
Commit changes
void
▸ Abstract createChild(name, type?): SerializationContext
Create child element in the current context
| Name | Type | Description |
|---|---|---|
name | string | unique property name |
Optional type | string | type of the object |
▸ Abstract getOptions(): Options
Return serialization options
ISerializationContext.getOptions
▸ Abstract getReferenceId(object): string | number
Get reference id for the specified object. Null as return value means that the object was not saved before
| Name | Type | Description |
|---|---|---|
object | any | object value |
string | number
reference id or null if not found
▸ Abstract getRegistry(): Registry
Get registry of memento serializers
▸ Abstract setObject(value, type?): SerializationContext
Sets object to the current context (no child nodes for the object will be created in current context)
| Name | Type | Description |
|---|---|---|
value | any | object value |
Optional type | string | the optional serialization type |
▸ Abstract setValue(value): SerializationContext
Sets value to the current context (no child nodes for the value will be created in current context)
| Name | Type | Description |
|---|---|---|
value | any | object value |