com.prosysopc.ua
Class UaNodeId

java.lang.Object
  extended by com.prosysopc.ua.UaNodeId

public class UaNodeId
extends Object

This class models an OPC UA NodeId or local ExpandedNodeId. It can be converted to both.


Method Summary
 org.opcfoundation.ua.builtintypes.ExpandedNodeId asExpandedNodeId()
          Converts this UaNodeId to ExpandedNodeId.
 org.opcfoundation.ua.builtintypes.ExpandedNodeId asLocalExpandedNodeId()
          Converts this UaNodeId to ExpandedNodeId.
 org.opcfoundation.ua.builtintypes.NodeId asNodeId(org.opcfoundation.ua.common.NamespaceTable namespaceTable)
          Converts this UaNodeId to NodeId in the context of a NamespaceTable.
 boolean equals(Object obj)
           
static UaNodeId from(String namespaceUri, Object value)
          Creates new UaNodeId from NamespaceUri and a value.
static UaNodeId fromLocal(org.opcfoundation.ua.builtintypes.ExpandedNodeId expandedNodeId)
          Converts an ExpandedNodeId to UaNodeId.
static UaNodeId fromLocal(org.opcfoundation.ua.builtintypes.NodeId nodeId, org.opcfoundation.ua.common.NamespaceTable namespaceTable)
          Converts a NodeId to UaNodeId in the context of a NamespaceTable.
 org.opcfoundation.ua.core.IdType getIdType()
           
 String getNamespaceUri()
           
 Object getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

from

public static UaNodeId from(String namespaceUri,
                            Object value)
Creates new UaNodeId from NamespaceUri and a value.

Parameters:
namespaceUri - The NamespaceUri for the Namespace (namespace part of the NodeId).
value - The value part of the NodeId. Accepts same inputs as NodeId
Returns:
the new UaNodeId;

fromLocal

public static UaNodeId fromLocal(org.opcfoundation.ua.builtintypes.ExpandedNodeId expandedNodeId)
Converts an ExpandedNodeId to UaNodeId. The ExpanededNodeId must have the namespace uri specified and ExpandedNodeId.isLocal() must be true, otherwise an IllegalArgumentException is thrown.

Parameters:
expandedNodeId - the ExpandedNodeId to convert.
Returns:
new UaNodeId
Throws:
IllegalArgumentException - if the given ExpandedNodeId does not have uri defined

fromLocal

public static UaNodeId fromLocal(org.opcfoundation.ua.builtintypes.NodeId nodeId,
                                 org.opcfoundation.ua.common.NamespaceTable namespaceTable)
Converts a NodeId to UaNodeId in the context of a NamespaceTable. The given NamespaceTable must contain the uri to index mapping for the given NodeId, otherwise an IllegalArgumentException is thrown.

Parameters:
nodeId - the NodeId to convert
namespaceTable - a NamespaceTable
Returns:
new UaNodeId
Throws:
IllegalArgumentException - if the namespacetable does contain the mapping for the index of the given nodeId

asExpandedNodeId

public org.opcfoundation.ua.builtintypes.ExpandedNodeId asExpandedNodeId()
Converts this UaNodeId to ExpandedNodeId.

Returns:
new ExpandedNodeId with uri defined.

asLocalExpandedNodeId

public org.opcfoundation.ua.builtintypes.ExpandedNodeId asLocalExpandedNodeId()
Converts this UaNodeId to ExpandedNodeId. The ExpandedNodeId has uri defined.

Returns:
new ExpandedNodeId with uri defined.

asNodeId

public org.opcfoundation.ua.builtintypes.NodeId asNodeId(org.opcfoundation.ua.common.NamespaceTable namespaceTable)
Converts this UaNodeId to NodeId in the context of a NamespaceTable.

Parameters:
namespaceTable - a namespace table
Returns:
new NodeId
Throws:
IllegalArgumentException - if the serverUri is defined for this UaNodeId OR the given namespacetable does not contain mapping for the namespace uri of this UaNodeId

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getIdType

public org.opcfoundation.ua.core.IdType getIdType()

getNamespaceUri

public String getNamespaceUri()

getValue

public Object getValue()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018. All rights reserved.