arlas-web-contributors / Exports / TreeContributor
Class: TreeContributor
This contributor fetches data from multiple term aggregations and format the data as a tree. it can be used to fetch data for Donuts and powerbars
Hierarchy
Contributor
↳ TreeContributor
Table of contents
Constructors
Properties
- allowOperatorChange
- cacheDuration
- collaborativeSearcheService
- collection
- collections
- colorField
- configService
- emitMissingLeaf
- endCollaborationEvent
- identifier
- isDataUpdating
- nodeSizeMinPourcentage
- operatorChangedEvent
- selectedNodesPathsList
- title
- treeData
Accessors
Methods
- computeData
- fetchData
- getAggregations
- getConfigValue
- getFilterDisplayName
- getFilterOperator
- getName
- getPackageName
- selectedNodesListChanged
- setAggregations
- setData
- setFilterOperator
- setName
- setSelection
- updateFromCollaboration
- updateTreeDataSearch
- getJsonSchema
Constructors
constructor
• new TreeContributor(identifier
, collaborativeSearcheService
, configService
, title
, collection
)
Parameters
Name | Type |
---|---|
identifier |
string |
collaborativeSearcheService |
CollaborativesearchService |
configService |
ConfigService |
title |
string |
collection |
string |
Overrides
Contributor.constructor
Defined in
src/contributors/TreeContributor.ts:83
Properties
allowOperatorChange
• allowOperatorChange: any
Defined in
src/contributors/TreeContributor.ts:76
cacheDuration
• Protected
cacheDuration: number
Inherited from
Contributor.cacheDuration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:17
collaborativeSearcheService
• collaborativeSearcheService: CollaborativesearchService
Inherited from
Contributor.collaborativeSearcheService
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:9
collection
• collection: string
Inherited from
Contributor.collection
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:14
collections
• collections: CollectionAggField
[]
Inherited from
Contributor.collections
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:15
colorField
• colorField: any
The field to retrieve the color of the node (optional), this field must be present in the include property of the fetch_hits for all the aggregations
Defined in
src/contributors/TreeContributor.ts:54
configService
• configService: ConfigService
Inherited from
Contributor.configService
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:8
emitMissingLeaf
• emitMissingLeaf: Subject
<any
[]>
Defined in
src/contributors/TreeContributor.ts:80
endCollaborationEvent
• endCollaborationEvent: Subject
<unknown
>
Inherited from
Contributor.endCollaborationEvent
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:16
identifier
• identifier: string
Inherited from
Contributor.identifier
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:7
isDataUpdating
• isDataUpdating: boolean
Inherited from
Contributor.isDataUpdating
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:13
nodeSizeMinPourcentage
• nodeSizeMinPourcentage: any
The minimum ratio of the node in its level needed to be plotted. Otherwise the node is considered as OTHER
Defined in
src/contributors/TreeContributor.ts:48
operatorChangedEvent
• operatorChangedEvent: Subject
<OpEnum
>
Defined in
src/contributors/TreeContributor.ts:78
selectedNodesPathsList
• selectedNodesPathsList: SimpleNode
[][]
List of selected nodes to be returned to a component that accepts tree data as an input
Defined in
src/contributors/TreeContributor.ts:58
title
• title: string
Title given to the aggregation result
Defined in
src/contributors/TreeContributor.ts:40
treeData
• treeData: TreeNode
Data retrieved from ARLAS-server response and to be returned for the donut/powerbars component as an input
Defined in
src/contributors/TreeContributor.ts:44
Accessors
updateData
• get
updateData(): boolean
Returns
boolean
whether the data of contributor should be updated.
Inherited from
Contributor.updateData
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:43
• set
updateData(value
): void
Parameters
Name | Type | Description |
---|---|---|
value |
boolean |
set if the data of contributor should be updated or not. |
Returns
void
whether the data of contributor should be updated.
Inherited from
Contributor.updateData
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:47
Methods
computeData
▸ computeData(aggregationResponse
): TreeNode
Parameters
Name | Type |
---|---|
aggregationResponse |
AggregationResponse |
Returns
TreeNode
Overrides
Contributor.computeData
Defined in
src/contributors/TreeContributor.ts:168
fetchData
▸ fetchData(collaborationEvent
): Observable
<AggregationResponse
>
Parameters
Name | Type |
---|---|
collaborationEvent |
CollaborationEvent |
Returns
Observable
<AggregationResponse
>
Overrides
Contributor.fetchData
Defined in
src/contributors/TreeContributor.ts:135
getAggregations
▸ getAggregations(): Aggregation
[]
Returns
Aggregation
[]
Defined in
src/contributors/TreeContributor.ts:105
getConfigValue
▸ getConfigValue(key
): any
Parameters
Name | Type | Description |
---|---|---|
key |
string |
a key defined in configuration. |
Returns
any
value of the key
in configuration.
Inherited from
Contributor.getConfigValue
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:31
getFilterDisplayName
▸ getFilterDisplayName(): string
Returns
string
Overrides
Contributor.getFilterDisplayName
Defined in
src/contributors/TreeContributor.ts:131
getFilterOperator
▸ getFilterOperator(): OpEnum
Returns
OpEnum
Defined in
src/contributors/TreeContributor.ts:113
getName
▸ getName(): string
Returns
string
name of contributor set in configuration.
Inherited from
Contributor.getName
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:35
getPackageName
▸ getPackageName(): string
Returns
string
Package name for the configuration service.
Overrides
Contributor.getPackageName
Defined in
src/contributors/TreeContributor.ts:127
selectedNodesListChanged
▸ selectedNodesListChanged(selectedNodesPathsList
): void
Parameters
Name | Type |
---|---|
selectedNodesPathsList |
SimpleNode [][] |
Returns
void
Defined in
src/contributors/TreeContributor.ts:308
setAggregations
▸ setAggregations(aggregations
): void
Parameters
Name | Type |
---|---|
aggregations |
Aggregation [] |
Returns
void
Defined in
src/contributors/TreeContributor.ts:109
setData
▸ setData(data
): TreeNode
Parameters
Name | Type |
---|---|
data |
TreeNode |
Returns
TreeNode
Overrides
Contributor.setData
Defined in
src/contributors/TreeContributor.ts:189
setFilterOperator
▸ setFilterOperator(operator
, emit?
): void
Parameters
Name | Type | Default value |
---|---|---|
operator |
OpEnum |
undefined |
emit |
boolean |
false |
Returns
void
Defined in
src/contributors/TreeContributor.ts:117
setName
▸ setName(name
): void
Parameters
Name | Type |
---|---|
name |
string |
Returns
void
set the name of the contributor
Inherited from
Contributor.setName
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:39
setSelection
▸ setSelection(data
, collaboration
): any
Parameters
Name | Type |
---|---|
data |
TreeNode |
collaboration |
Collaboration |
Returns
any
Overrides
Contributor.setSelection
Defined in
src/contributors/TreeContributor.ts:194
updateFromCollaboration
▸ updateFromCollaboration(collaborationEvent
): void
Parameters
Name | Type |
---|---|
collaborationEvent |
CollaborationEvent |
Returns
void
Inherited from
Contributor.updateFromCollaboration
Defined in
node_modules/arlas-web-core/models/contributor.d.ts:56
updateTreeDataSearch
▸ updateTreeDataSearch(search
): void
description
apply the search
term to filter the tree data
Parameters
Name | Type | Description |
---|---|---|
search |
any |
the term used to filter tree data |
Returns
void
Defined in
src/contributors/TreeContributor.ts:350
getJsonSchema
▸ Static
getJsonSchema(): Object
Returns
Object
Json schema for configuration.
Defined in
src/contributors/TreeContributor.ts:101