Skip to main content

%ZEN.Auxiliary.dataSet

Class %ZEN.Auxiliary.dataSet Extends %ZEN.Component.object [ Deprecated, System = 3 ]

This class provides a way to assemble data that can be conveniently passed between the web client and the server. A dataSet object can contain 0-dimensional (scalar) data, 1-dimensional (list), 2-dimensional, or 3-dimensional data, as specified by its dimensions property.

Properties

dimensions

Property dimensions As %ZEN.Datatype.integer(MAXVAL = 3, MINVAL = 0, XMLPROJECTION = "NONE") [ InitialExpression = 0 ];

Number of dimensions within the dataSet.

%size

Property %size As %ZEN.Datatype.integer(MINVAL = 1, XMLPROJECTION = "NONE") [ MultiDimensional, Private ];

Size, indexed by dimension number, of each dimension.

%data

Property %data As %ZEN.Datatype.string(XMLPROJECTION = "NONE") [ MultiDimensional, Private ];

Array of data values within the dataSet.

%labels

Property %labels As %ZEN.Datatype.string(XMLPROJECTION = "NONE") [ MultiDimensional, Private ];

Set of captions used as labels along the various dimensions of the dataSet.
The array of labels is indexed by dimension number and position within the dimension.

clientData

Property clientData As %ZEN.Datatype.list(XMLPROJECTION = "NONE", ZENSETTING = 0);

Array of serialized data values going to and coming from the client.

clientLabels

Property clientLabels As %ZEN.Datatype.list(XMLPROJECTION = "NONE", ZENSETTING = 0);

Array of serialized label values going to and coming from the client.

clientSize

Property clientSize As %ZEN.Datatype.list(XMLPROJECTION = "NONE", ZENSETTING = 0);

Array of serialized dimension size values going to and coming from the client.

Methods

%OnNew

Method %OnNew(initvalue As %RawString) As %Status [ Private, ProcedureBlock = 1 ]

%SetDimensions

Method %SetDimensions(dims As %Integer)

Set the number of dimensions within the dataSet. Changing the number of dimensions deletes the contents of the dataSet.

%GetDimensions

Method %GetDimensions() As %Integer [ CodeMode = expression ]

Get the number of dimensions within the dataSet.

%Clear

Method %Clear()

Delete data currently in the dataSet.

%GetLabel

Method %GetLabel(n As %Integer = 1, dim As %Integer = 1) As %String [ CodeMode = expression ]

Get the value of a label at position n in dimension dim within the dataSet.

%GetDimSize

Method %GetDimSize(dim As %Integer = 1) As %Integer [ CodeMode = expression ]

Return current size of a dimension.

%SetLabel

Method %SetLabel(pLabel As %String, n As %Integer = 1, dim As %Integer = 1)

Set the value of a label at position n in dimension dim within the dataSet.

%GetValue

Method %GetValue(d1 As %Integer = 1, d2 As %Integer = 1, d3 As %Integer = 1) As %String [ CodeMode = expression ]

Get the value of a cell within the dataSet.

%SetValue

Method %SetValue(pValue As %String, d1 As %Integer = 1, d2 As %Integer = 1, d3 As %Integer = 1)

Set the value of a cell within the dataSet. Updates dimension size as needed.

%GetArray

Method %GetArray(Output pArray)

Copy the contents of this dataSet into a local array.

%SetArray

Method %SetArray(ByRef pArray, s1 As %Integer = 1, s2 As %Integer = 1, s3 As %Integer = 1)

Set the contents of this dataSet from a local array. The local array must have the same dimensionality as the dataSet and must have the correct number and type of subscripts.
The caller is also responsible for supplying the sizes of each dimension.

%Print

Method %Print()

Print out contents of this dataSet to the current device.

%OnObjectSynch

Method %OnObjectSynch() As %Status

Make sure client data is prepared.

%OnZENDeserialize

Method %OnZENDeserialize() As %Status

Deserialize additional values from the client.

%OnDrawObjectProperties

Method %OnDrawObjectProperties() As %Status

Called just before we serve property values to the client.

%SerializeData

Method %SerializeData(pDelim As %String = {$C(5)}) As %Status

Convert internal arrays to a serialized strings for use on the client.

clear

ClientMethod clear() [ Language = javascript ]

Clear contents of this dataSet.

redim

ClientMethod redim(dims, sz1, sz2, sz3) [ Language = javascript ]

Update size of dataSet to new dimensions and size.

swap

ClientMethod swap(dim, item1, item2, labels) [ Language = javascript ]

Swap the contents of 2 "slices" of the dataSet within the specified dimension.
For example, swap the contents of 2 rows within a 2D dataSet. If labels is true, then swap labels as well.

insert

ClientMethod insert(dim, index) [ Language = javascript ]

Insert a new "slice" into the dataSet within the specified dimension just before item index (0-based).
If index is -1, then insert at the end.

remove

ClientMethod remove(dim, index) [ Language = javascript ]

Remove a "slice" from the dataSet within the specified dimension at position index (0-based).

getDimensions

ClientMethod getDimensions() [ Language = javascript ]

Return the number of dimensions in the dataSet.

getDimSize

ClientMethod getDimSize(dim) [ Language = javascript ]

Return the number of items in the specified dimension (dim is 1,2, or 3).

getLabel

ClientMethod getLabel(n, dim) [ Language = javascript ]

Get the label at position n (0-based) in the given dimension (1,2, or 3).

getData

ClientMethod getData(d1, d2, d3) [ Language = javascript ]

Return the data contained in the specified location. Location is 0-based;

setLabel

ClientMethod setLabel(label, n, dim) [ Language = javascript ]

Set the value of the label at position n (0-based) in the given dimension (1,2, or 3).

setData

ClientMethod setData(value, d1, d2, d3) [ Language = javascript ]

Set the data contained in the specified location. Location is 0-based;