public class DataTypeTree extends Object
Allows for convenient operations such as:
| Modifier and Type | Class and Description |
|---|---|
static class |
DataTypeTree.DataType
Data object that holds details of a DataType:
Browse Name of the DataType Node
NodeId of the DataType Node
NodeId of the Binary Encoding Node
NodeId of the XML Encoding Node
|
| Constructor and Description |
|---|
DataTypeTree(Tree<DataTypeTree.DataType> tree) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
getBackingClass(NodeId dataTypeId)
Get the backing Class a value of DataType
dataTypeId would have. |
@Nullable NodeId |
getBinaryEncodingId(NodeId dataTypeId)
Get the
NodeId of the Binary Encoding Node for the DataType identified by dataTypeId. |
BuiltinDataType |
getBuiltinType(NodeId dataTypeId)
Get the
BuiltinDataType dataTypeId inherits from, following references to the parent
as necessary until a BuiltinDataType is found. |
@Nullable DataTypeTree.DataType |
getDataType(NodeId dataTypeId)
Get the
DataTypeTree.DataType info for the DataType identified by dataTypeId, if it exists. |
Tree<DataTypeTree.DataType> |
getTree()
Get the underlying
Tree structure. |
@Nullable Tree<DataTypeTree.DataType> |
getTreeNode(NodeId dataTypeId)
Get the underlying
Tree node for the DataType identified by dataTypeId. |
@Nullable NodeId |
getXmlEncodingId(NodeId dataTypeId)
Get the
NodeId of the XML Encoding Node for the DataType identified by dataTypeId. |
boolean |
isAssignable(NodeId dataTypeId,
Class<?> clazz)
Check if a value of type
clazz is assignable to a value of DataType dataTypeId, i.e. |
public DataTypeTree(Tree<DataTypeTree.DataType> tree)
public Class<?> getBackingClass(NodeId dataTypeId)
dataTypeId would have.
Builtin DataTypes are backed by their intrinsic backing class.
Abstract types Identifiers.Number, Identifiers.Integer, and Identifiers.UInteger
are backed by Number, Integer, and UInteger respectively.
Enumerations are backed by Integer.
Structures are backed by ExtensionObject.
dataTypeId - the NodeId of a DataType Node.dataTypeId would have.BuiltinDataType,
BuiltinDataType.getBackingClass()public BuiltinDataType getBuiltinType(NodeId dataTypeId)
BuiltinDataType dataTypeId inherits from, following references to the parent
as necessary until a BuiltinDataType is found.dataTypeId - the NodeId of a DataType Node.BuiltinDataType this DataType inherits from.@Nullable public @Nullable DataTypeTree.DataType getDataType(NodeId dataTypeId)
DataTypeTree.DataType info for the DataType identified by dataTypeId, if it exists.dataTypeId - the NodeId of a DataType Node.DataTypeTree.DataType info for the DataType identified by dataTypeId, if it exists.@Nullable public @Nullable NodeId getBinaryEncodingId(NodeId dataTypeId)
NodeId of the Binary Encoding Node for the DataType identified by dataTypeId.@Nullable public @Nullable NodeId getXmlEncodingId(NodeId dataTypeId)
NodeId of the XML Encoding Node for the DataType identified by dataTypeId.public boolean isAssignable(NodeId dataTypeId, Class<?> clazz)
clazz is assignable to a value of DataType dataTypeId, i.e. it is
equal to or a subtype of the backing class for dataTypeId.dataTypeId - the NodeId of a DataType Node.clazz - the backing Class to check.true if clazz is equal to or a subtype of the backing class for dataTypeId.public Tree<DataTypeTree.DataType> getTree()
Tree structure.Tree structure.@Nullable public @Nullable Tree<DataTypeTree.DataType> getTreeNode(NodeId dataTypeId)
Tree node for the DataType identified by dataTypeId.Copyright © 2025. All rights reserved.