public interface UaAddressSpace
The main use-case for this interface is to offer somewhat common interface for accessing UaNodes on both the client and the server side.
NOTE! This interface tries to offer methods that AddressSpace (client side) and NodeManagerTable (server side) have. Note that there is some differences on returning null values and throwing exceptions, therefore it is better to use the concrete implementation classes returned by UaClient or UaServer getAddressSpace method, if possible.
NOTE! This interface is not designed to be implemented by SDK users, e.g. methods can be added to it.
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(UaNode node)
Add a (@link UaNode) to the address space.
|
UaNode |
findNode(NodeId id)
Find a (@link UaNode) corresponding to the given
NodeId. |
DataTypeConverter |
getDataTypeConverter()
Returns the
DataTypeConverter. |
EncoderContext |
getEncoderContext()
Returns the
EncoderContext. |
NamespaceTable |
getNamespaceTable()
Return the (@link NamespaceTable) associated with the (@link UaAddressSpace).
|
UaNode |
getNode(ExpandedNodeId nodeId)
Convenience method for
getNode(NodeId) that accepts ExpandedNodeId. |
<T extends UaNode> |
getNode(ExpandedNodeId nodeId,
Class<T> clazz)
Convenience method for
getNode(ExpandedNodeId) that converts the results to given
class. |
UaNode |
getNode(NodeId nodeId)
Find the UaNode object, corresponding to the NodeId.
|
<T extends UaNode> |
getNode(NodeId nodeId,
Class<T> clazz)
Convenience method for
getNode(NodeId) that converts the results to given class. |
UaNode |
getNode(UaNodeId nodeId)
Convenience method for
getNode(NodeId) that accepts UaNodeId. |
<T extends UaNode> |
getNode(UaNodeId nodeId,
Class<T> clazz)
Convenience method for
getNode(UaNodeId) that converts the results to given class. |
FolderType |
getObjectsFolder()
Returns the UaNode for
UaObjectIds.ObjectsFolder. |
FolderType |
getRoot()
Returns the UaNode for
UaObjectIds.RootFolder. |
void |
loadModel(InputStream inputStream)
Load an Information Model into the application's address space.
|
void |
loadModel(URI path)
Load an Information Model into the application's address space.
|
BrowsePathTarget[] |
translateBrowsePathToNodeIds(NodeId startingNode,
RelativePath relativePath)
Request the NodeIds for the nodes that are references from the startingNode using the given
path.
|
DataTypeConverter getDataTypeConverter()
DataTypeConverter.EncoderContext getEncoderContext()
EncoderContext.UaNode getNode(ExpandedNodeId nodeId) throws UaException
getNode(NodeId) that accepts ExpandedNodeId.UaException<T extends UaNode> T getNode(ExpandedNodeId nodeId, Class<T> clazz) throws UaException
getNode(ExpandedNodeId) that converts the results to given
class.UaExceptionUaNode getNode(NodeId nodeId) throws UaException
NOTE! It is implementation specific what happens if there is no UaNode instance for given NodeId or given NodeId is null or NodeId.NULL
nodeId - the NodeIdUaException - possible error<T extends UaNode> T getNode(NodeId nodeId, Class<T> clazz) throws UaException
getNode(NodeId) that converts the results to given class.UaExceptionUaNode getNode(UaNodeId nodeId) throws UaException
getNode(NodeId) that accepts UaNodeId.UaException<T extends UaNode> T getNode(UaNodeId nodeId, Class<T> clazz) throws UaException
getNode(UaNodeId) that converts the results to given class.UaExceptionFolderType getObjectsFolder() throws UaException
UaObjectIds.ObjectsFolder.UaExceptionFolderType getRoot() throws UaException
UaObjectIds.RootFolder.UaExceptionvoid loadModel(InputStream inputStream) throws SAXException, IOException, ModelException, ServiceException
Load nodes and references from an UA NodeSet file. The file must conform to the UANodeSet schema, http://opcfoundation.org/UA/2011/03/UANodeSet.xsd
inputStream - The stream that contains the XML node set.ModelException - if there is a problem with the model and it cannot be fully created. The
exception is thrown with and errorList of all errors found in the file.SAXException - if the required XMLReaded cannot be created.IOException - if the model file cannot be read.ServiceException - if the AddNodes service call to the server failsvoid loadModel(URI path) throws SAXException, IOException, ModelException, ServiceException
Load nodes and references from an UA NodeSet file. The file must conform to the UANodeSet schema, http://opcfoundation.org/UA/2011/03/UANodeSet.xsd
path - The path to the XML file. You can create an URI from a File name with
File.toURI()ModelException - if there is a problem with the model and it cannot be fully created. The
exception is thrown with and errorList of all errors found in the file.SAXException - if the required XMLReaded cannot be created.IOException - if the model file cannot be read.ServiceException - if the AddNodes service call to the server failsBrowsePathTarget[] translateBrowsePathToNodeIds(NodeId startingNode, RelativePath relativePath) throws StatusException, ServiceException
startingNode - the node from where to start.relativePath - the path from the node to follow.UnsignedInteger.MAX_VALUE.ServiceException - if call failedStatusException - if call failedvoid addNode(UaNode node)
node - that is addedUaNode findNode(NodeId id)
NodeId. Effectively this is the same
as getNode(NodeId), but returns null if it would have thrown.NamespaceTable getNamespaceTable()
Copyright © 2026. All rights reserved.