Class: Namespace

Namespace(spaceName)

new Namespace(spaceName)

Namespace is a Map which stores components.

Parameters:
Name Type Description
spaceName string

Space identifier.

Properties:
Name Type Description
container Container

Parent container.

_spaceName string

String identifier for namespace.

_isAbstract boolean

true if namespace is abstract. false otherwise.

Extends

  • Map

Members

isAbstract

true if namespace is abstract, false if concrete.

spaceName

Identifier of a namespace.

Methods

checkCircRecord(scope, includeCompartmentDep)

Check if there are circular assignments for the scope. Write errors in logger.

Parameters:
Name Type Default Description
scope string

selected assignment scope.

includeCompartmentDep boolean true

To take into account Compartment (for Species only).

getDBSolveImage(targetSpace) → {undefined}

Creates single model image by nesessary components based on space.

Parameters:
Name Type Description
targetSpace string

Model image to update.

Returns:
Type
undefined

getSLVImage(ns) → {undefined}

Creates model image by necessary components based on space.

Parameters:
Name Type Description
ns string

Model image to update.

Returns:
Type
undefined

getUniqueUnits() → {Array.<Unit>}

Select all units mentioned in namespace.

Returns:

Array of units.

Type
Array.<Unit>

knit() → {Namespace}

Sequential checking and binding components.

Returns:

Self.

Type
Namespace

selectByClassName(className) → {Array.<Component>}

Components of the particular class.

Parameters:
Name Type Description
className string

One of available Heta classes: 'Const', 'Record', etc.

Returns:

Array of selected components.

Type
Array.<Component>

selectByInstanceOf(className) → {Array.<Component>}

Components of the class and its inheritors.

Parameters:
Name Type Description
className string

One of available Heta classes: 'Const', 'Record', etc.

Returns:

Array of selected components.

Type
Array.<Component>

selectRecordsByContext(context) → {Array.<Component>}

Select all records which have the scope.

Parameters:
Name Type Description
context string

scope of Record.

Returns:

Records that have the assignment associated with scope.

Type
Array.<Component>

sortExpressionsByContext(context, includeCompartmentDep) → {Array.<Component>}

Select all records from namespace and sort them by the scope.

Parameters:
Name Type Default Description
context string

scope of Record.

includeCompartmentDep boolean true
Returns:

Records in scope order.

Type
Array.<Component>

toArray() → {Array.<Component>}

Converts namespace into array of components.

Returns:

All components in array format.

Type
Array.<Component>

toFlat(options) → {object}

Representation of namespace in flat Q-object format.

Parameters:
Name Type Description
options object

reserved for future versions.

Returns:

flat Q-object format.

Type
object

toQ(options) → {object}

Representation of namespace into Q-object format.

Parameters:
Name Type Description
options object

reserved for future versions.

Returns:

JS object in Q-object format.

Type
object

toQArr(removeCoreComponents, options) → {Array.<object>}

Converts namespace into Q-array.

Parameters:
Name Type Default Description
removeCoreComponents boolean true
options object

Options passed to Top#toQ method

Returns:

Q-array format.

Type
Array.<object>