lib/Map/TableStructure.js
function(name, options) {
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  DisplayVariablesConcept.call(this, name, {
    getColorCallback: options.getColorCallback,
    requireSomeActive: defaultValue(options.requireSomeActive, false)
  });

  this.displayVariableTypes = defaultValue(
    options.displayVariableTypes,
    defaultDisplayVariableTypes
  );
  this.shaveSeconds = defaultValue(options.shaveSeconds, defaultShaveSeconds);
  this.finalEndJulianDate = options.finalEndJulianDate;
  this.unallowedTypes = options.unallowedTypes;
  this.initialTimeSource = options.initialTimeSource;
  this.displayDuration = options.displayDuration;
  this.replaceWithNullValues = options.replaceWithNullValues;
  this.replaceWithZeroValues = options.replaceWithZeroValues;
  this.columnOptions = options.columnOptions;
  this.sourceFeature = options.sourceFeature;
  this.idColumnNames = options.idColumnNames; // Actually names, ids or indexes.
  this.isSampled = options.isSampled;

  /**
   * Gets or sets the active time column name, id or index.
   * If you pass an array of two such, eg. [0, 1], treats these as the start and end date column identifiers.
   * @type {String|Number|String[]|Number[]|undefined}
   */
  this._activeTimeColumnNameIdOrIndex = undefined;

  // Track sourceFeature as it is shown on the NowViewing panel.
  // Track items so that charts can update live. (Already done by DisplayVariableConcept.)
  knockout.track(this, ["sourceFeature", "_activeTimeColumnNameIdOrIndex"]);

  /**
   * Gets the columnsByType for this structure,
   * an object whose keys are VarTypes, and whose values are arrays of TableColumn with matching type.
   * Only existing types are present (eg. columnsByType[VarType.ALT] may be undefined).
   * @memberOf TableStructure.prototype
   * @type {Object}
   */
  knockout.defineProperty(this, "columnsByType", {
    get: function() {
      return getColumnsByType(this.items);
    }
  });
}
function(name, options) {
  options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  DisplayVariablesConcept.call(this, name, {
    getColorCallback: options.getColorCallback,
    requireSomeActive: defaultValue(options.requireSomeActive, false)
  });

  this.displayVariableTypes = defaultValue(
    options.displayVariableTypes,
    defaultDisplayVariableTypes
  );
  this.shaveSeconds = defaultValue(options.shaveSeconds, defaultShaveSeconds);
  this.finalEndJulianDate = options.finalEndJulianDate;
  this.unallowedTypes = options.unallowedTypes;
  this.initialTimeSource = options.initialTimeSource;
  this.displayDuration = options.displayDuration;
  this.replaceWithNullValues = options.replaceWithNullValues;
  this.replaceWithZeroValues = options.replaceWithZeroValues;
  this.columnOptions = options.columnOptions;
  this.sourceFeature = options.sourceFeature;
  this.idColumnNames = options.idColumnNames; // Actually names, ids or indexes.
  this.isSampled = options.isSampled;

  /**
   * Gets or sets the active time column name, id or index.
   * If you pass an array of two such, eg. [0, 1], treats these as the start and end date column identifiers.
   * @type {String|Number|String[]|Number[]|undefined}
   */
  this._activeTimeColumnNameIdOrIndex = undefined;

  // Track sourceFeature as it is shown on the NowViewing panel.
  // Track items so that charts can update live. (Already done by DisplayVariableConcept.)
  knockout.track(this, ["sourceFeature", "_activeTimeColumnNameIdOrIndex"]);

  /**
   * Gets the columnsByType for this structure,
   * an object whose keys are VarTypes, and whose values are arrays of TableColumn with matching type.
   * Only existing types are present (eg. columnsByType[VarType.ALT] may be undefined).
   * @memberOf TableStructure.prototype
   * @type {Object}
   */
  knockout.defineProperty(this, "columnsByType", {
    get: function() {
      return getColumnsByType(this.items);
    }
  });
}
function ( name , options ) { options = defaultValue ( options , defaultValue . EMPTY_OBJECT ) ; DisplayVariablesConcept . call ( this , name , { getColorCallback : options . getColorCallback , requireSomeActive : defaultValue ( options . requireSomeActive , false ) } ) ; this . displayVariableTypes = defaultValue ( options . displayVariableTypes , defaultDisplayVariableTypes ) ; this . shaveSeconds = defaultValue ( options . shaveSeconds , defaultShaveSeconds ) ; this . finalEndJulianDate = options . finalEndJulianDate ; this . unallowedTypes = options . unallowedTypes ; this . initialTimeSource = options . initialTimeSource ; this . displayDuration = options . displayDuration ; this . replaceWithNullValues = options . replaceWithNullValues ; this . replaceWithZeroValues = options . replaceWithZeroValues ; this . columnOptions = options . columnOptions ; this . sourceFeature = options . sourceFeature ; this . idColumnNames = options . idColumnNames ; // Actually names, ids or indexes. this . isSampled = options . isSampled ; /**
   * Gets or sets the active time column name, id or index.
   * If you pass an array of two such, eg. [0, 1], treats these as the start and end date column identifiers.
   * @type {String|Number|String[]|Number[]|undefined}
   */ this . _activeTimeColumnNameIdOrIndex = undefined ; // Track sourceFeature as it is shown on the NowViewing panel. // Track items so that charts can update live. (Already done by DisplayVariableConcept.) knockout . track ( this , [ "sourceFeature" , "_activeTimeColumnNameIdOrIndex" ] ) ; /**
   * Gets the columnsByType for this structure,
   * an object whose keys are VarTypes, and whose values are arrays of TableColumn with matching type.
   * Only existing types are present (eg. columnsByType[VarType.ALT] may be undefined).
   * @memberOf TableStructure.prototype
   * @type {Object}
   */ knockout . defineProperty ( this , "columnsByType" , { get : function ( ) { return getColumnsByType ( this . items ) ; } } ) ; }
TableStructure provides an abstraction of a data table, ie. a structure with rows and columns.
Its primary responsibility is to load and parse the data, from csvs or other.
It stores each column as a TableColumn, and saves the rows too if conversion to rows is requested.
Columns are also sorted by type for easier access.

@alias TableStructure
@constructor
@extends {DisplayVariablesConcept}
@param {String} [name] Name to use in the NowViewing tab, defaults to 'Display Variable'.
@param {Object} [options] Options:
@param {Array} [options.displayVariableTypes] Which variable types to show in the NowViewing tab. Defaults to ENUM, SCALAR, and ALT (not LAT, LON or TIME).
@param {VarType[]} [options.unallowedTypes] An array of types which should not be guessed. If not present, all types are allowed. Cannot include VarType.SCALAR.
@param {String} [options.initialTimeSource]  A string specifiying the value of the animation timeline at start. Valid options are:
("present": closest to today's date,
"start": start of time range of animation,
"end": end of time range of animation,
An ISO8601 date e.g. "2015-08-08": specified date or nearest if date is outside range).
@param {Number} [options.displayDuration] Passed on to TableColumn, unless overridden by options.columnOptions.
@param {String[]} [options.replaceWithNullValues] Passed on to TableColumn, unless overridden by options.columnOptions.
@param {String[]} [options.replaceWithZeroValues] Passed on to TableColumn, unless overridden by options.columnOptions.
@param {Object} [options.columnOptions] An object with keys identifying columns (column names or indices),
and per-column properties displayDuration, replaceWithNullValues, replaceWithZeroValues, name, active, units and/or type.
For type, converts strings, which are case-insensitive keys of VarType, to their VarType integer.
@param {Function} [options.getColorCallback] Passed to DisplayVariableConcept.
@param {Entity} [options.sourceFeature] The feature to which this table applies, if any; not used internally by TableStructure or TableColumn.
@param {Array} [options.idColumnNames] An array of column names/indexes/ids which identify unique features across rows
(see CsvCatalogItem.idColumns).
@param {Boolean} [options.isSampled] Does this data correspond to "sampled" data?
See CsvCatalogItem.isSampled for an explanation.
@param {Number} [options.shaveSeconds] How many seconds to shave off each time period so periods do not overlap. Defaults to 1 second.
@param {JulianDate} [options.finalEndJulianDate] If present, use this as the final end date for all points.
@param {Boolean} [options.requireSomeActive=false] Set to true if at least one column must be selected at all times.
TableStructure provides an abstraction of a data table ie . a structure with rows and columns . Its primary responsibility is to load and parse the data from csvs or other . It stores each column as a TableColumn and saves the rows too if conversion to rows is requested . Columns are also sorted by type for easier access .