BCFTopics
BCFTopics manages Building Collaboration Format (BCF) data the engine. It provides functionality for importing, exporting, and manipulating BCF data. 📕 Tutorial. 📘 API.
Extends
Implements
DisposableConfigurable<BCFTopicsConfigManager,BCFTopicsConfig>
Accessors
usedLabels
getusedLabels():Set<string>
Retrieves the unique set of labels used across all topics.
Returns
Set<string>
A Set containing the unique labels.
usedPriorities
getusedPriorities():Set<undefined|string>
Retrieves the unique set of topic priorities used across all topics.
Returns
Set<undefined | string>
A Set containing the unique topic priorities. Note: This method filters out any null or undefined priorities.
usedStages
getusedStages():Set<undefined|string>
Retrieves the unique set of topic stages used across all topics.
Returns
Set<undefined | string>
A Set containing the unique topic stages. Note: This method filters out any null or undefined stages.
usedStatuses
getusedStatuses():Set<string>
Retrieves the unique set of topic statuses used across all topics.
Returns
Set<string>
A Set containing the unique topic statuses.
usedTypes
getusedTypes():Set<string>
Retrieves the unique set of topic types used across all topics.
Returns
Set<string>
A Set containing the unique topic types.
usedUsers
getusedUsers():Set<string>
Retrieves the unique set of users associated with topics.
Returns
Set<string>
A Set containing the unique users. Note: This method collects users from the creation author, assigned to, modified author, and comment authors.
Methods
create()
create(
data?):Topic
Creates a new BCFTopic instance and adds it to the list.
Parameters
| Parameter | Type | Description |
|---|---|---|
data? | Partial<BCFTopic> | Optional partial BCFTopic object to initialize the new topic with. |
| If not provided, default values will be used. |
Returns
Topic
The newly created BCFTopic instance.
dispose()
dispose():
void
Disposes of the BCFTopics component and triggers the onDisposed event.
Returns
void
Implementation of
Remarks
This method clears the list of topics and triggers the onDisposed event. It also resets the onDisposed event listener.
export()
export(
topics):Promise<Blob>
Exports the given topics to a BCF (Building Collaboration Format) zip file.
Parameters
| Parameter | Type | Description |
|---|---|---|
topics | Iterable<Topic> | The topics to export. Defaults to all topics in the list. |
Returns
Promise<Blob>
A promise that resolves to a Blob containing the exported BCF zip file.
isConfigurable()
isConfigurable():
this is Configurable<any, any>
Whether is component is Configurable.
Returns
this is Configurable<any, any>
Inherited from
isDisposeable()
isDisposeable():
this is Disposable
Whether is component is Disposable.
Returns
this is Disposable
Inherited from
isHideable()
isHideable():
this is Hideable
Whether is component is Hideable.
Returns
this is Hideable
Inherited from
isResizeable()
isResizeable():
this is Resizeable
Whether is component is Resizeable.
Returns
this is Resizeable
Inherited from
isUpdateable()
isUpdateable():
this is Updateable
Whether is component is Updateable.
Returns
this is Updateable
Inherited from
load()
load(
data):Promise<object>
Loads BCF (Building Collaboration Format) data into the engine.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | The BCF data to load. |
Returns
Promise<object>
A promise that resolves to an object containing the created viewpoints and topics.
topics
topics:
Topic[]
viewpoints
viewpoints:
Viewpoint[] =createdViewpoints
Throws
An error if the BCF version is not supported.
updateExtensions()
updateExtensions():
void
Updates the set of extensions (types, statuses, priorities, labels, stages, users) based on the current topics. This method iterates through each topic in the list and adds its properties to the corresponding sets in the config.
Returns
void
updateViewpointReferences()
updateViewpointReferences():
void
Updates the references to viewpoints in the topics. This function iterates through each topic and checks if the viewpoints exist in the viewpoints list. If a viewpoint does not exist, it is removed from the topic's viewpoints.
Returns
void