arlas-web-core / Exports / CollaborativesearchService

Class: CollaborativesearchService

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new CollaborativesearchService()

Defined in

services/collaborativesearch.service.ts:98

Properties

collaborationBus

collaborationBus: Subject<CollaborationEvent>

Bus of CollaborationEvent.

Defined in

services/collaborativesearch.service.ts:36


collaborationErrorBus

collaborationErrorBus: Subject<Error>

Bus of Error.

Defined in

services/collaborativesearch.service.ts:77


collaborations

collaborations: Map<string, Collaboration>

Registry of Collaborations, Map of contributor identifier,Collaboration.

Defined in

services/collaborativesearch.service.ts:45


collections

collections: Set<string>

ARLAS SERVER collections that declared in the contributos

Defined in

services/collaborativesearch.service.ts:57


contribFilterBus

contribFilterBus: Subject<Contributor>

Bus of CollaborationEvent.

Defined in

services/collaborativesearch.service.ts:41


countAll

countAll: Observable<CollectionCount[]>

Number of entity return by the collaborativesearchService at any time

Defined in

services/collaborativesearch.service.ts:65


defaultCollection

defaultCollection: string

ARLAS SERVER collection used by default by the contributors.

Defined in

services/collaborativesearch.service.ts:53


max_age

max_age: number = 60

ARLAS SERVER max age cache used by the collaborativesearchService.

Defined in

services/collaborativesearch.service.ts:61


ongoingSubscribe

ongoingSubscribe: Subject<number>

Bus number of ongoing subscribe to the collaborativesearchService

Defined in

services/collaborativesearch.service.ts:69


registry

registry: Map<string, Contributor>

Registry of Contributor, Map of contributor identifier,Contributor.

Defined in

services/collaborativesearch.service.ts:49


totalSubscribe

totalSubscribe: number = 0

Bus number of ongoing subscribe to the collaborativesearchService

Defined in

services/collaborativesearch.service.ts:73

Methods

dataModelBuilder

dataModelBuilder(filter): Object

Parameters

Name Type
filter string

Returns

Object

Defined in

services/collaborativesearch.service.ts:245


describe

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

Describe the structure and the content of the given collection.

Parameters

Name Type Description
collection string collection name
pretty? boolean Whether pretty print or not
max_age number Duration of browser cache.s

Returns

Observable<CollectionReferenceDescription>

Defined in

services/collaborativesearch.service.ts:630


disable

disable(contributorId): void

Disable a contributor collaboration from its identifier.

Parameters

Name Type
contributorId string

Returns

void

Defined in

services/collaborativesearch.service.ts:484


enable

enable(contributorId): void

Enable a contributor collaboration from its identifier.

Parameters

Name Type
contributorId string

Returns

void

Defined in

services/collaborativesearch.service.ts:478


getAllContributors

getAllContributors(): string[]

Retrieve all the contributor identifiers.

Returns

string[]

List of contributor idenfiers.

Defined in

services/collaborativesearch.service.ts:491


getCollaboration

getCollaboration(contributorId): Collaboration

Retrieve the collaboration from a contributor identifier.

Parameters

Name Type Description
contributorId string Identifier of a contributor.

Returns

Collaboration

Collaboration.

Defined in

services/collaborativesearch.service.ts:308


getConfigService

getConfigService(): ConfigService

Return the Configuraion Service.

Returns

ConfigService

ConfigService.

Defined in

services/collaborativesearch.service.ts:151


getDisableContributors

getDisableContributors(): string[]

Retrieve the contributor identifiers for which the collaboration is disabled.

Returns

string[]

List of contributor idenfiers.

Defined in

services/collaborativesearch.service.ts:505


getEnableContributors

getEnableContributors(): string[]

Retrieve the contributor identifiers for which the collaboration is enabled.

Returns

string[]

List of contributor idenfiers.

Defined in

services/collaborativesearch.service.ts:498


getExploreApi

getExploreApi(): ExploreApi

Return the ARLAS Explore API.

Returns

ExploreApi

ExploreApi.

Defined in

services/collaborativesearch.service.ts:137


getFetchOptions

getFetchOptions(): Object

Return options used to fetch call.

Returns

Object

Object.

Name Type
credentials string
referrerPolicy? string
responseType? string
signal? any

Defined in

services/collaborativesearch.service.ts:123


getFinalFilter

getFinalFilter(filters): Filter

Parameters

Name Type
filters Filter[]

Returns

Filter

Defined in

services/collaborativesearch.service.ts:581


getUrl

getUrl(projection, filters, max_age?): string

Build query parameters from aggregation and filters

Parameters

Name Type
projection [aggregate | geoaggregate | geohashgeoaggregate | geotilegeoaggregate | count | search | geosearch | tiledgeosearch | shapesearch | shapeaggregate, Aggregation[]]
filters Filter[]
max_age number

Returns

string

Url encoded string

Defined in

services/collaborativesearch.service.ts:530


isEnable

isEnable(contributorId): boolean

Retrieve enabled parameter of collaboration from a contributor identifier.

Parameters

Name Type
contributorId string

Returns

boolean

Contributor collaboration enabled properties.

Defined in

services/collaborativesearch.service.ts:512


list

list(pretty?): Observable<CollectionReferenceDescription[]>

Lists the collections configured in ARLAS.

Parameters

Name Type Default value Description
pretty boolean false Whether pretty print or not

Returns

Observable<CollectionReferenceDescription[]>

Defined in

services/collaborativesearch.service.ts:641


register

register(identifier, contributor): void

Register contributor with its identifier in the map contributor registry.

Parameters

Name Type
identifier string
contributor Contributor

Returns

void

Defined in

services/collaborativesearch.service.ts:164


registerCollections

registerCollections(contributor): void

Register collections of the given contributor in a collections registry.

Parameters

Name Type
contributor Contributor

Returns

void

Defined in

services/collaborativesearch.service.ts:172


removeAll

removeAll(): void

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

Returns

void

Defined in

services/collaborativesearch.service.ts:235


removeFilter

removeFilter(contributorId): void

Removes the contributor's collaboration of the registry of collaborations. Notifies the collaborationBus of the removed collaboration. If the given contributor is linked to another one, the linked contributor's collaboration will be removed as well. The collaborationBus needs to be notified of this removal as well.

Parameters

Name Type Description
contributorId string Sting identifier of contributor.

Returns

void

Defined in

services/collaborativesearch.service.ts:212


resolveAggregation

resolveAggregation(projection, collaborations, collection, contributorId?, filter?, isFlat?, max_age?): Observable<AggregationResponse>

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

Parameters

Name Type Description
projection [aggregate, Aggregation[]] Type of projection of ARLAS Server request :Aggregation.
collaborations Map<string, Collaboration> -
collection any -
contributorId? string Identifier contributor to resolve the request with the collaboration of this contributor.
filter? Filter ARLAS API filter to resolve the request with this filter in addition.
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<AggregationResponse>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:452


resolveButNotAggregation

resolveButNotAggregation(projection, collaborations, collection, contributorId?, filter?, isFlat?, max_age?): Observable<AggregationResponse>

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

Parameters

Name Type Description
projection [aggregate, Aggregation[]] Type of projection of ARLAS Server request:Aggregation.
collaborations Map<string, Collaboration> -
collection any -
contributorId? string Identifier contributor to resolve the request without the collaboration of this contributor.
filter? Filter ARLAS API filter to resolve the request with this filter in addition.
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<AggregationResponse>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:437


resolveButNotComputation

resolveButNotComputation(projection, collaborations, collection, contributorId?, filter?, isFlat?, max_age?): Observable<ComputationResponse>

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

Parameters

Name Type Description
projection [compute, ComputationRequest] Type of projection of ARLAS Server request : ComputationRequest.
collaborations Map<string, Collaboration> Map
collection any -
contributorId? string Identifier contributor to resolve the request without the collaboration of this contributor.
filter? Filter ARLAS API filter to resolve the request with this filter in addition.
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<ComputationResponse>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:469


resolveButNotFeatureCollection

resolveButNotFeatureCollection(projection, collaborations, collection, isFlat?, contributorId?, filter?, max_age?): Observable<FeatureCollection>

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

Parameters

Name Type Default value Description
projection [geosearch, Search] | [tiledgeosearch, TiledSearch] | [geohashgeoaggregate, GeohashAggregation] | [geotilegeoaggregate, GeoTileAggregation] | [geoaggregate, Aggregation[]] undefined Type of projection of ARLAS Server request:Geosearch or Geoaggregate.
collaborations Map<string, Collaboration> undefined -
collection any undefined -
isFlat boolean true Boolean option to isFlat output geojson properties.
contributorId? string undefined Identifier contributor to resolve the request without the collaboration of this contributor.
filter? Filter undefined ARLAS API filter to resolve the request with this filter in addition.
max_age number undefined Duration of browser cache.

Returns

Observable<FeatureCollection>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:375


resolveButNotFeatureCollectionWithAbort

resolveButNotFeatureCollectionWithAbort(projection, collaborations, collection, isFlat?, abortableSignal, contributorId?, filter?, max_age?): Observable<FeatureCollection>

Parameters

Name Type Default value
projection [geosearch, Search] | [tiledgeosearch, TiledSearch] | [geohashgeoaggregate, GeohashAggregation] | [geotilegeoaggregate, GeoTileAggregation] | [geoaggregate, Aggregation[]] undefined
collaborations Map<string, Collaboration> undefined
collection any undefined
isFlat boolean true
abortableSignal any undefined
contributorId? string undefined
filter? Filter undefined
max_age number undefined

Returns

Observable<FeatureCollection>

Defined in

services/collaborativesearch.service.ts:394


resolveButNotHits

resolveButNotHits(projection, collaborations, collection, contributorId?, filter?, isFlat?, max_age?): Observable<Hits>

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

Parameters

Name Type Description
projection [search, Search] | [count, Count] Type of projection of ARLAS Server request:Search or Count.
collaborations Map<string, Collaboration> -
collection any -
contributorId? string Identifier contributor to resolve the request without the collaboration of this contributor.
filter? Filter ARLAS API filter to resolve the request with this filter in addition.
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<Hits>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:325


resolveButNotShapefile

resolveButNotShapefile(projection, collaborations, collection, isFlat?, contributorId?, filter?, max_age?): Observable<ArrayBuffer>

Parameters

Name Type Default value
projection [shapeaggregate, Aggregation[]] | [shapesearch, Search] undefined
collaborations Map<string, Collaboration> undefined
collection any undefined
isFlat boolean true
contributorId? string undefined
filter? Filter undefined
max_age number undefined

Returns

Observable<ArrayBuffer>

Defined in

services/collaborativesearch.service.ts:386


resolveComputeHits

resolveComputeHits(projection, filters, collection, isFlat?, max_age?): Observable<Hits>

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

Parameters

Name Type Description
projection [search, Search] | [count, Count] Type of projection of ARLAS Server request :Search or Count .
filters Filter[] ARLAS API filters to resolve the request with compute
collection any -
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<Hits>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:357


resolveFeatureCollection

resolveFeatureCollection(projection, isFlat?, collaborations, collection, contributorId?, filter?, max_age?): Observable<FeatureCollection>

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] | [geotilegeoaggregate, GeoTileAggregation] | [geoaggregate, Aggregation[]] undefined Type of projection of ARLAS Server request :Geosearch or Geoaggregate.
isFlat boolean true Boolean option to flat output geojson properties.
collaborations Map<string, Collaboration> undefined -
collection any undefined -
contributorId? string undefined Identifier contributor to resolve the request with the collaboration of this contributor.
filter? Filter undefined ARLAS API filter to resolve the request with this filter in addition.
max_age number undefined Duration of browser cache.

Returns

Observable<FeatureCollection>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:417


resolveHits

resolveHits(projection, collaborations, collection, contributorId?, filter?, isFlat?, max_age?): Observable<Hits>

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

Parameters

Name Type Description
projection [search, Search] | [count, Count] Type of projection of ARLAS Server request :Search or Count .
collaborations Map<string, Collaboration> -
collection any -
contributorId? string Identifier contributor to resolve the request with the collaboration of this contributor.
filter? Filter ARLAS API filter to resolve the request with this filter in addition.
isFlat? boolean Whether flatten json.
max_age number Duration of browser cache.

Returns

Observable<Hits>

ARLAS Server observable.

Defined in

services/collaborativesearch.service.ts:341


setCollaborations

setCollaborations(dataModel): void

Initialise all the contributors collaborations from dataModel.

Parameters

Name Type
dataModel Object

Returns

void

Defined in

services/collaborativesearch.service.ts:283


setConfigService

setConfigService(configService): void

Set the Configuraion Service.

Parameters

Name Type Description
configService ConfigService ConfigService.

Returns

void

Defined in

services/collaborativesearch.service.ts:158


setCountAll

setCountAll(collaborations): void

Update countAll property.

Parameters

Name Type
collaborations Map<string, Collaboration>

Returns

void

Defined in

services/collaborativesearch.service.ts:518


setExploreApi

setExploreApi(exploreApi): void

Set the ARLAS Explore API.

Parameters

Name Type
exploreApi ExploreApi

Returns

void

Defined in

services/collaborativesearch.service.ts:144


setFetchOptions

setFetchOptions(fetchOptions): void

Set the fetch options.

Parameters

Name Type Description
fetchOptions any : Object.

Returns

void

Defined in

services/collaborativesearch.service.ts:130


setFilter

setFilter(contributorId, collaboration): void

Adds the contributor's collaboration in the registry of collaborations. Notifies the collaborationBus of the changement. If the given contributor is linked to another one, the linked contributor will be assigned the same collaboration. The collaborationBus in this case doesn't need to be notified.

Parameters

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

Returns

void

Defined in

services/collaborativesearch.service.ts:190


urlBuilder

urlBuilder(): string

Returns

string

Defined in

services/collaborativesearch.service.ts:262