Class: Namespace

Namespace(spaceName)

new Namespace(spaceName)

Map-like storage for components belonging to one Heta namespace.

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 for abstract namespaces.

Extends

  • Map

Members

isAbstract

true if namespace is abstract, false if concrete.

spaceName

Identifier of a namespace.

Methods

checkCircRecord(scope, includeCompartmentDep) → {void}

Checks circular assignments for a context and writes errors to the container logger.

Parameters:
Name Type Default Description
scope string

Assignment context.

includeCompartmentDep boolean false

Include species compartment dependencies.

Returns:
Type
void

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>}

Selects unique SBML units used by size-like components in this namespace.

Returns:

Array of units.

Type
Array.<Unit>

knit() → {Namespace}

Binds all components in this namespace.

Returns:

Self.

Type
Namespace

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

Selects components with the exact Heta class name.

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>}

Selects components that inherit from a Heta class.

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>}

Selects records that have an assignment in the requested context.

Parameters:
Name Type Description
context string

Assignment context.

Returns:

Records that have the assignment associated with scope.

Type
Array.<Component>

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

Sorts namespace components by expression dependencies in one assignment context.

Parameters:
Name Type Default Description
context string

Assignment context such as start_ or ode_.

includeCompartmentDep boolean false

Include species compartment dependencies.

Returns:

Components sorted by dependency order.

Type
Array.<Component>

toArray() → {Array.<Component>}

Converts this namespace into an array of components.

Returns:

All components in array format.

Type
Array.<Component>

toFlat(options) → {object}

Converts this namespace to flat Q-object format.

Parameters:
Name Type Description
options object

Reserved for future versions.

Returns:

flat Q-object format.

Type
object

toQ(options) → {object}

Converts this namespace to a setNS Q-object.

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 this namespace into Q-array format.

Parameters:
Name Type Default Description
removeCoreComponents boolean false

Exclude read-only core components when true.

options object

Options passed to Top#toQ.

Returns:

Q-array format.

Type
Array.<object>