public interface UaNode
The interface defines common functionality of all UA nodes, according to the UA specification.
All nodes define the attributes: NodeClass, NodeId, BrowseName, DisplayName and Description, WriteMask, UserWriteMask. They can also have References to other nodes and Properties.
There is one common property, which is optional, though, NodeVersion.
All nodes also support readAttribute, which can be used to read any attribute value and writeAttribute to (attempt to) set any attribute value.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
UaNode.Parameters
Internal parameters to be used when constructing
UaNode instances. |
| Modifier and Type | Method and Description |
|---|---|
UaReference |
addComponent(UaNode node)
Adds a new component to the Node.
|
default UaReference |
addOrganizes(UaNode target)
Convenience method for adding Organizes reference from this node to the given target node.
|
UaReference |
addProperty(UaProperty property)
Add a new property node to the node.
|
default UaReference |
addReference(ExpandedNodeId nodeId,
NodeId referenceTypeId)
Convenience method for
addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId. |
UaReference |
addReference(ExpandedNodeId nodeId,
NodeId referenceTypeId,
boolean isInverse)
Convenience method for
addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId. |
default UaReference |
addReference(NodeId nodeId,
NodeId referenceTypeId)
Adds a new reference of the specified type to the specified node.
|
UaReference |
addReference(NodeId nodeId,
NodeId referenceTypeId,
boolean isInverse)
Adds a new reference of the specified type to the specified node.
|
default UaReference |
addReference(UaNode targetNode,
NodeId referenceTypeId)
Add a reference to the node.
|
UaReference |
addReference(UaNode targetNode,
NodeId referenceTypeId,
boolean isInverse)
Add a reference to the node.
|
UaReference |
deleteReference(ExpandedNodeId targetNodeId,
NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node.
|
UaReference |
deleteReference(NodeId targetNodeId,
NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node.
|
UaReference |
deleteReference(UaNode targetNode,
NodeId referenceTypeId,
boolean isInverse)
Delete a reference from the node.
|
UaReference |
deleteReference(UaReference reference)
Delete a reference from the node.
|
UaAddressSpace |
getAddressSpace()
Returns the (@link UaAddressSpace) of the (@link UaNode).
|
NodeAttributes |
getAttributes()
Returns the current attribute values of the node in a NodeAttributes structure.
|
Map<UnsignedInteger,Object> |
getAttributesMap()
Returns an unmodifiable
Map containing the Attributes of the node. |
QualifiedName |
getBrowseName()
Nodes have a BrowseName Attribute that is used as a non-localised human-readable name when
browsing the AddressSpace to create paths out of BrowseNames.
|
default List<BrowsePath> |
getBrowsePaths()
Get all BrowsePaths to this node, from the Parents of the node.
|
UaNode |
getComponent(QualifiedName componentName)
Get the component, which has the specified name.
|
UaNode[] |
getComponents()
Get a list of components of this node, i.e.
|
LocalizedText |
getDescription()
The optional Description Attribute shall explain the meaning of the Node in a localized text
using the same mechanisms for localization as described for the DisplayName.
|
LocalizedText |
getDisplayName()
The DisplayName Attribute contains the localised name of the Node.
|
UaReference[] |
getForwardReferences(NodeId... referenceTypeIds)
Get all forward references of this node.
|
UaReference[] |
getInverseReferences(NodeId... referenceTypeIds)
Get all inverse references of this node.
|
UaMethod |
getMethod(QualifiedName methodName)
Get the method, which has the specified name.
|
NodeClass |
getNodeClass()
The NodeClass Attribute identifies the NodeClass of a Node.
|
NodeId |
getNodeId()
Nodes are unambiguously identified using a constructed identifier called the NodeId.
|
UaProperty |
getNodeVersionNode()
Returns the NodeVersion property.
|
default UaNode |
getOrganizedNode(QualifiedName browseName)
Returns first match of
getOrganizedNodes() whose getBrowseName()
matches the given BrowseName. |
default UaNode[] |
getOrganizedNodes()
Returns all nodes that are the targets of all forward Organizes References from this node.
|
UaProperty[] |
getProperties()
Returns all properties of the node or null if none defined.
|
UaProperty |
getProperty(QualifiedName name)
Find the property with the specified name.
|
UaReference |
getReference(NodeId referenceTypeId,
boolean isInverse)
Finds the first reference of the specified reference type.
|
UaReference[] |
getReferences()
Returns all references of the Node.
|
UaReference[] |
getReferences(NodeId referenceTypeId,
boolean isInverse)
Finds all references of the specified reference type.
|
UnsignedInteger[] |
getSupportedAttributes()
Returns the list of attributes supported by this node class.
|
default List<UaBrowsePath> |
getUaBrowsePaths()
Get all BrowsePaths to this node, from the Parents of the node.
|
default UaNodeId |
getUaNodeId()
Returns
getNodeId() as UaNodeId (which has the NamespaceUri instead of
NamespaceIndex). |
Object |
getUserData()
Returns the user data for the UaNode.
|
AttributeWriteMask |
getUserWriteMask()
The optional UserWriteMask Attribute exposes the possibilities of a client to write the
Attributes of the Node taking user access rights into account.
|
AttributeWriteMask |
getWriteMask()
The optional WriteMask Attribute exposes the possibilities of a client to write the Attributes
of the Node.
|
boolean |
hasUserWriteAccess(UnsignedInteger attributeId)
Checks additional user access rights to the node.
|
boolean |
hasWriteAccess(UnsignedInteger attributeId)
Check the common access rights of a node attribute.
|
DataValue |
readAttribute(UnsignedInteger attributeId)
Read the current value of an attribute.
|
void |
readAttribute(UnsignedInteger attributeId,
DataValue dataValue,
Locale locale) |
UaNode |
removeComponent(UaNode component)
Remove a component reference from the node.
|
UaProperty |
removeProperty(QualifiedName name)
Remove the property with the specified name.
|
void |
setAttribute(UnsignedInteger attributeId,
DataValue dataValue)
Unconditionally, set the value of the specified attribute.
|
void |
setAttributes(NodeAttributes nodeAttributes)
Sets the attributes of the node.
|
void |
setBrowseName(QualifiedName browseName)
Sets the BrowseName Attribute of the node.
|
void |
setDescription(LocalizedText description)
Sets the Description Attribute of the node.
|
void |
setDisplayName(LocalizedText displayName)
Sets the DisplayName Attribute of the node.
|
void |
setReferences(UaReference[] references)
Set all references of the node at one call.
|
void |
setUserData(Object userData)
Sets the user data for the UaNode.
|
void |
setUserWriteMask(AttributeWriteMask userWriteMask)
Sets the UserWriteMask Attribute of the node.
|
void |
setWriteMask(AttributeWriteMask writeMask)
Sets the WriteMask Attribute of the node.
|
boolean |
supportsAttribute(UnsignedInteger attributeId)
Check if the node supports the specified attribute.
|
boolean |
writeAttribute(UnsignedInteger attributeId,
DataValue dataValue)
Write the attribute value in a node.
|
UaReference addComponent(UaNode node)
Depending on the background implementation, the component node may also get added.
This is a shortcut for
addReference(component, Identifiers.HasComponent, false);
node - the component nodeIllegalArgumentException - if the node is not of the correct class (see above)addReference(UaNode, NodeId, boolean)default UaReference addOrganizes(UaNode target)
UaReference addProperty(UaProperty property)
Adds a new forward HasProperty reference with target to the property node.
property - the property to add to the nodedefault UaReference addReference(ExpandedNodeId nodeId, NodeId referenceTypeId)
addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId. This is same as calling "addReference(nodeId, referenceTypeId, false)", i.e.
this convenience method always adds the reference as forward.nodeId - The target nodereferenceTypeId - The reference typeUaReference addReference(ExpandedNodeId nodeId, NodeId referenceTypeId, boolean isInverse)
addReference(NodeId, NodeId, boolean) that uses ExpandedNodeId
instead of NodeId.nodeId - The target nodereferenceTypeId - The reference typeisInverse - Whether the reference is an inverse reference (or forward, if isInverse=false)default UaReference addReference(NodeId nodeId, NodeId referenceTypeId)
nodeId - The target node of the referencereferenceTypeId - The reference typeUaReference addReference(NodeId nodeId, NodeId referenceTypeId, boolean isInverse)
nodeId - The target node of the referencereferenceTypeId - The reference typeisInverse - Whether the reference is an inverse reference (or forward, if isInverse=false)default UaReference addReference(UaNode targetNode, NodeId referenceTypeId)
targetNode - The target node where the reference points to.referenceTypeId - The type of reference.UaReference addReference(UaNode targetNode, NodeId referenceTypeId, boolean isInverse)
targetNode - The target node where the reference points to.referenceTypeId - The type of reference.isInverse - Whether the reference is an inverse reference.UaReference deleteReference(ExpandedNodeId targetNodeId, NodeId referenceTypeId, boolean isInverse)
targetNodeId - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.UaReference deleteReference(NodeId targetNodeId, NodeId referenceTypeId, boolean isInverse)
targetNodeId - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.UaReference deleteReference(UaNode targetNode, NodeId referenceTypeId, boolean isInverse)
targetNode - The target node of the reference.referenceTypeId - The exact type of reference.isInverse - Whether to remove a forward reference. If false, deletes an inverse reference
only.UaReference deleteReference(UaReference reference)
reference - The reference to delete.UaAddressSpace getAddressSpace()
NodeAttributes getAttributes()
Map<UnsignedInteger,Object> getAttributesMap()
Map containing the Attributes of the node. The key is the
AttributeId (listed in Attributes) and the value is the Attribute value. NOTE! For
mutable Attribute value types (e.g. Value, ArrayDimensions) the value is a clone of the
original.QualifiedName getBrowseName()
A BrowseName should never be used to display the name of a Node. The DisplayName should be used instead for this purpose.
Unlike NodeIds, the BrowseName cannot be used to unambiguously identify a Node. Different Nodes may have the same BrowseName.
default List<BrowsePath> getBrowsePaths()
UaBrowsePath.getStartingNode() pointing to this node and
UaBrowsePath.getRelativePath() representing an empty path.
The BrowsePath is composed by following inverse Aggregates references to find the node that owns this node originally. This is typically used to "reverse engineer" the structure of an Object, Variable, ObjectType or VariableType.
The BrowsePath can be used in the UaAddressSpace.translateBrowsePathToNodeIds(com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.core.RelativePath) service
to look for a corresponding node in another Object, Variable, ObjectType or VariableType.
UaNode getComponent(QualifiedName componentName)
componentName - the BrowseName of the component to getUaNode[] getComponents()
LocalizedText getDescription()
LocalizedText getDisplayName()
The string part of the DisplayName is restricted to 512 characters.
UaReference[] getForwardReferences(NodeId... referenceTypeIds)
referenceTypeIds - the reference types that are used to filter the set.getInverseReferences(NodeId...),
getReferences(NodeId, boolean),
getReferences(),
getReference(NodeId, boolean)UaReference[] getInverseReferences(NodeId... referenceTypeIds)
referenceTypeIds - the reference types that are used to filter the set.getForwardReferences(NodeId...),
getReferences(NodeId, boolean),
getReferences(),
getReference(NodeId, boolean)UaMethod getMethod(QualifiedName methodName) throws ClassCastException
methodName - the BrowseName (in namespace 0) of the method to getClassCastException - if the node is not a method nodeNodeClass getNodeClass()
NodeId getNodeId()
UaProperty getNodeVersionNode()
default UaNode getOrganizedNode(QualifiedName browseName)
getOrganizedNodes() whose getBrowseName()
matches the given BrowseName. Returns null if there is no match. Note that if more than one
node matches, the return can be ambiguous depending on the reference ordering.default UaNode[] getOrganizedNodes()
UaProperty[] getProperties()
UaProperty getProperty(QualifiedName name)
name - the name of the propertyUaReference getReference(NodeId referenceTypeId, boolean isInverse)
referenceTypeId - the reference type to search (or null to accept any)isInverse - To search for inverse reference, instead of non-inverse (applied also if null
referenceType is defined)UaReference[] getReferences()
UaReference[] getReferences(NodeId referenceTypeId, boolean isInverse)
referenceTypeId - the reference type to search (or null to accept any)isInverse - To search for inverse reference, instead of non-inverse (applied also if null
referenceType is defined)UnsignedInteger[] getSupportedAttributes()
default List<UaBrowsePath> getUaBrowsePaths()
UaBrowsePath.getStartingNode() pointing to this node and
UaBrowsePath.getRelativePath() representing an empty path.
The BrowsePath is composed by following inverse Aggregates references to find the node that owns this node originally. This is typically used to "reverse engineer" the structure of an Object, Variable, ObjectType or VariableType.
The BrowsePath can be used in the UaAddressSpace.translateBrowsePathToNodeIds(com.prosysopc.ua.stack.builtintypes.NodeId, com.prosysopc.ua.stack.core.RelativePath) service
to look for a corresponding node in another Object, Variable, ObjectType or VariableType.
default UaNodeId getUaNodeId()
getNodeId() as UaNodeId (which has the NamespaceUri instead of
NamespaceIndex).Object getUserData()
UaAddressSpace.getNode and cached instances have expired. Therefore, the caller of getUserData
and setUserData(java.lang.Object) methods must make sure the same UaNode instance is used when calling
the methods.AttributeWriteMask getUserWriteMask()
The UserWriteMask Attribute can only further restrict the WriteMask Attribute, when it is set to not writable in the general case that applies for every user.
AttributeWriteMask getWriteMask()
boolean hasUserWriteAccess(UnsignedInteger attributeId)
The access rights are checked by default in writeAttribute.
attributeId - the attribute to checkboolean hasWriteAccess(UnsignedInteger attributeId)
The access rights are checked by default in writeAttribute.
attributeId - the attribute to checkDataValue readAttribute(UnsignedInteger attributeId)
attributeId - the attribute to read - the valid values are defined in
Attributes. Also check
supportsAttribute(UnsignedInteger) whether the node actually supports this
attribute type.supportsAttribute(UnsignedInteger)void readAttribute(UnsignedInteger attributeId, DataValue dataValue, Locale locale)
UaNode removeComponent(UaNode component)
This is a shortcut for
deleteReference(component, Identifiers.HasComponent, false);
Note that the method does not remove the component - it only removes the reference to it.
component - the component node to removedeleteReference(UaNode, NodeId, boolean)UaProperty removeProperty(QualifiedName name)
name - the name of the propertyvoid setAttribute(UnsignedInteger attributeId, DataValue dataValue) throws StatusException
To check the access rights and that the attribute is supported by the node, use writeAttribute.
The method calls the internal, overridable, writeAttributeValue.
StatusExceptionvoid setAttributes(NodeAttributes nodeAttributes)
void setBrowseName(QualifiedName browseName)
void setDescription(LocalizedText description)
void setDisplayName(LocalizedText displayName)
void setReferences(UaReference[] references)
Use addReference(com.prosysopc.ua.stack.builtintypes.ExpandedNodeId, com.prosysopc.ua.stack.builtintypes.NodeId) to add new references to the node.
references - the references to setgetReferences(),
getReference(NodeId, boolean)void setUserData(Object userData)
UaAddressSpace.getNode and cached instances have expired. Therefore, the caller of
getUserData() and setUserData methods must make sure the same UaNode instance is used
when calling the methods.userData - the user datavoid setUserWriteMask(AttributeWriteMask userWriteMask)
void setWriteMask(AttributeWriteMask writeMask)
boolean supportsAttribute(UnsignedInteger attributeId)
Use the method to check if the node object you have is actually supporting a specific UA
Attribute. The supported attributes are available from specific Java properties, and the values
can also be read with readAttribute(com.prosysopc.ua.stack.builtintypes.UnsignedInteger).
attributeId - the attribute to check - the valid values are defined in
Attributesboolean writeAttribute(UnsignedInteger attributeId, DataValue dataValue) throws StatusException
attributeId - the attribute to write - the valid values are defined in
AttributesdataValue - the new value, if this is null, the status of the attribute is set to
StatusCode.BAD, otherwise the status and value are used from itStatusException - if the write is not accepted (for above mentioned reasons)supportsAttribute(UnsignedInteger)Copyright © 2026. All rights reserved.