DataLayer Class
Data layer
Methods
- appendFilters
- applySorting
- createSubject
- dateFiltersDataSetsMatch
- getDateFilterDateDataSet
- getGlobalDateFilters
- getId
- getMeasureDateFilters
- hasFilters
- hasGlobalDateFilter
- hasMetricDateFilters
- isAfmExecutable
- isArithmeticMeasure
- isAttributeFilter deprecated
- isAttributeFilterSelectAll
- isDateFilter deprecated
- isPoP
- isPreviousPeriodMeasure
- isSimpleMeasure
- isSortValid
- normalizeAfm
- toAfmResultSpec
- unwrapArithmeticMeasure
- unwrapPoPMeasure
- unwrapPreviousPeriodMeasure
- unwrapSimpleMeasure
appendFilters
-
afm
-
attributeFilters
-
dateFilter
-
measureValueFilters
Append attribute filters and date filter to afm
Date filter handling: - Override if date filter has the same id - Add if date filter if date filter id is different
Attribute filter handling: - Add all
Parameters
-
afm
AFM.IAfm -
attributeFilters
AFM.AttributeFilterItem -
dateFilter
AFM.DateFilterItem -
measureValueFilters
AFM.IMeasureValueFilter
Returns
applySorting
-
resultSpec
-
sortItems
Attaches sorts into resultSpec
Parameters
-
resultSpec
AFM.IResultSpec -
sortItems
AFM.SortItem
Returns
createSubject
-
successHandler
-
errorHandler
Creates infinite stream Usage: const subject = createSubject( (result) => console.log('Success:', result), (error) => console.error('Error:', error) ); subject.next(promise1); subject.next(promise2);
subject.unsubscribe();
Parameters
-
successHandler
StreamSuccessHandler -
errorHandler
StreamErrorHandler
Returns
dateFiltersDataSetsMatch
-
f1
-
f2
Returns true if dateFilters dataSets match
Parameters
-
f1
AFM.DateFilterItem -
f2
AFM.DateFilterItem
Returns
getDateFilterDateDataSet
-
filter
Returns date filter date dataset
Parameters
-
filter
AFM.DateFilterItem
Returns
getGlobalDateFilters
-
normalizedAfm
Returns global date filters
Parameters
-
normalizedAfm
INormalizedAFM
Returns
getId
-
obj
Return uri or identifier from ObjQualifier
Parameters
-
obj
AFM.ObjQualifier
Returns
getMeasureDateFilters
-
normalizedAfm
Return date filters from AFM
Parameters
-
normalizedAfm
AFM.IAfm
Returns
hasFilters
-
measure
Returns true if measure has filters
Parameters
-
measure
AFM.ISimpleMeasure
Returns
hasGlobalDateFilter
-
afm
Return true if AFM has global date filter
Parameters
-
afm
INormalizedAFM
Returns
hasMetricDateFilters
-
normalizedAfm
Returns true if measure has dateFilters
Parameters
-
normalizedAfm
INormalizedAFM
Returns
isAfmExecutable
-
afm
Returns true if AFM is executable
Parameters
-
afm
AFM.IAfm
Returns
isArithmeticMeasure
-
item
Returns true if measure is arithmetic measure
Parameters
-
item
AFM.IMeasure
Returns
isAttributeFilter
-
filter
Returns true if filter is attributeFilter
Parameters
-
filter
AFM.FilterItem
Returns
isAttributeFilterSelectAll
-
filter
Returns true if filter is negative attribute filter and has no selected elements, meaning that this is "Select all"
Parameters
-
filter
AFM.FilterItem
Returns
isDateFilter
-
filter
Returns true if filter is dateFilter
Parameters
-
filter
AFM.CompatibilityFilter
Returns
isPoP
-
item
Returns true if measure is PeriodOverPeriod
Parameters
-
item
AFM.IMeasure
Returns
isPreviousPeriodMeasure
-
item
Returns true if measure is previous period measure
Parameters
-
item
AFM.IMeasure
Returns
isSimpleMeasure
-
item
Returns true if measure is a simple measure
Parameters
-
item
AFM.IMeasure
Returns
isSortValid
-
afm
-
sortItem
Returns true if sortItem fits to afm
Parameters
-
afm
AFM.IAfm -
sortItem
AFM.SortItem
Returns
normalizeAfm
-
afm
Normalize AFM
Parameters
-
afm
AFM.IAfm
Returns
toAfmResultSpec
-
visObj
Converts visualizationObject to afm and resultSpec
Parameters
-
visObj
VisualizationObject.IVisualizationObjectContent
Returns
unwrapArithmeticMeasure
-
item
Unwraps arithmeticMeasure object
Parameters
-
item
AFM.IMeasure
Returns
unwrapPoPMeasure
-
item
Unwraps popMeasure object
Parameters
-
item
AFM.IMeasure
Returns
unwrapPreviousPeriodMeasure
-
item
Unwraps previousPeriodMeasure object
Parameters
-
item
AFM.IMeasure
Returns
unwrapSimpleMeasure
-
item
Unwraps measure object
Parameters
-
item
AFM.IMeasure