Skip to main content
Version: 3.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
clientdefault{@link CogniteClient} authenticated to the project the model is loaded from.
modelCdfModelNodeCollectionDataProviderCAD model.
optionsPropertyFilterNodeCollectionOptions

Overrides​

NodeCollection.constructor

Defined in​

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

Properties​

classToken​

▪ Static Readonly classToken: "SinglePropertyNodeCollection"

Defined in​

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

Accessors​

classToken​

• get classToken(): string

Returns​

string

Inherited from​

NodeCollection.classToken

Defined in​

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


isLoading​

• get isLoading(): boolean

Returns​

boolean

Overrides​

NodeCollection.isLoading

Defined in​

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

Methods​

clear​

▸ clear(): void

Clears the node set and interrupts any ongoing operations.

Returns​

void

Overrides​

NodeCollection.clear

Defined in​

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


executeFilter​

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

Execute filter asynchronously, replacing any existing filter active. When {@link propertyValues} contains more than 1000 elements, the operation will be split into multiple batches that are executed in parallel. Note that when providing a {@link PropertyFilterNodeCollectionOptions.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:75


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

Overrides​

NodeCollection.getAreas

Defined in​

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


getIndexSet​

▸ getIndexSet(): IndexSet

Returns​

IndexSet

Overrides​

NodeCollection.getIndexSet

Defined in​

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


off​

▸ off(event, listener): void

Parameters​

NameType
event"changed"
listener() => void

Returns​

void

Inherited from​

NodeCollection.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​

NodeCollection.on

Defined in​

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


serialize​

▸ serialize(): SerializedNodeCollection

Returns​

SerializedNodeCollection

Overrides​

NodeCollection.serialize

Defined in​

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