Class: 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).
Extends
Constructors
new SinglePropertyFilterNodeCollection()
new SinglePropertyFilterNodeCollection(
client
,model
,options
):SinglePropertyFilterNodeCollection
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
Defined in
packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:41
Properties
classToken
readonly
static
classToken:"SinglePropertyNodeCollection"
='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
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 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
>
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
Inherited from
CdfNodeCollectionBase
. getAreas
Defined in
packages/cad-styling/src/CdfNodeCollectionBase.ts:81
getIndexSet()
getIndexSet():
IndexSet
Returns
Inherited from
CdfNodeCollectionBase
. getIndexSet
Defined in
packages/cad-styling/src/CdfNodeCollectionBase.ts:77
off()
off(
event
,listener
):void
Parameters
• event: "changed"
• listener
Returns
void
Inherited from
Defined in
packages/cad-styling/src/NodeCollection.ts:32
on()
on(
event
,listener
):void
Parameters
• event: "changed"
• listener
Returns
void
Inherited from
Defined in
packages/cad-styling/src/NodeCollection.ts:27
serialize()
serialize():
SerializedNodeCollection
Returns
Overrides
CdfNodeCollectionBase
. serialize
Defined in
packages/cad-styling/src/SinglePropertyFilterNodeCollection.ts:97