public class UaNodeSet extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UaNodeSet.Log
An immutable collection of log events.
|
static class |
UaNodeSet.ModelInfo
Contains the Models/Model info that is typically at the start of a Nodeset file.
|
static class |
UaNodeSet.NodeData
Holds data for a single node.
|
static class |
UaNodeSet.ReferenceData
Holds data for a single (in one direction) reference.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getAliases()
Returns an unmodifiable Map of the Aliases defined in the model.
|
Set<UaNamespace> |
getDependencyNamespaces()
Returns OPC UA namespaces this model depends on as an unmodifiable Set.
|
UaNodeSet.Log |
getLog()
Returns
UaNodeSet.Log that was created during loading. |
List<UaNodeSet.ModelInfo> |
getModelInfos()
Returns unmodifiable list of Model-infos defined in the model.
|
List<UaNamespace> |
getNamespaces()
Returns OPC UA namespaces used by the model either as dependency or provided by the model.
|
Map<UaNodeId,UaNodeSetExtensions> |
getNodeExtensions()
Returns an unmodifiable
Map of node to contents of the Extensions xml element. |
Set<UaNodeSet.NodeData> |
getNodes()
Returns all nodes loaded from the model.
|
Map<NodeClass,List<UaNodeSet.NodeData>> |
getNodesByNodeClass()
Convenience method for
getNodes() that groups the nodes by NodeClass. |
Set<UaNodeSet.NodeData> |
getNodesWithLogLevels(UaNodeSet.Log.Event.Level... levels)
Returns an unmodifiable
Set of all getNodes() that have log of the given
levels. |
Set<UaNamespace> |
getProvidedNamespaces()
Returns OPC UA namespaces this model provides on as an unmodifiable Set.
|
Set<UaNodeSet.ReferenceData> |
getReferences()
Returns all references loaded from the model.
|
Set<AddNodesItem> |
nodesToAddNodesItem(EncoderContext target)
Converts the
getNodes() data to AddNodesItem data the context of the given
EncoderContext. |
static UaNodeSet |
parseXml(InputStream modelSource)
Parse the given NodeSet2 XML document from the given
InputStream to UaNodeSet. |
static UaNodeSet |
parseXml(InputStream modelSource,
Charset charset)
Parse the given NodeSet2 XML document from the given
InputStream to UaNodeSet
using the given Charset. |
Set<AddReferencesItem> |
referencesToAddReferencesItem(EncoderContext target)
Converts the
getReferences() data to AddReferencesItem data the context of the
given EncoderContext. |
String |
toXml()
Returns the data in NodeSet format.
|
public static UaNodeSet parseXml(InputStream modelSource) throws UaNodeSetException
InputStream to UaNodeSet.
Assumes UTF-8 encoding.UaNodeSetExceptionpublic static UaNodeSet parseXml(InputStream modelSource, Charset charset) throws UaNodeSetException
InputStream to UaNodeSet
using the given Charset. If the given Charset is null,
StandardCharsets.UTF_8 is used.UaNodeSetExceptionpublic Map<String,String> getAliases()
public Set<UaNamespace> getDependencyNamespaces()
getNamespaces() minus getProvidedNamespaces().public UaNodeSet.Log getLog()
UaNodeSet.Log that was created during loading.public List<UaNodeSet.ModelInfo> getModelInfos()
public List<UaNamespace> getNamespaces()
UaNamespace.STANDARD as the first entry, as every model
implicitly has that as the "0 index". Note that the index of the namespaces match the indexes
used within the model, but the indexes used by the UaServer are a separate mapping
NamespaceTable. The returned List is unmodifiable.public Map<UaNodeId,UaNodeSetExtensions> getNodeExtensions()
Map of node to contents of the Extensions xml element.public Set<UaNodeSet.NodeData> getNodes()
public Map<NodeClass,List<UaNodeSet.NodeData>> getNodesByNodeClass()
getNodes() that groups the nodes by NodeClass. The returned Map
and the Lists within the Map are unmodifiable.public Set<UaNodeSet.NodeData> getNodesWithLogLevels(UaNodeSet.Log.Event.Level... levels)
Set of all getNodes() that have log of the given
levels. Given null/empty is treated same as UaNodeSet.Log.Event.Level.values(), i.e. returns all
UaNodeSet.NodeData that have any log entries. Node-specific log can be obtained via
UaNodeSet.NodeData.getLog().public Set<UaNamespace> getProvidedNamespaces()
public Set<UaNodeSet.ReferenceData> getReferences()
public Set<AddNodesItem> nodesToAddNodesItem(EncoderContext target)
getNodes() data to AddNodesItem data the context of the given
EncoderContext. IMPORTANT! Calling this method manual is an advanced use-case and shall only be
done if this model doesn't define any new DataTypes.public Set<AddReferencesItem> referencesToAddReferencesItem(EncoderContext target)
getReferences() data to AddReferencesItem data the context of the
given EncoderContext. IMPORTANT! Calling this method manual is an advanced use-case and shall
only be done if this model doesn't define any new DataTypes.public String toXml()
Copyright © 2026. All rights reserved.