Last updated

API / geotoolkit / persistence / DeserializationContext / DeserializationContext

Class: DeserializationContext

persistence.DeserializationContext.DeserializationContext

The deserialization context

Hierarchy

Implements

Table of contents

Constructors
Methods

Contents

Constructors

new DeserializationContext()

new DeserializationContext()

Methods

addReference

Abstract addReference(id, object): void

Register instance of the object

Parameters

Name Type Description
idstringunique id of the object
objectanyinstance of the deserialised class

Returns

void


getCurrentObject

Abstract getCurrentObject(): any

Return the current object on the stack

Returns

any


getObject

Abstract getObject(type?, name?, dest?): any

Get object

Parameters

Name Type Description
Optional typestringtype of the object
Optional namestringname of the property
Optional destany

Returns

any

value


getOptions

Abstract getOptions(): Options

Return deserialization options

Returns

Options

Implementation of

IDeserializationContext.getOptions


getReference

Abstract getReference(id): any

Get object by reference

Parameters

Name Type Description
idstringreference id

Returns

any


getRegistry

Abstract getRegistry(): Registry

Get registry of memento deserializers

Returns

Registry


getValue

Abstract getValue(name?, type?, dest?): any

Get value

Parameters

Name Type Description
Optional namestringname of the property
Optional typestringoptional type
Optional destany

Returns

any

value


popCurrentObject

Abstract popCurrentObject(): any

Pop the current object from the stack

Returns

any


pushCurrentObject

Abstract pushCurrentObject(object): void

Push the current deserialized object. This method can be used if it is necessary to provide the existing object for deserialization

Parameters

Name Type Description
objectanyinstance of the deserialised class

Returns

void


queryChildren

Abstract queryChildren(callback, propertyName?): void

Enumerate each child property

Parameters

Name Type Description
callback(property: string, context: DeserializationContext) => voidfunction called by each object child
Optional propertyNamestringoptional property name

Returns

void


requestObject

Abstract requestObject(id, callback): void

Request object

Parameters

Name Type Description
idstringunique id of the object
callback(value: any) => voidfunction contains parameter object that can be requested

Returns

void