public class UaNodeId extends Object implements Comparable<UaNodeId>, UaNamespaceTranslateable<UaNodeId>
NodeId or local ExpandedNodeId. It can be converted
to both. Instances are created with the static factory methods. This class is considered to be
sealed.UaNamespaceTranslateable.Context| Modifier and Type | Method and Description |
|---|---|
static UaNodeId[] |
arrayFromLocal(ExpandedNodeId[] nodeIds)
Converts an array of
ExpandedNodeId to an array ofUaNodeId in the context of
the given NamespaceTable (effectively calling fromLocal(ExpandedNodeId) for
each element). |
static UaNodeId[] |
arrayFromLocal(ExpandedNodeId[] nodeIds,
NamespaceTable namespaceTable)
Converts an array of
ExpandedNodeId to an array ofUaNodeId in the context of
the given NamespaceTable (effectively calling
fromLocal(ExpandedNodeId, NamespaceTable) for each element). |
static UaNodeId[] |
arrayFromLocal(NodeId[] nodeIds,
NamespaceTable namespaceTable)
Converts an array of
NodeId to an array ofUaNodeId in the context of the given
NamespaceTable (effectively calling fromLocal(NodeId, NamespaceTable) for each
element). |
ExpandedNodeId |
asExpandedNodeId()
Converts this UaNodeId to
ExpandedNodeId. |
ExpandedNodeId |
asLocalExpandedNodeId()
Converts this UaNodeId to
ExpandedNodeId. |
NodeId |
asNodeId(NamespaceTable namespaceTable)
Converts this UaNodeId to
NodeId in the context of a NamespaceTable. |
int |
compareTo(UaNodeId other) |
boolean |
equals(Object obj) |
static UaNodeId |
from(String namespaceUri,
Object value)
Creates new UaNodeId from NamespaceUri and a value.
|
static UaNodeId |
from(UaNamespace namespace,
Object value)
Returns UaNodeId in the given
UaNamespace with the given value. |
static UaNodeId |
fromLocal(ExpandedNodeId expandedNodeId)
Converts a local
ExpandedNodeId to UaNodeId. |
static UaNodeId |
fromLocal(ExpandedNodeId expandedNodeId,
NamespaceTable namespaceTable)
Converts a local
ExpandedNodeId to UaNodeId. |
static UaNodeId |
fromLocal(NodeId nodeId,
NamespaceTable namespaceTable)
Converts a
NodeId to UaNodeId in the context of a NamespaceTable. |
static UaNodeId |
fromStandard(NodeId nodeId)
Converts a
NodeId from the Standard Namespace (i.e. |
IdType |
getIdType() |
UaNamespace |
getNamespace() |
String |
getNamespaceUri() |
Object |
getValue() |
String |
getValueAsParseForm()
Returns the value as String that can be parsed by
parse(String, String). |
static UaNodeId |
guid(UaNamespace namespace,
UUID value)
Convenience method for
from(UaNamespace, Object). |
int |
hashCode() |
static UaNodeId |
numeric(UaNamespace namespace,
long value)
Convenience method for
numeric(UaNamespace, UnsignedInteger), where the given value is
given to UnsignedInteger.valueOf(long). |
static UaNodeId |
numeric(UaNamespace namespace,
UnsignedInteger value)
Convenience method for
from(UaNamespace, Object). |
static UaNodeId |
opaque(UaNamespace namespace,
ByteString value)
Convenience method for
from(UaNamespace, Object). |
static UaNodeId |
parse(String encodedUaNodeId)
Returns
UaNodeId that matches the given encoded string that has been previously output
by toString(). |
static UaNodeId |
parse(String namespaceUri,
String valueAsParseForm)
Creates new UaNodeId from NamespaceUri and a value.
|
static UaNodeId |
parse(UaNamespace namespace,
String valueAsParseForm)
Creates new UaNodeId from namespace and a value.
|
static UaNodeId |
string(UaNamespace namespace,
String value)
Convenience method for
from(UaNamespace, Object). |
String |
toString() |
UaNodeId |
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. |
public static UaNodeId[] arrayFromLocal(ExpandedNodeId[] nodeIds)
ExpandedNodeId to an array ofUaNodeId in the context of
the given NamespaceTable (effectively calling fromLocal(ExpandedNodeId) for
each element). Returns null if given null array. Throws IllegalArgumentException if any
individual element conversion fails.public static UaNodeId[] arrayFromLocal(ExpandedNodeId[] nodeIds, NamespaceTable namespaceTable)
ExpandedNodeId to an array ofUaNodeId in the context of
the given NamespaceTable (effectively calling
fromLocal(ExpandedNodeId, NamespaceTable) for each element). Returns null if given
null array. Throws IllegalArgumentException if any individual element conversion fails.public static UaNodeId[] arrayFromLocal(NodeId[] nodeIds, NamespaceTable namespaceTable)
NodeId to an array ofUaNodeId in the context of the given
NamespaceTable (effectively calling fromLocal(NodeId, NamespaceTable) for each
element). Returns null if given null array. Throws IllegalArgumentException if any
individual element conversion fails.public static UaNodeId from(String namespaceUri, Object value)
public static UaNodeId from(UaNamespace namespace, Object value)
UaNamespace with the given value.public static UaNodeId fromLocal(ExpandedNodeId expandedNodeId)
ExpandedNodeId to UaNodeId. Returns null if given null. The
ExpanededNodeId must have the namespace uri specified and ExpandedNodeId.isLocal() must
be true, otherwise an IllegalArgumentException is thrown.expandedNodeId - the ExpandedNodeId to convert.IllegalArgumentException - if the given ExpandedNodeId does not have uri definedpublic static UaNodeId fromLocal(ExpandedNodeId expandedNodeId, NamespaceTable namespaceTable)
ExpandedNodeId to UaNodeId. The ExpanededNodeId can have either the
namespace uri or index specified. Returns null if given null. ExpandedNodeId.isLocal()
must be true, otherwise an IllegalArgumentException is thrown. ExpandedNodeId has the namespace uri defined, it is used as-is. In case the uri
is not defined, the index is seached from the given NamespaceTable and that uri is
used. If not found, IllegalArgumentException is thrown.expandedNodeId - the ExpandedNodeId to convert.namespaceTable - NamespaceTable used for conversion if namespaceindex defined.IllegalArgumentException - if the given ExpandedNodeId does not have uri definedpublic static UaNodeId fromLocal(NodeId nodeId, NamespaceTable namespaceTable)
NodeId to UaNodeId in the context of a NamespaceTable. Returns null
if given null.nodeId - the NodeId to convertnamespaceTable - a NamespaceTablepublic static UaNodeId fromStandard(NodeId nodeId)
NodeId from the Standard Namespace (i.e. having NamespaceIndex of 0) to
UaNodeId.nodeId - NodeId, for which NodeId.getNamespaceIndex() equals 0.IllegalArgumentException - if the given NodeId has any other NamespaceIndex than 0.public static UaNodeId guid(UaNamespace namespace, UUID value)
from(UaNamespace, Object).public static UaNodeId numeric(UaNamespace namespace, long value)
numeric(UaNamespace, UnsignedInteger), where the given value is
given to UnsignedInteger.valueOf(long).public static UaNodeId numeric(UaNamespace namespace, UnsignedInteger value)
from(UaNamespace, Object).public static UaNodeId opaque(UaNamespace namespace, ByteString value)
from(UaNamespace, Object).public static UaNodeId parse(String encodedUaNodeId)
UaNodeId that matches the given encoded string that has been previously output
by toString(). The format is the same as
ExpandedNodeId.parseExpandedNodeId(String), but only the namespaceuri version is
supported and the server index shall not be defined.public static UaNodeId parse(String namespaceUri, String valueAsParseForm)
getValueAsParseForm().public static UaNodeId parse(UaNamespace namespace, String valueAsParseForm)
getValueAsParseForm().public static UaNodeId string(UaNamespace namespace, String value)
from(UaNamespace, Object).public ExpandedNodeId asExpandedNodeId()
ExpandedNodeId.public ExpandedNodeId asLocalExpandedNodeId()
ExpandedNodeId. The ExpandedNodeId has uri defined.public NodeId asNodeId(NamespaceTable namespaceTable)
NodeId in the context of a NamespaceTable.namespaceTable - a namespace tableIllegalArgumentException - if the serverUri is defined for this UaNodeId OR the given
namespacetable does not contain mapping for the namespace uri of this UaNodeIdpublic int compareTo(UaNodeId other)
compareTo in interface Comparable<UaNodeId>public IdType getIdType()
public UaNamespace getNamespace()
public String getNamespaceUri()
public Object getValue()
public String getValueAsParseForm()
parse(String, String).public UaNodeId 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<UaNodeId>Copyright © 2026. All rights reserved.