class %DeepSee.Model.measure
extends %DeepSee.Model.node, %DeepSee.Model.source
Meta-data object that represents a measure within a DeepSee cube.
At query processing time, a measure is treated as if it were a
member of a special dimension called "Measures".
property aggregate
as %DeepSee.Datatype.string(VALUELIST=",COUNT,SUM,MIN,MAX,AVG",XMLPROJECTION="attribute");
Default aggregate function applied to this measure.
If not specified, the default aggregate for numeric measures is SUM and COUNT for
all other types.
relationship cube
as %DeepSee.Model.cube(XMLPROJECTION="none") [ Inverse = measures,Cardinality = one ];
Cube that this measure belongs to.
property formatString
as %DeepSee.Datatype.string(MAXLEN=100,XMLPROJECTION="attribute");
Optional format string to apply to this member.
property hidden
as %Boolean(XMLPROJECTION="attribute") [ InitialExpression = 0 ];
If true, this measure is hidden. That is, it will not be listed among the
cube's members within the various DeepSee utilities.
It can still be used within MDX queries and expressions.
property iKnowDictionaries
as %DeepSee.Datatype.string(XMLPROJECTION="attribute");
If this is an "iKnow" measure, use this property to identify which Term Lists should
be loaded as dictionaries for iKnow to match the iKnow measures text contents against.
This attribute should contain a comma-separated list of existing Term List names.
NOTE: this attribute cannot be used for iKnow-managed domains
property iKnowDomain
as %DeepSee.Datatype.string(XMLPROJECTION="attribute");
If this is an "iKnow" measure and iKnowSource="domain", this attribute indicates
which domain the text corresponding to this fact is stored in.
property iKnowParameters
as %DeepSee.Datatype.string(XMLPROJECTION="attribute");
If this is an "iKnow" measure, this property can be used to supply additional domain
parameters for the corresponding iKnow domain. This should be a semicolon-delimited list
of double-colon-delimited parameter-name / parameter-value pairs.
For example: "DefaultConfig::Spanish;Mat:DefaultProfile::-1" will force this domain
to use the Configuration named "Spanish" and default Matching Profile -1.
NOTE: this attribute cannot be used for iKnow-managed domains
property iKnowSource
as %DeepSee.Datatype.string(VALUELIST=",string,stream,file,domain",XMLPROJECTION="attribute");
If this is an "iKnow" measure, then this indicates the type of the source text for this
measure:
"string" -- source is a string property or expression,
"stream" -- source is a character stream property,
"file" -- source is a string containing a file name.
"domain" -- source is a string containing the external ID of a text already indexed in
a domain identified by the iKnowDomain attribute.
For other measure types, this attribute is ignored.
property scale
as %Integer(MINVAL=0,XMLPROJECTION="attribute");
The scale value (number of digits following the decimal point) used
for numeric measures. If not specified, then the scale of the source property
is used, if possible.
property searchable
as %Boolean(XMLPROJECTION="attribute") [ InitialExpression = 0 ];
If true, this measure can be used to filter results.
Setting this true may result in additional indices being defined for this measure.
property type
as %DeepSee.Datatype.string(VALUELIST=",integer,number,boolean,string,date,age,text,iKnow",XMLPROJECTION="attribute");
This indicates the type of this measure.
The type specifies how this measure is used within MDX processing. The type
can be one of the following:
- "integer" - the measure contains an integer value that can be aggregated
within an MDX query.
If no aggregate is specified, then SUM is used.
- "number" - the measure contains a numeric value that can be aggregated
within an MDX query.
If no aggregate is specified, then SUM is used.
- "boolean" - the measure contains a boolean value that can be aggregated
within an MDX query.
If no aggregate is specified, then COUNT is used (which is equivalent to SUM).
- "date" - the measure contains a date value (in +$H format). The only aggregates that
can be used with a date measure are MIN, MAX, and AVG.
If no aggregate is specified, then MAX is used.
- "age" - the measure contains an age value (in days). The only aggregates that
can be used with an age measure are MIN, MAX, and AVG.
If no aggregate is specified, then AVG is used.
- "string" - the measure contains a string value. The only aggregate that
can be used with a string measure is COUNT.
A string measure can be used as a way to add arbitrary data to a cube's
fact table. String measures are not indexed.
- "text" - similar to a "string" measure, except that it is indexed using a text index.
- "iKnow" - a text value that is processed and indexed using the iKnow Smart Indexing API.
If not specified then the type will match the source property, as best as possible
or be set to "number".
property units
as %DeepSee.Datatype.string(XMLPROJECTION="attribute");
Optional. Units applied to this measure.
This is not currently used.
method %Validate()
as %Status
Test if this measure's definition is valid.
As a side-effect, set the aggregate function if not specified.