Class: SinglePropertyFilterNodeCollection
Defined in: packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:23
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).
Extends
Constructors
Constructor
new SinglePropertyFilterNodeCollection(
client
,model
,options
):SinglePropertyFilterNodeCollection
Defined in: packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:41
Construct a new node set.
Parameters
client
CogniteClient
CogniteClient authenticated to the project the model is loaded from.
model
CdfModelNodeCollectionDataProvider
CAD model.
options
PropertyFilterNodeCollectionOptions
= {}
Returns
SinglePropertyFilterNodeCollection
Overrides
CdfNodeCollectionBase
.constructor
Properties
classToken
readonly
static
classToken:"SinglePropertyNodeCollection"
='SinglePropertyNodeCollection'
Defined in: packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:24
Accessors
classToken
Get Signature
get classToken():
string
Defined in: packages/cad-styling/src/NodeCollection.ts:23
Returns
string
Inherited from
CdfNodeCollectionBase
.classToken
isLoading
Get Signature
get isLoading():
boolean
Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:25
Returns
boolean
Inherited from
CdfNodeCollectionBase
.isLoading
Methods
clear()
clear():
void
Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:69
Clears the node collection and interrupts any ongoing operations.
Returns
void
Inherited from
executeFilter()
executeFilter(
propertyCategory
,propertyKey
,propertyValues
):Promise
<void
>
Defined in: packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:62
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 PropertyFilterNodeCollectionOptions.requestPartitions during construction of the node set, the total number of batches will be requestPartitions*numberOfBatches.
Parameters
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
>
getAreas()
getAreas():
AreaCollection
Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:81
Returns areas surrounding the nodes in the collection. The areas are boxes in "ThreeJS coordinates". Note that not all implementations supports this.
Returns
Inherited from
CdfNodeCollectionBase
.getAreas
getIndexSet()
getIndexSet():
IndexSet
Defined in: packages/cad-styling/src/CdfNodeCollectionBase.ts:77
Returns
Inherited from
CdfNodeCollectionBase
.getIndexSet
off()
off(
event
,listener
):void
Defined in: packages/cad-styling/src/NodeCollection.ts:32
Parameters
event
"changed"
listener
() => void
Returns
void
Inherited from
on()
on(
event
,listener
):void
Defined in: packages/cad-styling/src/NodeCollection.ts:27
Parameters
event
"changed"
listener
() => void
Returns
void
Inherited from
serialize()
serialize():
SerializedNodeCollection
Defined in: packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:97