Class icm.pgwidget.casevisualizer.core.data.TimelineStore

A data store for timelines. Objects in the data store consist of a dictionary to store object metadata and an list to store data. Objects must have an id. Typically objects are series with the data being a list of events. When data is added to the store also an event is published.
Defined in: <icm\pgwidget\casevisualizer\core\data\TimelineStore.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
add(id)
 
constructor(params)
 
get(id)
Return the object (typically series) with the id [id]
 
 
getEvent(eventId)
gets the event with the specified id
 
getMeta(key)
get some metadata for the timeline itself
 
init()
 
mergeMeta(changes, mergeOnly)
Adds metadata for the timeline itself
 
mergeObjData(id, changes, mergeOnly)
Adds data to a given object.
 
mergeObjMeta(id, changes, mergeOnly)
Adds metadata to a given object.

Constructor Detail

icm.pgwidget.casevisualizer.core.data.TimelineStore(params)

Parameters:
{Object} params
A params object with configuration data

Method Detail

add(id)

Parameters:
id

constructor(params)

Parameters:
params

{Object} get(id)

Return the object (typically series) with the id [id]
Parameters:
{String} id
of object to retrieve.
Returns:
{Object} series object corresponding to [id]

{Array.Object} getAll()

Returns:
{Array.Object} a list of the objects in this store, in order of insertion

{Object} getEvent(eventId)

gets the event with the specified id
Parameters:
{String} eventId
Returns:
{Object} the event (plain javasript object) that has this id.s

{Any} getMeta(key)

get some metadata for the timeline itself
Parameters:
{object} key
metadata key
Returns:
{Any} value

init()


mergeMeta(changes, mergeOnly)

Adds metadata for the timeline itself
Parameters:
{Object} changes
dictionary of metadata to be added
mergeOnly

mergeObjData(id, changes, mergeOnly)

Adds data to a given object. Will not overwrite existing data (keyed by id)
Parameters:
{String} id
id of object which we want to add data to (need not already exist in the store)
{Array} changes
list of data objects to be added. Each data object should have an id property.
mergeOnly

mergeObjMeta(id, changes, mergeOnly)

Adds metadata to a given object. Will overwrite existing metadata
Parameters:
{String} id
id of object which we want to add metadata to (need not already exist in the store)
{Object} changes
Dictionary of metadata changes.
mergeOnly