Skip to main content
Version: 4.x

Class: SinglePropertyFilterNodeCollection

@cognite/reveal.SinglePropertyFilterNodeCollection

Node collection that filters nodes based on a node property from a list of values, similarly to how SELECT ... IN (...) works. This is useful when looking up nodes based on a list of identifiers, nodes within a set of areas or systems. The node set is optimized for matching with properties with a large number of values (i.e. thousands).

Hierarchy

Constructors

constructor

new SinglePropertyFilterNodeCollection(client, model, options?)

Construct a new node set.

Parameters

NameTypeDescription
clientdefaultCogniteClient authenticated to the project the model is loaded from.
modelCdfModelNodeCollectionDataProviderCAD model.
optionsPropertyFilterNodeCollectionOptions

Overrides

CdfNodeCollectionBase.constructor

Defined in

packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:41

Properties

classToken

Static Readonly classToken: "SinglePropertyNodeCollection"

Defined in

packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:24

Accessors

classToken

get classToken(): string

Returns

string

Inherited from

CdfNodeCollectionBase.classToken

Defined in

packages/cad-styling/src/NodeCollection.ts:23


isLoading

get isLoading(): boolean

Returns

boolean

Inherited from

CdfNodeCollectionBase.isLoading

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:25

Methods

clear

clear(): void

Clears the node collection and interrupts any ongoing operations.

Returns

void

Inherited from

CdfNodeCollectionBase.clear

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:69


executeFilter

executeFilter(propertyCategory, propertyKey, propertyValues): Promise<void>

Execute filter asynchronously, replacing any existing filter active. When propertyValues contains more than 1000 elements, the operation will be split into multiple batches that are executed in parallel. Note that when providing a requestPartitions during construction of the node set, the total number of batches will be requestPartitions*numberOfBatches.

Parameters

NameTypeDescription
propertyCategorystringNode property category, e.g. 'PDMS'.
propertyKeystringNode property key, e.g. ':FU'.
propertyValuesstring[]Lookup values, e.g. ["AR100APG539","AP500INF534","AP400INF553", ...]

Returns

Promise<void>

Defined in

packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:62


getAreas

getAreas(): AreaCollection

Returns areas surrounding the nodes in the collection. The areas are boxes in "ThreeJS coordinates". Note that not all implementations supports this.

Returns

AreaCollection

Inherited from

CdfNodeCollectionBase.getAreas

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:81


getIndexSet

getIndexSet(): IndexSet

Returns

IndexSet

Inherited from

CdfNodeCollectionBase.getIndexSet

Defined in

packages/cad-styling/src/CdfNodeCollectionBase.ts:77


off

off(event, listener): void

Parameters

NameType
event"changed"
listener() => void

Returns

void

Inherited from

CdfNodeCollectionBase.off

Defined in

packages/cad-styling/src/NodeCollection.ts:32


on

on(event, listener): void

Parameters

NameType
event"changed"
listener() => void

Returns

void

Inherited from

CdfNodeCollectionBase.on

Defined in

packages/cad-styling/src/NodeCollection.ts:27


serialize

serialize(): SerializedNodeCollection

Returns

SerializedNodeCollection

Overrides

CdfNodeCollectionBase.serialize

Defined in

packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:97