Interface BrowsePublisher.NodeBuilder
- All Known Implementing Classes:
RootBrowsePublisher.ResultBuilder
- Enclosing interface:
- BrowsePublisher
public static interface BrowsePublisher.NodeBuilder
Provides a builder interface for configuring and adding nodes to the browsing structure.
This interface allows for setting various properties of a node before it is finalized and added.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add()
Finalizes the configuration of a node being built and adds it to the browsing structure.creationTime
(Instant creationTime) Sets the creation time of the node being built.displayPath
(Path displayPath) Sets the display path for the node being built.hasChildren
(boolean hasChildren) Sets whether the node being built has child nodes.metadata
(MetadataPoint metadata) Sets the metadata for the node being built.retiredTime
(Instant retiredTime) Sets the retired time of the node being built.
-
Method Details
-
creationTime
Sets the creation time of the node being built. This value represents the point in time when the node was created.- Parameters:
creationTime
- the creation time of the node as anInstant
- Returns:
- the
BrowsePublisher.NodeBuilder
instance for method chaining
-
retiredTime
Sets the retired time of the node being built. The retired time indicates the point in time when the node is no longer active or relevant.- Parameters:
retiredTime
- the time the node was retired as anInstant
- Returns:
- the
BrowsePublisher.NodeBuilder
instance for method chaining
-
metadata
Sets the metadata for the node being built. The metadata provides additional properties or attributes associated with the node, such as contextual, temporal, or descriptive information.- Parameters:
metadata
- theMetadataPoint
containing metadata information such as value, quality, timestamp, and source- Returns:
- the
BrowsePublisher.NodeBuilder
instance for method chaining
-
displayPath
Sets the display path for the node being built. The display path represents a human-readable or logical path associated with the node for display or reference purposes.- Parameters:
displayPath
- thePath
representing the display path- Returns:
- the
BrowsePublisher.NodeBuilder
instance for method chaining
-
hasChildren
Sets whether the node being built has child nodes.- Parameters:
hasChildren
- a boolean indicating if the node has child nodes; true if the node has children, false otherwise- Returns:
- the
BrowsePublisher.NodeBuilder
instance for method chaining
-
add
void add()Finalizes the configuration of a node being built and adds it to the browsing structure. This method creates the configured node with its associated metadata, path, display path, and child status, then appends it to the result list for further use or processing.
-