public final class NodeId extends Object implements Comparable<NodeId>, UaNamespaceTranslateable<NodeId>
UaNamespaceTranslateable.Context| Modifier and Type | Field and Description |
|---|---|
static NodeId[] |
EMPTY_ARRAY |
static NodeId |
ID
Deprecated.
use
Identifiers.NodeId instead. |
static NodeId |
NULL
|
static NodeId |
NULL_GUID
IdType.Guid NodeId that is considered as null value. |
static NodeId |
NULL_NUMERIC
IdType.Numeric NodeId that is considered as null value. |
static NodeId |
NULL_OPAQUE
IdType.Opaque NodeId that is considered as null value. |
static NodeId |
NULL_STRING
IdType.String NodeId that is considered as null value. |
static NodeId |
ZERO
Deprecated.
use
NULL_NUMERIC instead. |
| Constructor and Description |
|---|
NodeId(int namespaceIndex,
byte[] value)
Create new NodeId from byte[].
|
NodeId(int namespaceIndex,
ByteString value)
Create new Opaque NodeId from ByteString.
|
NodeId(int namespaceIndex,
int value)
Create new NodeId.
|
NodeId(int namespaceIndex,
String value)
Create new NodeId.
|
NodeId(int namespaceIndex,
UnsignedInteger value)
Create new NodeId.
|
NodeId(int namespaceIndex,
UUID value)
Create new NodeId.
|
| Modifier and Type | Method and Description |
|---|---|
static NodeId[] |
arrayFrom(UaNodeId[] nodeIds,
NamespaceTable namespaceTable)
Converts an array of
UaNodeId to an array ofNodeId in the context of the given
NamespaceTable (effectively calling from(UaNodeId, NamespaceTable) for each
element). |
int |
compareTo(NodeId other) |
static NodeId |
decode(String nodeIdRef)
Deprecated.
Use parseNodeId() instead (renamed for method name consistency with other similar
classes)
|
boolean |
equals(ExpandedNodeId obj)
Deprecated.
use
NamespaceTable.nodeIdEquals(NodeId, ExpandedNodeId) instead. |
static boolean |
equals(NodeId left,
NodeId right)
Deprecated.
use
Objects.equals(Object, Object) instead. |
boolean |
equals(Object obj) |
static NodeId |
from(UaNodeId nodeId,
NamespaceTable namespaceTable)
Converts a
UaNodeId to NodeId in the context of a NamespaceTable. |
static NodeId |
get(IdType type,
int namespaceIndex,
Object value)
Constructs a NodeId per the given type.
|
IdType |
getIdType() |
int |
getNamespaceIndex() |
Object |
getValue()
Returns the value par of the NodeId, is UnsignedInteger, UUID, String, ByteString, or null.
|
int |
hashCode() |
static boolean |
isNull(NodeId nodeId)
Check if nodeId is null or a NullNodeId.
|
boolean |
isNullNodeId()
Whether the object represents a Null NodeId.
|
static NodeId |
parseNodeId(String nodeIdRef)
Convert String representation to NodeId.
|
static NodeId |
randomGUID(int namespaceIndex)
Create a new random NodeId.
|
String |
toString() |
NodeId |
withTranslatedNamespaces(UaNamespaceTranslateable.Context context)
Returns a deep copy of itself where all where every namespace index and uri plus server index
and uri (see
ExpandedNodeId, UaExpandedNodeId) has been swapped based on the
given UaNamespaceTranslateable.Context. |
@Deprecated public static final NodeId ZERO
NULL_NUMERIC instead.public static final NodeId NULL_NUMERIC
IdType.Numeric NodeId that is considered as null value.public static final NodeId NULL_STRING
IdType.String NodeId that is considered as null value.public static final NodeId NULL_GUID
IdType.Guid NodeId that is considered as null value.public static final NodeId NULL_OPAQUE
IdType.Opaque NodeId that is considered as null value.public static final NodeId NULL
NodeId null value that can be used when the NodeId IdType is not
defined. This is equal to NULL_NUMERIC.@Deprecated public static final NodeId ID
Identifiers.NodeId instead.public static final NodeId[] EMPTY_ARRAY
public NodeId(int namespaceIndex,
byte[] value)
ByteString.namespaceIndex - 0..65535value - byte[] or nullpublic NodeId(int namespaceIndex,
ByteString value)
namespaceIndex - namespaceIndex 0..65535value - ByteString, max length 4096 bytespublic NodeId(int namespaceIndex,
int value)
namespaceIndex - 0..65535value - the value should be a positive integer, as it is converted to an UnsignedIntegerpublic NodeId(int namespaceIndex,
String value)
namespaceIndex - 0..65535value - String or nullpublic NodeId(int namespaceIndex,
UnsignedInteger value)
namespaceIndex - 0..65535value - UnsignedIntegerpublic NodeId(int namespaceIndex,
UUID value)
namespaceIndex - 0..65535value - GUID valuepublic static NodeId[] arrayFrom(UaNodeId[] nodeIds, NamespaceTable namespaceTable)
UaNodeId to an array ofNodeId in the context of the given
NamespaceTable (effectively calling from(UaNodeId, NamespaceTable) for each
element). Returns null if given null array. Throws IllegalArgumentException if any
individual element conversion fails.@Deprecated public static NodeId decode(String nodeIdRef) throws IllegalArgumentException
The String representation is in the following notations: ns=[id];i=[number] i=[number]
ns=[id];s=[string] s=[string]
ns=[id];g=[guid] g=[guid]
ns=[id];b=[base64] b=[base64]
nodeIdRef - stringIllegalArgumentException - on error@Deprecated public static boolean equals(NodeId left, NodeId right)
Objects.equals(Object, Object) instead.public static NodeId from(UaNodeId nodeId, NamespaceTable namespaceTable)
UaNodeId to NodeId in the context of a NamespaceTable. Returns null
if given null. Throws IllegalArgumentException if the given NamespaceTable
doesn't contain the namespace uri of the given UaNodeId.getNamespaceUri().public static NodeId get(IdType type, int namespaceIndex, Object value)
public static boolean isNull(NodeId nodeId)
nodeId - the nodeIdpublic static NodeId parseNodeId(String nodeIdRef) throws IllegalArgumentException
The String representation is in the following notations: ns=[id];i=[number] i=[number]
ns=[id];s=[string] s=[string]
ns=[id];g=[guid] g=[guid]
ns=[id];b=[base64] b=[base64]
nodeIdRef - string format of node idIllegalArgumentException - if string notation is not correctpublic static NodeId randomGUID(int namespaceIndex)
namespaceIndex - namespace indexpublic int compareTo(NodeId other)
compareTo in interface Comparable<NodeId>@Deprecated public boolean equals(ExpandedNodeId obj)
NamespaceTable.nodeIdEquals(NodeId, ExpandedNodeId) instead.NamespaceTable.nodeIdEquals(NodeId, ExpandedNodeId)
when you wish to compare NodeId with ExpandedNodeId. For historical reasons
equals(Object) in some scenarios has worked with ExpandedNodeId, but this will
be removed in a future version (and the method starts to always return false in this case).public IdType getIdType()
public int getNamespaceIndex()
public Object getValue()
public boolean isNullNodeId()
public NodeId withTranslatedNamespaces(UaNamespaceTranslateable.Context context)
UaNamespaceTranslateableExpandedNodeId, UaExpandedNodeId) has been swapped based on the
given UaNamespaceTranslateable.Context. Returning the same object is allowed if the type is immutable and the
result is equal to this. Note that for Structure types if the
UaDataTypeSpecification translation is active the returned type can be of different
java class.withTranslatedNamespaces in interface UaNamespaceTranslateable<NodeId>Copyright © 2026. All rights reserved.