arlas-web-contributors / Exports / ComputeContributor

Class: ComputeContributor

This contributor computes a metric on the given field, given the filters

Hierarchy

  • Contributor

ComputeContributor

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ComputeContributor(identifier, collaborativeSearcheService, configService, collection)

Build a new contributor.

Parameters

Name Type Description
identifier string Identifier of contributor.
collaborativeSearcheService CollaborativesearchService Instance of CollaborativesearchService from Arlas-web-core.
configService ConfigService Instance of ConfigService from Arlas-web-core.
collection string -

Overrides

Contributor.constructor

Defined in

src/contributors/ComputeContributor.ts:48

Properties

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


configService

configService: ConfigService

Inherited from

Contributor.configService

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:8


endCollaborationEvent

endCollaborationEvent: Subject<unknown>

Inherited from

Contributor.endCollaborationEvent

Defined in

node_modules/arlas-web-core/models/contributor.d.ts:16


function

function: string

Function to apply to the results of computation metrics

Defined in

src/contributors/ComputeContributor.ts:36


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


metricValue

metricValue: number

Defined in

src/contributors/ComputeContributor.ts:41


metrics

metrics: ComputeConfig[]

Array of which metrics & filters will be computed

Defined in

src/contributors/ComputeContributor.ts:34


title

title: string

Title of the contributor

Defined in

src/contributors/ComputeContributor.ts:38

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(data): ComputationResponse[]

Parameters

Name Type
data (Hits | ComputationResponse)[]

Returns

ComputationResponse[]

Overrides

Contributor.computeData

Defined in

src/contributors/ComputeContributor.ts:86


fetchData

fetchData(collaborationEvent): Observable<ComputationResponse[]>

Parameters

Name Type
collaborationEvent CollaborationEvent

Returns

Observable<ComputationResponse[]>

Overrides

Contributor.fetchData

Defined in

src/contributors/ComputeContributor.ts:62


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

Pretty name of contributor based on query propoerty.

Overrides

Contributor.getFilterDisplayName

Defined in

src/contributors/ComputeContributor.ts:110


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/ComputeContributor.ts:116


setData

setData(data): any

Parameters

Name Type
data (Hits | ComputationResponse)[]

Returns

any

Overrides

Contributor.setData

Defined in

src/contributors/ComputeContributor.ts:90


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(collaboration): any

Parameters

Name Type
collaboration Collaboration

Returns

any

Overrides

Contributor.setSelection

Defined in

src/contributors/ComputeContributor.ts:103


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


getJsonSchema

Static getJsonSchema(): Object

return the json schem of this contributor

Returns

Object

Defined in

src/contributors/ComputeContributor.ts:58