JSON Model-to-Model Projection (JM2MP) Documentation

JSON Model-to-Model Projection (JM2MP) Documentation

Class

AdapterRegistry

jm2mp/adapters/registry.AdapterRegistry

new AdapterRegistry()

The registry of adapter. It maintains a mapping between names and adapters.

This class is not a singleton. Each instance is independent, which allows for isolated testing and different configurations depending on the evaluation context.

Source

Members

Methods

get(name) → {QueryAdapter}

It gets a previously registered QueryAdapter by its name; otherwise, an AdapterError is raised, informing the list of available adapters' names.

Parameters

  • name string

    The name of the QueryAdapter being searched for.

Returns

Throws

Whenever no QueryAdapter with name were previously registered in this AdapterRegistry instance.

Type
module:jm2mp/errors.AdapterError

Source