Nightly releases are generated automatically from the latest source code and are intended for experimental purposes only.
These builds may contain incomplete or untested features, bugs, or security vulnerabilities, and as such, are not for production use.
Users should be aware that nightly releases may cause unexpected behavior, data loss, or system instability.
Use of these releases is at the user's own risk, and it is advised to have adequate backups before testing.
The software is provided as is with no guarantees or support.
The AttachmentAPI provides basic functionalities to define additional data optionally attached to a node.
This data can be of any type defined in AttachmentType and is stored in the form of a URI.
The AttachmentAPI provides methods to fetch, set and remove the data.
Quick Start
Example: Create a new attachment with text data.
constcontext = webvis.getContext();// Create a new attachmentconstattachmentId = context.createAttachment(webvis.AttachmentType.TEXT);// Set the attachment datacontext.setAttachmentData(attachmentId, "hello world");// Fetch the attachment dataawaitcontext.fetchAttachmentData(attachmentId); // returns "hello world"
Adding Attachments to nodes
Attachments can be added to nodes using the setProperty method.
Example: attaching an attachment to a node.
constcontext = webvis.getContext();// Create a new attachment and set dataconstattachmentId = context.createAttachment(webvis.AttachmentType.TEXT);context.setAttachmentData(attachmentId, "hello world");// Attach the attachment to a nodecontext.setProperty(nodeId, webvis.Property.ATTACHMENT, attachmentId);// Fetch the attachment dataawaitcontext.getProperty(nodeId, webvis.Property.ATTACHMENT); // returns "hello world"
Events
The following events are associated with the AttachmentAPI:
Performs a safe remove which interrupt the removal process if the attachment is part of one or more snapshots. If no safe remove, a snapshot could link to missing data. Default: false.
webvis: The AttachmentAPI
Overview
The AttachmentAPI provides basic functionalities to define additional data optionally attached to a node. This data can be of any type defined in AttachmentType and is stored in the form of a URI. The AttachmentAPI provides methods to fetch, set and remove the data.
Quick Start
Example: Create a new attachment with text data.
Adding Attachments to nodes
Attachments can be added to nodes using the setProperty method.
Example: attaching an attachment to a node.
Events
The following events are associated with the AttachmentAPI: