DIQ_Storage
Overview
The
The drawing data is stored separately from drawing metadata to allow the host application to implement an appropriate storage strategy. Depending on the application's architecture, the drawing stream may be stored in a database, file system, cloud object storage (such as Amazon S3), or another storage provider.
When DimensionIQ requires access to a drawing, it requests the corresponding
The drawing content may be supplied in one of two ways:
- Via the storageproperty, which contains the drawing stream or blob directly
- Via the sourceURLproperty, which specifies an HTTP or HTTPS location where the drawing can be retrieved
At least one of these properties must be provided. If
Properties
| Property | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Unique identifier for the storage object |
storage | string | No | The drawing stream or blob data, this property is required when sourceURL is not supplied |
sourceURL | string | No | Optional HTTP or HTTPS URL identifying the external location of the drawing content, this property is required when storage is not supplied |
Implementation Guidelines
Data Persistence
The host application is responsible for persisting
Unlike most DimensionIQ objects,
Each
DimensionIQ does not require a specific storage implementation. Regardless of how the drawing is stored, the host application must be able to retrieve the requested
Retrieving Storage
When DimensionIQ needs to load or display a drawing, it invokes the following capability:
onStorageGet(storageKey, onResponse)
The host application should locate the
If the drawing is stored directly within the object, the storage property should contain the drawing stream. Alternatively, if the drawing is stored externally, the
DimensionIQ will use whichever storage mechanism is supplied to retrieve the drawing content before parsing and displaying the drawing.
Direct Storage vs External Storage
The storage property allows the drawing contents to be supplied directly as part of the
Alternatively, the
For every
- Either storageorsourceURLmust be supplied
- Both properties are supported, although only one is required
- The choice of storage mechanism is entirely the responsibility of the host application
This separation provides flexibility for applications that manage large drawing files or use dedicated content delivery infrastructure.
Read-Only Behavior
The
The host application owns the storage lifecycle and is responsible for maintaining:
- The storage identifier - key
- The drawing content - storage, when used
- The external storage location - sourceURL, when used
DimensionIQ consumes the stored data to load drawings but does not modify or manage the underlying storage implementation. Any updates to stored drawing content should be performed by the host application before the updated