arlas-web-contributors > "contributors/ComputeContributor" > ComputeContributor

Class: ComputeContributor

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

Hierarchy

Contributor

↳ ComputeContributor

Index

Constructors

Properties

Methods


Constructors

constructor

new ComputeContributor(identifier: string, collaborativeSearcheService: CollaborativesearchService, configService: ConfigService): ComputeContributor

Overrides Contributor.__constructor

Defined in contributors/ComputeContributor.ts:41

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.

Returns: ComputeContributor


Properties

collaborativeSearcheService

● collaborativeSearcheService: CollaborativesearchService

Inherited from Contributor.collaborativeSearcheService

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


configService

● configService: ConfigService

Inherited from Contributor.configService

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:7


field

● field: string = this.getConfigValue('field')

Defined in contributors/ComputeContributor.ts:33

Field on which the metric will be computed


identifier

● identifier: string

Inherited from Contributor.identifier

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:6


metric

● metric: string = this.getConfigValue('metric')

Defined in contributors/ComputeContributor.ts:35

Field on which the metric will be computed


metricValue

● metricValue: number

Defined in contributors/ComputeContributor.ts:41


process

● process: string = this.getConfigValue('process')

Defined in contributors/ComputeContributor.ts:39

A process to apply on this.metricValue


title

● title: string = this.getConfigValue('title')

Defined in contributors/ComputeContributor.ts:37

Title of the contributor


Methods

computeData

computeData(data: ComputationResponse): ComputationResponse

Overrides Contributor.computeData

Defined in contributors/ComputeContributor.ts:69

Parameters:

Name Type
data ComputationResponse

Returns: ComputationResponse


fetchData

fetchData(collaborationEvent: CollaborationEvent): Observable<ComputationResponse>

Overrides Contributor.fetchData

Defined in contributors/ComputeContributor.ts:57

Parameters:

Name Type
collaborationEvent CollaborationEvent

Returns: Observable<ComputationResponse>


getConfigValue

getConfigValue(key: string): any

Inherited from Contributor.getConfigValue

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:24

Parameters:

Name Type Description
key string a `key` defined in configuration.

Returns: any value of the key in configuration.


getFilterDisplayName

getFilterDisplayName(): string

Overrides Contributor.getFilterDisplayName

Defined in contributors/ComputeContributor.ts:90

Returns: string Pretty name of contributor based on query propoerty.


getName

getName(): string

Inherited from Contributor.getName

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:28

Returns: string name of contributor set in configuration.


getPackageName

getPackageName(): string

Overrides Contributor.getPackageName

Defined in contributors/ComputeContributor.ts:96

Returns: string Package name for the configuration service.


setData

setData(data: ComputationResponse): any

Overrides Contributor.setData

Defined in contributors/ComputeContributor.ts:73

Parameters:

Name Type
data ComputationResponse

Returns: any


setSelection

setSelection(collaboration: Collaboration): any

Overrides Contributor.setSelection

Defined in contributors/ComputeContributor.ts:83

Parameters:

Name Type
collaboration Collaboration

Returns: any


<Protected> updateFromCollaboration

updateFromCollaboration(collaborationEvent: CollaborationEvent): void

Inherited from Contributor.updateFromCollaboration

Defined in /docs/node_modules/arlas-web-core/models/contributor.d.ts:37

Parameters:

Name Type
collaborationEvent CollaborationEvent

Returns: void


<Static> getJsonSchema

getJsonSchema(): Object

Defined in contributors/ComputeContributor.ts:53

return the json schem of this contributor

Returns: Object