API Docs for:
Show:

Data Class

Defined in: src/core/data.js:9
Module: core
Parent Module: multigraph

Constructor

Data

(
  • columns
)

Defined in src/core/data.js:9

Parameters:

  • columns DataVariable

Item Index

Methods

Methods

find

(
  • attrName
  • attrValue
  • columns
)
Integer private static

Defined in src/core/data.js:20

Searches through a jermaine attr_list of DataVariables (columns) for an entry having a given id or column number.

Parameters:

  • attrName String

    The name of the attribute to search on; should be either "id" or "column".

  • attrValue String | Integer

    The value to search for. If attrName is "id", this value should be a string. If attrName is "column", this value should be an int.

  • columns DataVariable Attr_List

    The attr_list to search through.

Returns:

Integer:

The index (an int) of the DataVariable entry having the given attribute value, if any, or -1 if none was found

Example:

find("id", "x", columns)

    finds the index of the DataVariable in the columns attr_list
    having an id of "x"

find("column", 1, columns)

    finds the index of the DataVariable in the columns attr_list
    having a "column" attribute of 1

init

()

Defined in src/core/data.js:84

Initialization function --- should be called from isBuiltWith initializer. This is split off into a separate function so that it can be called from submodel's isBuiltWith initializers as well, since Jermaine does not provide a way to call the parent models' isBuiltWith initializer function.

initializeColumns

()

Defined in src/core/data.js:61

Set the data attribute of each of this data object's columns to point to the data object itself.