Mobile API Reference  MicroStrategy 2019
MSIModelData Class Reference

#import <MSIModelData.h>

Inheritance diagram for MSIModelData:
<ModelDataProtocol> <MSTRHandler>

Instance Methods

(id) - initWithIterator:
 
(id) - initWithIterator:withSliceCountOnRow:andSliceCountOnCol:
 
(NSDictionary *) - getVisualizationProperties
 
(MSIMetricValue *) - allocMetricValueAtRow:atColumn:
 
(MSIHeaderValue *) - allocHeaderValueByAxisType:andRowIndex:andColumnIndex:
 
(NSMutableArray *) - arrayWithHeaderValueOfWholeRowByAxisType:andRowIndex:
 
(BOOL- isSubtotalCell:
 
(BOOL- isSubtotalRowWithAxisType:andRowIndex:
 
(MSIHeader *) - headerObjectByAxisType:andColumnIndex:
 
(NSInteger) - indexOfHeaderObject:
 
(NSInteger) - colAxisIndexOfHeaderObject:
 
(NSInteger) - rowCount
 
(NSInteger) - columnCount
 
(NSInteger) - metricColumnCount
 
(NSInteger) - metricCount
 
(NSInteger) - rowAxisHeaderCount
 
(NSInteger) - rowAxisTemplateUnitCount
 
(NSInteger) - colAxisHeaderCount
 
(NSInteger) - colAxisTemplateUnitCount
 
(BOOL- isMetricInRowAxis
 
(BOOL- isTransactionEnabled
 
(BOOL- rowMarkedForTransactions
 
(BOOL- isEditableWithAxisType:RowIndex:columnIndex:
 
(NSString *) - formatMetricValue:withMetricIndex:
 
(NSArray *) - getThresholdsByMetricIndex:thresholdsSemanticType:
 
(ThresholdSliderData *) - getThresholdInfo:defaultIndex:threshold:
 
(ThresholdSliderData *) - getThresholdInfo:defaultIndex:threshold:withIgnoreTotal:
 
(MSIHeader *) - headerObject:
 
(MSIDisplayInfo *) - objectByID:
 
(BOOL- isElementEqualWithAxisType:AtRow:andColumn:withElement:
 
(MSIHeaderValue *) - getFirstHeaderElement:
 
(NSString *) - getDisplayStringWithAxisType:AtRow:columnDepth:withDelimiter:
 
(NSString *) - getEntireColDisplayStringAtColumn:withDelimiter:
 
(void) - resetIterator:
 
(BOOL- isSubtotalCellWithAxisType:withOrdinal:withDepth:
 
(MSIHeaderValue *) - allocHeaderValueAtRow:atColumn:
 
(void) - clearCachedData
 
(void) - updateDataElementInCacheAtAxisType:andRowIndex:andColumnIndex:
 
(void *) - getDropZoneSet
 
(NSString *) - getAttributeElementID:withOrdinal:withDepth:
 
- Instance Methods inherited from <ModelDataProtocol>
(NSString *) - getRowDisplayHTMLStringAtRow:columnTitleIndex:withDelimiter:
 
(NSString *) - getRowDisplayStringAtRow:columnTitleIndex:withDelimiter:
 
(NSString *) - getColDisplayStringAtColumn:rowTitleIndex:withDelimiter:
 
(NSString *) - getRowTitleDisplayString:
 
(NSString *) - getColTitleDisplayString:
 
(MSIHeader *) - getHeader:
 
- Instance Methods inherited from <MSTRHandler>
(void) - doStartElement:namespaceURI:attributes:level:support:
 
(void) - doEndElement:namespaceURI:level:support:
 

Properties

BOOL isFormatInfoShared
 
NSMutableArray * rowHeaderArray
 
NSMutableArray * rowTemplateUnitArray
 
NSMutableArray * colHeaderArray
 
NSMutableArray * colTemplateUnitArray
 
NSMutableArray * metricHeaderArray
 
NSMutableArray * arrayWithRowOffset
 
NSMutableArray * arrayWithColOffset
 
NSMutableArray * arrayWithRowOffsetForUnit
 
NSMutableArray * arrayWithColOffsetForUnit
 

Method Documentation

◆ allocHeaderValueAtRow:atColumn:()

- (MSIHeaderValue*) allocHeaderValueAtRow: (NSInteger)  rowIndex
atColumn: (NSInteger)  colIndex 

◆ allocHeaderValueByAxisType:andRowIndex:andColumnIndex:()

- (MSIHeaderValue*) allocHeaderValueByAxisType: (AxisType type
andRowIndex: (NSInteger)  row
andColumnIndex: (NSInteger)  col 

Return the headerValue at given location. MSIMetricValue is subclass of headerValue : AxisType has two types: row_axis and col_axis : row is 0-based : 0 1 2 3 : col (0-based) RegionID DESC Profit Revenue

Returns
: headerValue should be released by users : if AxisType is row_axis, loacation is based on row_axis range, row from top to bottom, col from left to right if AxisType is col_axis, loacation is based on col_axis range, row from left to right, col from top to bottom

◆ allocMetricValueAtRow:atColumn:()

- (MSIMetricValue*) allocMetricValueAtRow: (NSInteger)  rowIndex
atColumn: (NSInteger)  colIndex 

◆ arrayWithHeaderValueOfWholeRowByAxisType:andRowIndex:()

- (NSMutableArray*) arrayWithHeaderValueOfWholeRowByAxisType: (AxisType iAxis
andRowIndex: (NSInteger)  row 
Returns
: an array with headValue and metricValue of whole row

◆ clearCachedData()

- (void) clearCachedData

clear all cached data.

◆ colAxisHeaderCount()

- (NSInteger) colAxisHeaderCount

the header num in column axis

◆ colAxisIndexOfHeaderObject:()

- (NSInteger) colAxisIndexOfHeaderObject: (MSIHeader *)  headerObject

@ return: index of the given header object in column axis , NSNotFound if not found

◆ colAxisTemplateUnitCount()

- (NSInteger) colAxisTemplateUnitCount

TemplateUnits count in column axis, won't be affected by attribute form

◆ columnCount()

- (NSInteger) columnCount

Total number of cells in a row of row axis

◆ formatMetricValue:withMetricIndex:()

- (NSString*) formatMetricValue: (double)  iValue
withMetricIndex: (int)  iIndex 

: a double value you want to format : the metric index fromat according to, 0-based, if two metric exits on the dataset, the value can be 0 or 1

Returns
: he formatted metric value for the given double value with the given metric index without applying the threshold defined on it

◆ getAttributeElementID:withOrdinal:withDepth:()

- (NSString*) getAttributeElementID: (AxisType type
withOrdinal: (NSInteger)  rowIndex
withDepth: (NSInteger)  titleIndex 

◆ getDisplayStringWithAxisType:AtRow:columnDepth:withDelimiter:()

- (NSString*) getDisplayStringWithAxisType: (AxisType type
AtRow: (NSInteger)  rowIndex
columnDepth: (NSInteger)  depth
withDelimiter: (NSString *)  delimeter 

1 : (AxisType)type 2 : (NSInteger)rowIndex 3 : (NSInteger)depth, not colIndex, depth can be converted from colIndex using [widgetHelper getDepthByAxisType:(AxisType)type andColIndex:(int)col] 4 : (NSString*)delimeter, delimeter you want to insert into this string

Returns
: connection of headerValue, seperated by delimeter, loacated by given rowIndex and depth..

◆ getDropZoneSet()

- (void*) getDropZoneSet

◆ getEntireColDisplayStringAtColumn:withDelimiter:()

- (NSString*) getEntireColDisplayStringAtColumn: (NSInteger)  colIndex
withDelimiter: (NSString *)  delimeter 
Returns
: connection of headerValue in oneColumn, seperated by delimeter.

Reimplemented from <ModelDataProtocol>.

◆ getFirstHeaderElement:()

- (MSIHeaderValue *) getFirstHeaderElement: (MSIHeader *)  iHeader
Returns
: first MSIHeader Element

◆ getThresholdInfo:defaultIndex:threshold:()

- (ThresholdSliderData*) getThresholdInfo: (NSString *)  iMetricID
defaultIndex: (int)  index
threshold: (BOOL *)  oHasThresholdInfo 

◆ getThresholdInfo:defaultIndex:threshold:withIgnoreTotal:()

- (ThresholdSliderData*) getThresholdInfo: (NSString *)  iMetricID
defaultIndex: (int)  index
threshold: (BOOL *)  oHasThresholdInfo
withIgnoreTotal: (BOOL ignoreTotal 

◆ getThresholdsByMetricIndex:thresholdsSemanticType:()

- (NSArray*) getThresholdsByMetricIndex: (int)  index
thresholdsSemanticType: (BaseFormSemanticType SemanticType 

: cell's row index : cell's col index, 0-based

Returns
: the formatted metric value for the given index and column info without applying the threshold defined on it,colIndex count from the first metricColumn, return nil if the position is not metric value

◆ getVisualizationProperties()

- (NSDictionary *) getVisualizationProperties
Returns
: the widget property dictionary

◆ headerObject:()

- (MSIHeader*) headerObject: (MSIDisplayInfo *)  object

: any displayInfo like attributeForm, metric

Returns
: the header object matches the display info object. : The input MSIDisplayInfo* object is of type MSIMetric* or MSIAttributeForm*. If the input is of type MSIAttribute*, then this method returns a MSIHeader* corresponding to the first encountered MSIAttributeForm*, so it does not make much sense.

◆ headerObjectByAxisType:andColumnIndex:()

- (MSIHeader*) headerObjectByAxisType: (AxisType type
andColumnIndex: (NSInteger)  col 
Returns
: header object at given AxisType and col index.

◆ indexOfHeaderObject:()

- (NSInteger) indexOfHeaderObject: (MSIHeader *)  headerObject

@ return: index of the given header object in row axis , NSNotFound if not found

◆ initWithIterator:()

- (id) initWithIterator: (void *)  ipIterator
Returns
: an array with headValue and metricValue of whole row

◆ initWithIterator:withSliceCountOnRow:andSliceCountOnCol:()

- (id) initWithIterator: (void *)  ipIterator
withSliceCountOnRow: (int)  sliceCountOnRow
andSliceCountOnCol: (int)  sliceCountOnCol 

◆ isEditableWithAxisType:RowIndex:columnIndex:()

- (BOOL) isEditableWithAxisType: (AxisType AxisType
RowIndex: (NSInteger)  rowIndex
columnIndex: (NSInteger)  columnIndex 
Returns
: YES if the cell at rowIndex and columnIndex is editable for transactions, otherwise NO.

◆ isElementEqualWithAxisType:AtRow:andColumn:withElement:()

- (BOOL) isElementEqualWithAxisType: (int)  iAxisType
AtRow: (NSInteger)  rowIndex
andColumn: (NSInteger)  colIndex
withElement: (void *)  element 
Parameters
3: element is acturally an DSSBaseElementProxy pointer
Returns
: YES in case the given element is equal to the element in the dataset indicated by parameter 1,2,3

◆ isMetricInRowAxis()

- (BOOL) isMetricInRowAxis

Is there metric in row axis

Returns
YES means there is

◆ isSubtotalCell:()

- (BOOL) isSubtotalCell: (MSIHeaderValue *)  headerValue
Returns
YES if headerValue is subtotal;

◆ isSubtotalCellWithAxisType:withOrdinal:withDepth:()

- (BOOL) isSubtotalCellWithAxisType: (AxisType iAxisType
withOrdinal: (int)  iOrdinal
withDepth: (int)  iDepth 

Quick API to detect subtotal cell. 1: (AxisType)type 2: cell ordinal 3: cell depth

◆ isSubtotalRowWithAxisType:andRowIndex:()

- (BOOL) isSubtotalRowWithAxisType: (AxisType type
andRowIndex: (NSInteger)  row 
Returns
YES if this row represents a subtotal row

◆ isTransactionEnabled()

- (BOOL) isTransactionEnabled
Returns
: YES if the underlying grid can be marked for transactions, otherwise NO.

◆ metricColumnCount()

- (NSInteger) metricColumnCount

Total number of metric cell in a row of row axis if no attribute in column axis Total number of metric cell in a row of row axis if has attribute in column axis and metric in column axis Total number of cell in a column of column axis if metric in row axis.

◆ metricCount()

- (NSInteger) metricCount

metric count

◆ objectByID:()

- (MSIDisplayInfo*) objectByID: (NSString *)  objID
Returns
: the display info by object id. MSIHeaderValue and metric are all subclass of disPlayInfo : MSIHeaderValue and metric are all subclass of disPlayInfo

◆ resetIterator:()

- (void) resetIterator: (void *)  iterator

For Graph Matrix, updating slice iterator 1 : Slice iterator

◆ rowAxisHeaderCount()

- (NSInteger) rowAxisHeaderCount

the header num in row axis , do not include metric header

◆ rowAxisTemplateUnitCount()

- (NSInteger) rowAxisTemplateUnitCount

TemplateUnits count in row axis, won't be affected by attribute form

◆ rowCount()

- (NSInteger) rowCount

Total number of rows in row axis

◆ rowMarkedForTransactions()

- (BOOL) rowMarkedForTransactions
Returns
: YES if the row can be marked for transactions, otherwise NO.

◆ updateDataElementInCacheAtAxisType:andRowIndex:andColumnIndex:()

- (void) updateDataElementInCacheAtAxisType: (AxisType type
andRowIndex: (NSInteger)  row
andColumnIndex: (NSInteger)  col 

update specified cache value.

Property Documentation

◆ arrayWithColOffset

- (NSMutableArray*) arrayWithColOffset
readnonatomicassign

◆ arrayWithColOffsetForUnit

- (NSMutableArray*) arrayWithColOffsetForUnit
readnonatomicassign

◆ arrayWithRowOffset

- (NSMutableArray*) arrayWithRowOffset
readnonatomicassign

◆ arrayWithRowOffsetForUnit

- (NSMutableArray*) arrayWithRowOffsetForUnit
readnonatomicassign

◆ colHeaderArray

- (NSMutableArray*) colHeaderArray
readnonatomicassign

◆ colTemplateUnitArray

- (NSMutableArray*) colTemplateUnitArray
readnonatomicassign

◆ isFormatInfoShared

- (BOOL) isFormatInfoShared
readwritenonatomicassign

◆ metricHeaderArray

- (NSMutableArray*) metricHeaderArray
readnonatomicassign

◆ rowHeaderArray

- (NSMutableArray*) rowHeaderArray
readnonatomicassign

◆ rowTemplateUnitArray

- (NSMutableArray*) rowTemplateUnitArray
readnonatomicassign