class %ZEN.Auxiliary.dataSet
extends %ZEN.Component.object
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.
property clientData
as %ZEN.Datatype.list(XMLPROJECTION="NONE",ZENSETTING=0);
Array of serialized data values going to and coming from the client.
property clientLabels
as %ZEN.Datatype.list(XMLPROJECTION="NONE",ZENSETTING=0);
Array of serialized label values going to and coming from the client.
property clientSize
as %ZEN.Datatype.list(XMLPROJECTION="NONE",ZENSETTING=0);
Array of serialized dimension size values going to and coming from the client.
property dimensions
as %ZEN.Datatype.integer(MAXVAL=3,MINVAL=0,XMLPROJECTION="NONE") [ InitialExpression = 0 ];
Number of dimensions within the dataSet.
method %Clear()
Delete data currently in the dataSet.
method %GetArray(Output pArray)
Copy the contents of this dataSet into a local
array.
method %GetDimSize(dim As %Integer = 1)
as %Integer
Return current size of a dimension.
method %GetDimensions()
as %Integer
Get the number of dimensions within the dataSet.
method %GetLabel(n As %Integer = 1, dim As %Integer = 1)
as %String
Get the value of a label at position n
in dimension dim within the dataSet.
method %GetValue(d1 As %Integer = 1, d2 As %Integer = 1, d3 As %Integer = 1)
as %String
Get the value of a cell within the dataSet.
method %OnDrawObjectProperties()
as %Status
Called just before we serve property values to the client.
method %OnObjectSynch()
as %Status
Make sure client data is prepared.
method %OnZENDeserialize()
as %Status
Deserialize additional values from the client.
method %Print()
Print out contents of this dataSet to the current device.
method %SerializeData(pDelim As %String = $C(5))
as %Status
Convert internal arrays to a serialized strings for use on the client.
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.
method %SetDimensions(dims As %Integer)
Set the number of dimensions within the dataSet.
Changing the number of dimensions deletes the contents of the
dataSet.
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.
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.
method clear()
[ Language = javascript ]
Clear contents of this dataSet.
method getData(d1, d2, d3)
[ Language = javascript ]
Return the data contained in the specified location.
Location is 0-based;
method getDimSize(dim)
[ Language = javascript ]
Return the number of items in the specified dimension
(dim is 1,2, or 3).
method getDimensions()
[ Language = javascript ]
Return the number of dimensions in the dataSet.
method getLabel(n, dim)
[ Language = javascript ]
Get the label at position n (0-based) in the given
dimension (1,2, or 3).
method 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.
method redim(dims, sz1, sz2, sz3)
[ Language = javascript ]
Update size of dataSet to new dimensions and size.
method remove(dim, index)
[ Language = javascript ]
Remove a "slice" from the dataSet within
the specified dimension at position index (0-based).
method setData(value, d1, d2, d3)
[ Language = javascript ]
Set the data contained in the specified location.
Location is 0-based;
method 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).
method 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.