src/lib/services/sz-datamart.service.ts
Service class used to get data from the poc server using the datamart api(s). Stores state of responses and provides getters and setters to create and manage parameters for an instance of #SzStatSampleSet Largely used for statistics charts like the record count Donut Graph and the #SzCrossSourceStatistics component used to browse sampleset results in a data table format.
constructor(http: HttpClient, prefs: SzPrefsService, dataSourcesService: SzDataSourcesService, entityDataService: EntityDataService, statsService: SzStatisticsService)
|
||||||||||||||||||
Parameters :
|
Public createNewSampleSetFromParameters | ||||||||||||||||||||||||||||||
createNewSampleSetFromParameters(statType: SzCrossSourceSummaryCategoryType, dataSource1?: string | undefined, dataSource2?: string | undefined, matchKey?: string, principle?: string, bound?: number, sampleSize?: number, pageSize?: number, unfilteredCount?: number)
|
||||||||||||||||||||||||||||||
Request a new sampleset from the parameters passed to the method. sampleset is initialized and kept in a local reference
Parameters :
Returns :
any
|
Public getCrossSourceStatistics | ||||||||||||
getCrossSourceStatistics(dataSource1?: string | undefined, dataSource2?: string | undefined, matchKey?: string)
|
||||||||||||
get cross source summary statistics for datasource vs datasource from the api surface.
Parameters :
Returns :
any
|
Public getCrossSourceStatisticsByStatTypeFromData | |||||||||
getCrossSourceStatisticsByStatTypeFromData(statType: SzCrossSourceSummaryCategoryType, data: SzCrossSourceSummary)
|
|||||||||
get the type of stat matching the type from the cross source stat data response.
Parameters :
Returns :
Array | Array
|
Public getDataSourceDetails |
getDataSourceDetails()
|
get the list of datasources with their datasource code and id's from the api surface
Returns :
any
|
Public getDataSources |
getDataSources()
|
get the list of datasources from the api surface
Returns :
any
|
Public getLoadedStatistics |
getLoadedStatistics()
|
get number of entity and records per datasource for each datasource from the api surface |
Public getSummaryStatistics |
getSummaryStatistics()
|
Returns :
any
|
Public refreshSampleSet |
refreshSampleSet()
|
refresh the sampleset data
Returns :
void
|
Public _onSampleResultChange |
Type : BehaviorSubject<[] | [] | undefined>
|
Default value : new BehaviorSubject<SzEntityData[] | undefined>(undefined)
|
Public onSampleDataSourceChange |
Type : BehaviorSubject<sampleDataSourceChangeEvent | undefined>
|
Default value : new BehaviorSubject<sampleDataSourceChangeEvent | undefined>(undefined)
|
when "datasource1" or "datasource2" are changed for the sampleset. |
Public onSampleMatchLevelChange |
Type : BehaviorSubject<number | undefined>
|
Default value : new BehaviorSubject<number>(undefined)
|
when "matchLevel" for the sampleset is changed. |
Public onSampleTypeChange |
Type : BehaviorSubject<SzCrossSourceSummaryCategoryType | undefined>
|
Default value : new BehaviorSubject<SzCrossSourceSummaryCategoryType>(undefined)
|
when "type" for the sampleset is changed. possible values are "MATCHES" | "AMBIGUOUS_MATCHES" | "POSSIBLE_MATCHES" | "POSSIBLE_RELATIONS" | "DISCLOSED_RELATIONS" |
Public onSummaryStats |
Type : BehaviorSubject<SzSummaryStats | undefined>
|
Default value : new BehaviorSubject<SzSummaryStats>(undefined)
|
when "matchLevel" for the sampleset is changed. |
Public prefs |
Type : SzPrefsService
|
dataSource1 | ||||||
getdataSource1()
|
||||||
get the "from" datasource assigned from the pulldowns |
||||||
setdataSource1(value: string)
|
||||||
set the "to" datasource assigned from the pulldowns
Parameters :
Returns :
void
|
dataSource2 | ||||||
getdataSource2()
|
||||||
get the "from" datasource assigned from the pulldowns |
||||||
setdataSource2(value: string)
|
||||||
get the "to" datasource assigned from the pulldowns
Parameters :
Returns :
void
|
doNotFetchSampleSetOnParameterChange | ||||||
setdoNotFetchSampleSetOnParameterChange(value: boolean)
|
||||||
whether or not the sampleset object automatically creates a new request when primary(datasources, matchLevel) or filtering(pageIndex, principle) parameters change
Parameters :
Returns :
void
|
loadedStatistics |
getloadedStatistics()
|
get the statistics for how many records from which datasources have beeen loaded
Returns :
SzLoadedStats | undefined
|
summaryStatistics |
getsummaryStatistics()
|
dataSources |
getdataSources()
|
dataSourceDetails |
getdataSourceDetails()
|
matchKeyCounts | ||||||
getmatchKeyCounts()
|
||||||
we store the last known match key counts for present selection for filtering menu |
||||||
setmatchKeyCounts(value: SzCrossSourceCount[])
|
||||||
we store the last known match key counts for present selection for filtering menu
Parameters :
Returns :
void
|
sampleDataSource1 | ||||||
getsampleDataSource1()
|
||||||
get the "from" datasource name assigned to the sample set instance |
||||||
setsampleDataSource1(value: string)
|
||||||
set the "from" datasource name assigned to the sample set instance
Parameters :
Returns :
void
|
sampleDataSource2 | ||||||
getsampleDataSource2()
|
||||||
get the "to" datasource name assigned to the sample set instance |
||||||
setsampleDataSource2(value: string)
|
||||||
set the "to" datasource name assigned to the sample set instance
Parameters :
Returns :
void
|
sampleMatchLevel | ||||||
getsampleMatchLevel()
|
||||||
get the matchLevel assigned to the sample set instance |
||||||
setsampleMatchLevel(value: number)
|
||||||
set the matchLevel assigned to the sample set instance. will trigger new sampleset request if different from current one.
Parameters :
Returns :
void
|
sampleSetPageSize | ||||||
getsampleSetPageSize()
|
||||||
get the page size assigned to the sample set instance |
||||||
setsampleSetPageSize(value: number)
|
||||||
set the page size assigned to the sample set instance
Parameters :
Returns :
void
|
sampleSetBound | ||||||
getsampleSetBound()
|
||||||
get the bound assigned to the sample set instance. this is either the "{entityId}" OR the combo "{entityId}:{relatedId}" that the sampleset ends/begins with.
Returns :
string
|
||||||
setsampleSetBound(value: string)
|
||||||
set the bound assigned to the sample set instance. this is either the "{entityId}" OR the combo "{entityId}:{relatedId}" to start/end at.
Parameters :
Returns :
void
|
sampleSetBoundType | ||||||
getsampleSetBoundType()
|
||||||
get the boundType assigned to the sample set instance. possible values are "INCLUSIVE_LOWER" | "EXCLUSIVE_LOWER" | "INCLUSIVE_UPPER" | "EXCLUSIVE_UPPER"
Returns :
SzBoundType
|
||||||
setsampleSetBoundType(value: SzBoundType)
|
||||||
set the boundType assigned to the sample set instance. possible values are "INCLUSIVE_LOWER" | "EXCLUSIVE_LOWER" | "INCLUSIVE_UPPER" | "EXCLUSIVE_UPPER" will trigger new sampleset request if different from current one.
Parameters :
Returns :
void
|
sampleSetMatchKey | ||||||
getsampleSetMatchKey()
|
||||||
get the matchKey assigned to the sample set instance
Returns :
string
|
||||||
setsampleSetMatchKey(value: string)
|
||||||
set the matchKey assigned to the sample set instance. will trigger new sampleset request if different from current one.
Parameters :
Returns :
void
|
sampleSetPage | ||||||
setsampleSetPage(value: number)
|
||||||
set the current page index assigned to the sample set instance
Parameters :
Returns :
void
|
sampleSetPrinciple | ||||||
getsampleSetPrinciple()
|
||||||
get the principle assigned to the sample set instance
Returns :
string
|
||||||
setsampleSetPrinciple(value: string)
|
||||||
set the principle assigned to the sample set instance
Parameters :
Returns :
void
|
sampleStatType | ||||||
getsampleStatType()
|
||||||
get the statType assigned to the sample set instance possible values are "MATCHES" | "AMBIGUOUS_MATCHES" | "POSSIBLE_MATCHES" | "POSSIBLE_RELATIONS" | "DISCLOSED_RELATIONS"
Returns :
SzCrossSourceSummaryCategoryType
|
||||||
setsampleStatType(value: SzCrossSourceSummaryCategoryType)
|
||||||
set the statType assigned to the sample set instance possible values are "MATCHES" | "AMBIGUOUS_MATCHES" | "POSSIBLE_MATCHES" | "POSSIBLE_RELATIONS" | "DISCLOSED_RELATIONS"
Parameters :
Returns :
void
|
sampleSetUnfilteredCount | ||||||
getsampleSetUnfilteredCount()
|
||||||
the number of results in the sampleset prior to filter parameters being applied.
Returns :
number
|
||||||
setsampleSetUnfilteredCount(value: number)
|
||||||
the number of results in the sampleset prior to filter parameters being applied.
Parameters :
Returns :
void
|