Skip to content

arlas-web-core > "services/collaborativesearch.service" > CollaborativesearchService

Class: CollaborativesearchService

Hierarchy

CollaborativesearchService

Index

Constructors

Properties

Methods


Constructors

constructor

new CollaborativesearchService(): CollaborativesearchService

Defined in services/collaborativesearch.service.ts:90

Returns: CollaborativesearchService


Properties

collaborationBus

● collaborationBus: Subject<CollaborationEvent> = new Subject()

Defined in services/collaborativesearch.service.ts:35

Bus of CollaborationEvent.


collaborationErrorBus

● collaborationErrorBus: Subject<Error> = new Subject()

Defined in services/collaborativesearch.service.ts:72

Bus of Error.


collaborations

● collaborations: Map<string, Collaboration> = new Map()

Defined in services/collaborativesearch.service.ts:44

Registry of Collaborations, Map of contributor identifier,Collaboration.


collection

● collection: string

Defined in services/collaborativesearch.service.ts:52

ARLAS SERVER collection used by the collaborativesearchService.


contribFilterBus

● contribFilterBus: Subject<Contributor> = new Subject()

Defined in services/collaborativesearch.service.ts:40

Bus of CollaborationEvent.


countAll

● countAll: Observable<number>

Defined in services/collaborativesearch.service.ts:60

Number of entity return by the collaborativesearchService at any time


max_age

● max_age: number = 60

Defined in services/collaborativesearch.service.ts:56

ARLAS SERVER max age cache used by the collaborativesearchService.


ongoingSubscribe

● ongoingSubscribe: Subject<number> = new Subject()

Defined in services/collaborativesearch.service.ts:64

Bus number of ongoing subscribe to the collaborativesearchService


registry

● registry: Map<string, Contributor> = new Map()

Defined in services/collaborativesearch.service.ts:48

Registry of Contributor, Map of contributor identifier,Contributor.


totalSubscribe

● totalSubscribe: number = 0

Defined in services/collaborativesearch.service.ts:68

Bus number of ongoing subscribe to the collaborativesearchService


Methods

dataModelBuilder

dataModelBuilder(filter: string): Object

Defined in services/collaborativesearch.service.ts:216

Parameters:

Name Type
filter string

Returns: Object


describe

describe(collection: string, pretty?: boolean): Observable<CollectionReferenceDescription>

Defined in services/collaborativesearch.service.ts:584

Describe the structure and the content of the given collection.

Parameters:

Name Type Description
collection string collection name
Optional pretty boolean Whether pretty print or not

Returns: Observable<CollectionReferenceDescription>


disable

disable(contributorId: string): void

Defined in services/collaborativesearch.service.ts:391

Disable a contributor collaboration from its identifier.

Parameters:

Name Type
contributorId string

Returns: void


enable

enable(contributorId: string): void

Defined in services/collaborativesearch.service.ts:385

Enable a contributor collaboration from its identifier.

Parameters:

Name Type
contributorId string

Returns: void


getAllContributors

getAllContributors(): Array<string>

Defined in services/collaborativesearch.service.ts:398

Retrieve all the contributor identifiers.

Returns: Array<string> List of contributor idenfiers.


getCollaboration

getCollaboration(contributorId: string): Collaboration

Defined in services/collaborativesearch.service.ts:255

Retrieve the collaboration from a contributor identifier.

Parameters:

Name Type Description
contributorId string Identifier of a contributor.

Returns: Collaboration Collaboration.


getConfigService

getConfigService(): ConfigService

Defined in services/collaborativesearch.service.ts:158

Return the Configuraion Service.

Returns: ConfigService ConfigService.


getDisableContributors

getDisableContributors(): Array<string>

Defined in services/collaborativesearch.service.ts:412

Retrieve the contributor identifiers for which the collaboration is disabled.

Returns: Array<string> List of contributor idenfiers.


getEnableContributors

getEnableContributors(): Array<string>

Defined in services/collaborativesearch.service.ts:405

Retrieve the contributor identifiers for which the collaboration is enabled.

Returns: Array<string> List of contributor idenfiers.


getExploreApi

getExploreApi(): ExploreApi

Defined in services/collaborativesearch.service.ts:130

Return the ARLAS Explore API.

Returns: ExploreApi ExploreApi.


getFetchOptions

getFetchOptions(): object

Defined in services/collaborativesearch.service.ts:116

Return options used to fetch call.

Returns: object Object.


getFinalFilter

getFinalFilter(filters: Array<Filter>): Filter

Defined in services/collaborativesearch.service.ts:519

Parameters:

Name Type
filters Array<Filter>

Returns: Filter


getUrl

getUrl(projection: [geoaggregate | geosearch | aggregate | count | geohashgeoaggregate | search | tiledgeosearch, Array<Aggregation>], filters: Array<Filter>): string

Defined in services/collaborativesearch.service.ts:434

Build query parameters from aggregation and filters

Parameters:

Name Type
projection [geoaggregate
filters Array<Filter>

Returns: string Url encoded string


getWriteApi

getWriteApi(): WriteApi

Defined in services/collaborativesearch.service.ts:144

Return the ARLAS Write API.

Returns: WriteApi WriteApi.


isEnable

isEnable(contributorId: string): boolean

Defined in services/collaborativesearch.service.ts:419

Retrieve enabled parameter of collaboration from a contributor identifier.

Parameters:

Name Type
contributorId string

Returns: boolean Contributor collaboration enabled properties.


register

register(identifier: string, contributor: Contributor): void

Defined in services/collaborativesearch.service.ts:171

Register contributor with its identifier in the map contributor registry.

Parameters:

Name Type
identifier string
contributor Contributor

Returns: void


removeAll

removeAll(): void

Defined in services/collaborativesearch.service.ts:206

Remove all the collaborations filters, notify the collaborationBus of a all removing changement.

Returns: void


removeFilter

removeFilter(contributorId: string): void

Defined in services/collaborativesearch.service.ts:194

Remove Filter from the registry of collaboration , notify the collaborationBus of a removing changement.

Parameters:

Name Type Description
contributorId string Sting identifier of contributor.

Returns: void


resolveAggregation

resolveAggregation(projection: [aggregate, Array<Aggregation>], collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<AggregationResponse>

Defined in services/collaborativesearch.service.ts:362

Resolve an ARLAS Server Aggregation request for an optional contributor and optional filters.

Parameters:

Name Type Description
projection [aggregate, Array<Aggregation>] Type of projection of ARLAS Server request :Aggregation.
collaborations Map<string, Collaboration>
Optional contributorId string Identifier contributor to resolve the request with the collaboration of this contributor.
Optional filter Filter ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<AggregationResponse> ARLAS Server observable.


resolveButNotAggregation

resolveButNotAggregation(projection: [aggregate, Array<Aggregation>], collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<AggregationResponse>

Defined in services/collaborativesearch.service.ts:349

Resolve an ARLAS Server Aggregation request with all the collaborations enabled in the collaboration registry expect for the contributor given in second optionnal parameter.

Parameters:

Name Type Description
projection [aggregate, Array<Aggregation>] Type of projection of ARLAS Server request:Aggregation.
collaborations Map<string, Collaboration>
Optional contributorId string Identifier contributor to resolve the request without the collaboration of this contributor.
Optional filter Filter ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<AggregationResponse> ARLAS Server observable.


resolveButNotFeatureCollection

resolveButNotFeatureCollection(projection: [geosearch, Search] | [tiledgeosearch, TiledSearch] | [geohashgeoaggregate, GeohashAggregation] | [geoaggregate, Array<Aggregation>], collaborations: Map<string, Collaboration>, isFlat?: boolean, contributorId?: string, filter?: Filter): Observable<FeatureCollection>

Defined in services/collaborativesearch.service.ts:315

Resolve an ARLAS Server Geosearch or Geoaggregate request with all the collaborations enabled in the collaboration registry expect for the contributor given in second optionnal parameter.

Parameters:

Name Type Default value Description
projection [geosearch, Search] [tiledgeosearch, TiledSearch] [geohashgeoaggregate, GeohashAggregation]
collaborations Map<string, Collaboration> -
Default value isFlat boolean true Boolean option to isFlat output geojson properties.
Optional contributorId string - Identifier contributor to resolve the request without the collaboration of this contributor.
Optional filter Filter - ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<FeatureCollection> ARLAS Server observable.


resolveButNotFieldRange

resolveButNotFieldRange(projection: [range, RangeRequest], collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<RangeResponse>

Defined in services/collaborativesearch.service.ts:376

Resolve an ARLAS Server Range request with all the collaborations enabled in the collaboration registry expect for the contributor given in second optionnal parameter.

Parameters:

Name Type Description
projection [range, RangeRequest] Type of projection of ARLAS Server request:Aggregation.
collaborations Map<string, Collaboration>
Optional contributorId string Identifier contributor to resolve the request without the collaboration of this contributor.
Optional filter Filter ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<RangeResponse> ARLAS Server observable.


resolveButNotHits

resolveButNotHits(projection: [search, Search] | [count, Count], collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<Hits>

Defined in services/collaborativesearch.service.ts:270

Resolve an ARLAS Server Search or Count request with all the collaborations enabled in the collaboration registry expect for the contributor given in second optionnal parameter.

Parameters:

Name Type Description
projection [search, Search] [count, Count]
collaborations Map<string, Collaboration>
Optional contributorId string Identifier contributor to resolve the request without the collaboration of this contributor.
Optional filter Filter ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<Hits> ARLAS Server observable.


resolveComputeHits

resolveComputeHits(projection: [search, Search] | [count, Count], filters: Array<Filter>): Observable<Hits>

Defined in services/collaborativesearch.service.ts:298

Resolve an ARLAS Server Search or Count request for an array of filter.

Parameters:

Name Type Description
projection [search, Search] [count, Count]
filters Array<Filter> ARLAS API filters to resolve the request with compute

Returns: Observable<Hits> ARLAS Server observable.


resolveFeatureCollection

resolveFeatureCollection(projection: [geosearch, Search] | [tiledgeosearch, TiledSearch] | [geohashgeoaggregate, GeohashAggregation] | [geoaggregate, Array<Aggregation>], isFlat?: boolean, collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<FeatureCollection>

Defined in services/collaborativesearch.service.ts:332

Resolve an ARLAS Server Geosearch or Geoaggregate request for an optional contributor and optional filters.

Parameters:

Name Type Default value Description
projection [geosearch, Search] [tiledgeosearch, TiledSearch] [geohashgeoaggregate, GeohashAggregation]
Default value isFlat boolean true Boolean option to flat output geojson properties.
collaborations Map<string, Collaboration> -
Optional contributorId string - Identifier contributor to resolve the request with the collaboration of this contributor.
Optional filter Filter - ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<FeatureCollection> ARLAS Server observable.


resolveHits

resolveHits(projection: [search, Search] | [count, Count], collaborations: Map<string, Collaboration>, contributorId?: string, filter?: Filter): Observable<Hits>

Defined in services/collaborativesearch.service.ts:284

Resolve an ARLAS Server Search or Count request for an optional contributor and optional filters.

Parameters:

Name Type Description
projection [search, Search] [count, Count]
collaborations Map<string, Collaboration>
Optional contributorId string Identifier contributor to resolve the request with the collaboration of this contributor.
Optional filter Filter ARLAS API filter to resolve the request with this filter in addition.

Returns: Observable<Hits> ARLAS Server observable.


setCollaborations

setCollaborations(dataModel: Object): void

Defined in services/collaborativesearch.service.ts:234

Initialize all the contributor in the state of dataModel.

Parameters:

Name Type Description
dataModel Object

Returns: void


setConfigService

setConfigService(configService: ConfigService): void

Defined in services/collaborativesearch.service.ts:165

Set the Configuraion Service.

Parameters:

Name Type Description
configService ConfigService ConfigService.

Returns: void


setCountAll

setCountAll(collaborations: Map<string, Collaboration>): void

Defined in services/collaborativesearch.service.ts:425

Update countAll property.

Parameters:

Name Type
collaborations Map<string, Collaboration>

Returns: void


setExploreApi

setExploreApi(exploreApi: ExploreApi): void

Defined in services/collaborativesearch.service.ts:137

Set the ARLAS Explore API.

Parameters:

Name Type
exploreApi ExploreApi

Returns: void


setFetchOptions

setFetchOptions(fetchOptions: any): void

Defined in services/collaborativesearch.service.ts:123

Set the fetch options.

Parameters:

Name Type Description
fetchOptions any : Object.

Returns: void


setFilter

setFilter(contributorId: string, collaboration: Collaboration): void

Defined in services/collaborativesearch.service.ts:179

Add Filter setted by a contributor in the registry of collaboration, notify the collaborationBus of a changement.

Parameters:

Name Type Description
contributorId string Sting identifier of contributor.
collaboration Collaboration Collaboration added by the contributor.

Returns: void


setWriteApi

setWriteApi(writeApi: WriteApi): void

Defined in services/collaborativesearch.service.ts:151

Set the ARLAS Write API.

Parameters:

Name Type
writeApi WriteApi

Returns: void


tag

tag(collection: string, body?: TagRequest, pretty?: boolean): Observable<UpdateResponse>

Defined in services/collaborativesearch.service.ts:597

Search and tag the elements found in the collection, given the filters

Parameters:

Name Type Description
collection string collection name
Optional body TagRequest Request body
Optional pretty boolean Whether pretty print or not

Returns: Observable<UpdateResponse>


untag

untag(collection: string, body?: TagRequest, pretty?: boolean): Observable<UpdateResponse>

Defined in services/collaborativesearch.service.ts:610

Search and untag the elements found in the collection, given the filters

Parameters:

Name Type Description
collection string collection name
Optional body TagRequest Request body
Optional pretty boolean Whether pretty print or not

Returns: Observable<UpdateResponse>


urlBuilder

urlBuilder(): string

Defined in services/collaborativesearch.service.ts:221

Returns: string