Mobile API Reference  MicroStrategy 2019
MSIModelData.h
Go to the documentation of this file.
1 //
2 // ModelData.h
3 // MicroStrategyMobile
4 //
5 // Created by changlei pan on 7/30/12.
6 // Copyright (c) 2012 MicroStrategy Inc. All rights reserved.
7 //
8 
9 #import <Foundation/Foundation.h>
10 #import "DataProviderProtocol.h"
11 #import "Enums.h"
12 #import "MSTRHandler.h"
13 #import "Header.h"
14 
15 
16 typedef enum _DataProviderType{
18 }DPType;
19 
20 @class MSIHeaderValue;
21 @class MSIMetricValue;
22 @class ThresholdSliderData;
23 @class MSIPropertyGroup;
24 @class MSIMetricValue;
25 @class MSIDataElement;
26 @class MSIDisplayInfo;
27 
29 {
30 }
31 @property(nonatomic, assign) NSInteger depth;
32 @end
33 
34 
36 @optional
37 - (NSString*) getRowDisplayHTMLStringAtRow:(NSInteger)rowIndex columnTitleIndex:(NSInteger)titleIndex withDelimiter:(NSString*)delimeter;
38 - (NSString*) getRowDisplayStringAtRow:(NSInteger)rowIndex columnTitleIndex:(NSInteger)titleIndex withDelimiter:(NSString*)delimeter;
39 - (NSString*) getColDisplayStringAtColumn:(NSInteger)colIndex rowTitleIndex:(NSInteger)titleIndex withDelimiter:(NSString*)delimeter;
40 - (NSString*) getEntireColDisplayStringAtColumn:(NSInteger)colIndex withDelimiter:(NSString *)delimeter;
41 - (NSString*) getRowTitleDisplayString:(NSInteger)index;
42 - (NSString*) getColTitleDisplayString:(NSInteger)index;
43 - (MSIHeader*) getHeader:(MSIDataElement*)iDataElement;
44 @end
45 
46 
48 {
49 }
50 
51 @property (nonatomic, assign) BOOL isFormatInfoShared;
52 
53 @property (nonatomic, readonly) NSMutableArray* rowHeaderArray;
54 @property (nonatomic, readonly) NSMutableArray* rowTemplateUnitArray;
55 @property (nonatomic, readonly) NSMutableArray* colHeaderArray;
56 @property (nonatomic, readonly) NSMutableArray* colTemplateUnitArray;
57 @property (nonatomic, readonly) NSMutableArray* metricHeaderArray;
58 @property (nonatomic, readonly) NSMutableArray* arrayWithRowOffset;
59 @property (nonatomic, readonly) NSMutableArray* arrayWithColOffset;
60 @property (nonatomic, readonly) NSMutableArray* arrayWithRowOffsetForUnit;
61 @property (nonatomic, readonly) NSMutableArray* arrayWithColOffsetForUnit;
62 
63 
64 
68 - (id)initWithIterator:(void*)ipIterator;
69 - (id)initWithIterator:(void *)ipIterator withSliceCountOnRow:(int)sliceCountOnRow andSliceCountOnCol:(int)sliceCountOnCol;
70 
74 -(NSDictionary *) getVisualizationProperties;
75 - (MSIMetricValue*) allocMetricValueAtRow:(NSInteger)rowIndex atColumn:(NSInteger)colIndex;
76 
88 - (MSIHeaderValue*) allocHeaderValueByAxisType:(AxisType)type andRowIndex:(NSInteger)row andColumnIndex:(NSInteger)col;
89 
93 - (NSMutableArray*)arrayWithHeaderValueOfWholeRowByAxisType:(AxisType)iAxis andRowIndex:(NSInteger)row;
94 
98 - (BOOL) isSubtotalCell:(MSIHeaderValue*)headerValue;
99 
103 - (BOOL) isSubtotalRowWithAxisType:(AxisType)type andRowIndex:(NSInteger)row;
104 
108 - (MSIHeader*) headerObjectByAxisType:(AxisType)type andColumnIndex:(NSInteger)col;
109 //- (Header*) headerObjectByIndex:(NSInteger)colIndex;
110 //- (Header*) headerObjectByColAxisIndex:(NSInteger)colIndex;
111 
115 - (NSInteger)indexOfHeaderObject:(MSIHeader *)headerObject;
116 
120 - (NSInteger)colAxisIndexOfHeaderObject:(MSIHeader *)headerObject;
121 
122 
126 - (NSInteger)rowCount;
127 
131 - (NSInteger)columnCount;
132 
138 - (NSInteger)metricColumnCount;
139 
143 - (NSInteger)metricCount;
144 
148 - (NSInteger) rowAxisHeaderCount;
149 
153 - (NSInteger) rowAxisTemplateUnitCount;
154 
158 - (NSInteger) colAxisHeaderCount;
159 
163 - (NSInteger) colAxisTemplateUnitCount;
164 
169 - (BOOL)isMetricInRowAxis;
170 
174 - (BOOL) isTransactionEnabled;
175 
179 - (BOOL) rowMarkedForTransactions;
180 
181 
185 - (BOOL) isEditableWithAxisType:(AxisType)AxisType RowIndex:(NSInteger)rowIndex columnIndex:(NSInteger)columnIndex;
186 
187 
188 
189 
195 - (NSString*) formatMetricValue:(double)iValue withMetricIndex:(int)iIndex;
196 
203 // 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
204 //- (NSString*) formatRawMetricValueAtRowIndex:(NSInteger)row atColIndex:(NSInteger)col;
205 - (NSArray*)getThresholdsByMetricIndex:(int)index thresholdsSemanticType:(BaseFormSemanticType)SemanticType;
206 - (ThresholdSliderData*) getThresholdInfo:(NSString*)iMetricID defaultIndex:(int)index threshold:(BOOL*)oHasThresholdInfo;
207 
208 /*TQMS 993032, for the case of threshold type = rank_top and rank_bottom, whether to ignore Subtotal rows maters when determining the max value of threshold. In Heatmap, we should not consider the subtotal rows, so I add an additional method here.
209  */
210 - (ThresholdSliderData*) getThresholdInfo:(NSString*)iMetricID defaultIndex:(int)index threshold:(BOOL*)oHasThresholdInfo withIgnoreTotal:(BOOL)ignoreTotal;
211 
219 - (MSIHeader*)headerObject:(MSIDisplayInfo*)object;
220 
225 - (MSIDisplayInfo*) objectByID:(NSString*) objID;
226 
227 //- (Header*) getHeader:(MSIDataElement*)iDataElement;
228 
233 - (BOOL)isElementEqualWithAxisType:(int)iAxisType AtRow:(NSInteger)rowIndex andColumn:(NSInteger)colIndex withElement:(void*)element;
234 
238 - (MSIHeaderValue *) getFirstHeaderElement:(MSIHeader*)iHeader;
239 
240 
248 - (NSString*) getDisplayStringWithAxisType:(AxisType)type AtRow:(NSInteger)rowIndex columnDepth:(NSInteger)depth withDelimiter:(NSString*)delimeter;
249 
253 - (NSString*) getEntireColDisplayStringAtColumn:(NSInteger)colIndex withDelimiter:(NSString *)delimeter;
254 
259 - (void) resetIterator:(void*) iterator;
266 - (BOOL) isSubtotalCellWithAxisType:(AxisType) iAxisType withOrdinal:(int) iOrdinal withDepth:(int) iDepth;
267 
268 - (MSIHeaderValue*) allocHeaderValueAtRow:(NSInteger)rowIndex atColumn:(NSInteger)colIndex;//lishan manipulation
269 
273 - (void)clearCachedData;
274 
278 - (void) updateDataElementInCacheAtAxisType:(AxisType)type andRowIndex:(NSInteger)row andColumnIndex:(NSInteger)col;
279 
280 /*
281  D3 Widget Color By Attribute support
282  */
283 - (void*) getDropZoneSet;
284 - (NSString*) getAttributeElementID:(AxisType)type withOrdinal:(NSInteger)rowIndex withDepth:(NSInteger)titleIndex;
285 
286 @end
Definition: MSIDataElement.h:15
Definition: MSIHeaderValue.h:11
signed char BOOL
Definition: PDCwtypes.h:101
Definition: Header.h:12
Definition: MSIModelData.h:17
Definition: MSIModelData.h:35
Definition: MSIModelData.h:17
Definition: MSTRHandler.h:12
Definition: MSIModelData.h:47
Definition: MSIModelData.h:17
Definition: MetricValue.h:12
Definition: DataProviderProtocol.h:16
_DataProviderType
Definition: MSIModelData.h:16
Definition: MSIPropertyGroup.h:16
enum _BaseFormSemanticType BaseFormSemanticType
Definition: MSIDisplayInfo.h:10
Definition: MSIModelData.h:28
enum _AxisType AxisType
enum _DataProviderType DPType