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
-
↳
SinglePropertyFilterNodeCollection
Constructors
constructor
• new SinglePropertyFilterNodeCollection(client
, model
, options?
)
Construct a new node set.
Parameters
Name | Type | Description |
---|---|---|
client | default | {@link CogniteClient} authenticated to the project the model is loaded from. |
model | CdfModelNodeCollectionDataProvider | CAD model. |
options | PropertyFilterNodeCollectionOptions |
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
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
Name | Type | Description |
---|---|---|
propertyCategory | string | Node property category, e.g. 'PDMS' . |
propertyKey | string | Node property key, e.g. ':FU' . |
propertyValues | string [] | 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
Overrides
Defined in
packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:137
getIndexSet
▸ getIndexSet(): IndexSet
Returns
Overrides
Defined in
packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:133
off
▸ off(event
, listener
): void
Parameters
Name | Type |
---|---|
event | "changed" |
listener | () => void |
Returns
void
Inherited from
Defined in
packages/cad-styling/src/NodeCollection.ts:32
on
▸ on(event
, listener
): void
Parameters
Name | Type |
---|---|
event | "changed" |
listener | () => void |
Returns
void
Inherited from
Defined in
packages/cad-styling/src/NodeCollection.ts:27
serialize
▸ serialize(): SerializedNodeCollection
Returns
Overrides
Defined in
packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:147