Record Class ExpandedNodeId
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA reference to a namespace, either by index or URI.static interfaceA reference to a server, either by index or URI. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExpandedNodeId(ExpandedNodeId.ServerReference server, ExpandedNodeId.NamespaceReference namespace, Object identifier) Creates an instance of aExpandedNodeIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionabsolute(NamespaceTable namespaceTable) Convert thisExpandedNodeIdto an absolute ExpandedNodeId if not already.absolute(ServerTable serverTable, NamespaceTable namespaceTable) final booleanIndicates whether some other object is "equal to" this one.booleanCheck if thisExpandedNodeIdis equal tonodeId.booleanequalTo(NodeId nodeId, NamespaceTable namespaceTable) Check if thisExpandedNodeIdis equal tonodeId.@Nullable UShort@Nullable UShortgetNamespaceIndex(NamespaceTable namespaceTable) @Nullable String@Nullable StringgetNamespaceUri(NamespaceTable namespaceTable) @Nullable UInteger@Nullable UIntegergetServerIndex(ServerTable serverTable) @Nullable String@Nullable StringgetServerUri(ServerTable serverTable) getType()Get theIdTypeof thisExpandedNodeId's identifier.final inthashCode()Returns a hash code value for this object.Returns the value of theidentifierrecord component.booleanCheck if thisExpandedNodeIdis absolute, i.e. it is defined in terms of a namespace URI rather than a namespace index.booleanisLocal()Check if thisExpandedNodeIdis local, i.e. the server is defined in terms of a server index, and that index is 0.booleanisLocal(ServerTable serverTable) Check if thisExpandedNodeIdis local.booleanbooleanisNull()booleanCheck if thisExpandedNodeIdis in the OPC UA namespace, i.e. the namespace index is 0, or the namespace URI isNamespaces.OPC_UA.booleanCheck if thisExpandedNodeIdis relative, i.e. it is defined in terms of a namespace index rather than a namespace URI.Returns the value of thenamespacerecord component.static ExpandedNodeIdof(int namespaceIndex, long identifier) Creates an ExpandedNodeId with the specified namespace index and numeric identifier.static ExpandedNodeIdof(long identifier) Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a numeric identifier.static ExpandedNodeIdCreates an ExpandedNodeId in the OPC UA namespace (index 0) with a String identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace URI and numeric identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace URI and String identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace URI and UUID identifier.static ExpandedNodeIdof(String namespaceUri, ByteString identifier) Creates an ExpandedNodeId with the specified namespace URI and ByteString identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace URI and UInteger identifier.static ExpandedNodeIdCreates an ExpandedNodeId in the OPC UA namespace (index 0) with a UUID identifier.static ExpandedNodeIdof(ByteString identifier) Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a ByteString identifier.static ExpandedNodeIdCreates an ExpandedNodeId in the OPC UA namespace (index 0) with a UInteger identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace index and String identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace index and UUID identifier.static ExpandedNodeIdof(UShort namespaceIndex, ByteString identifier) Creates an ExpandedNodeId with the specified namespace index and ByteString identifier.static ExpandedNodeIdCreates an ExpandedNodeId with the specified namespace index and UInteger identifier.static ExpandedNodeIdParse a String representation of anExpandedNodeIdinto anExpandedNodeId.reindex(NamespaceTable namespaceTable, String namespaceUri) Re-index thisExpandedNodeIdfrom its current namespace index to the index fornamespaceUriinnamespaceTable.relative(NamespaceTable namespaceTable) Convert thisExpandedNodeIdto a relative ExpandedNodeId if not already.server()Returns the value of theserverrecord component.toNodeId(NamespaceTable namespaceTable) Convert thisExpandedNodeIdto aNodeIdif it is local.toNodeIdOrThrow(NamespaceTable namespaceTable) LiketoNodeId(NamespaceTable)but throws an exception instead of returning an emptyOptional.Convert thisExpandedNodeIdto its parseable String representation.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NULL_VALUE
-
-
Constructor Details
-
ExpandedNodeId
public ExpandedNodeId(ExpandedNodeId.ServerReference server, ExpandedNodeId.NamespaceReference namespace, Object identifier) Creates an instance of aExpandedNodeIdrecord class.- Parameters:
server- the value for theserverrecord componentnamespace- the value for thenamespacerecord componentidentifier- the value for theidentifierrecord component
-
-
Method Details
-
getIdentifier
-
getType
Get theIdTypeof thisExpandedNodeId's identifier.- Returns:
- the
IdTypeof thisExpandedNodeId's identifier.
-
getNamespaceIndex
-
getNamespaceIndex
-
getNamespaceUri
-
getNamespaceUri
-
getServerIndex
-
getServerIndex
-
getServerUri
-
getServerUri
-
isLocal
public boolean isLocal()Check if thisExpandedNodeIdis local, i.e. the server is defined in terms of a server index, and that index is 0.- Returns:
trueif thisExpandedNodeIdis local.- See Also:
-
isLocal
Check if thisExpandedNodeIdis local.If the server is defined in terms of a server index, this ExpandedNodeId is local if the index is 0.
If the server is defined in terms of a server URI, the server table is used to determine if the URI is that of the local server (index 0).
- Parameters:
serverTable- theServerTableto use when checking the server URI.- Returns:
trueif thisExpandedNodeIdis local.
-
isAbsolute
public boolean isAbsolute()Check if thisExpandedNodeIdis absolute, i.e. it is defined in terms of a namespace URI rather than a namespace index.- Returns:
trueif thisExpandedNodeIdis absolute.
-
isRelative
public boolean isRelative()Check if thisExpandedNodeIdis relative, i.e. it is defined in terms of a namespace index rather than a namespace URI.- Returns:
trueif thisExpandedNodeIdis relative.
-
isOpcUaNamespace
public boolean isOpcUaNamespace()Check if thisExpandedNodeIdis in the OPC UA namespace, i.e. the namespace index is 0, or the namespace URI isNamespaces.OPC_UA.- Returns:
trueif thisExpandedNodeIdis in the OPC UA namespace.
-
isNull
public boolean isNull()- Returns:
trueif thisExpandedNodeIdis null.
-
isNotNull
public boolean isNotNull()- Returns:
trueif thisExpandedNodeIdis not null.
-
toNodeId
Convert thisExpandedNodeIdto aNodeIdif it is local.If this
ExpandedNodeIdis defined in terms of a namespace URI, the namespace table is used to determine the namespace index. If the URI is not found in the namespace table, an emptyOptionalis returned.- Parameters:
namespaceTable- theNamespaceTableto use.- Returns:
- an
Optionalcontaining theNodeIdif thisExpandedNodeIdis local and the namespace index can be determined.
-
toNodeIdOrThrow
LiketoNodeId(NamespaceTable)but throws an exception instead of returning an emptyOptional.- Parameters:
namespaceTable- theNamespaceTableto use.- Returns:
- the
NodeIdif thisExpandedNodeIdis local and the namespace index can be determined. - Throws:
UaException- if thisExpandedNodeIdis not local or the namespace index cannot be determined.
-
absolute
Convert thisExpandedNodeIdto an absolute ExpandedNodeId if not already.An absolute ExpandedNodeId is one that defines the namespace URI rather than namespace index.
Returns
Optional.empty()if the URI is not found in the namespace table.- Parameters:
namespaceTable- theNamespaceTableto use when converting the index to URI.- Returns:
- an absolute ExpandedNodeId, or this ExpandedNodeId if it's already absolute.
- See Also:
-
absolute
-
relative
Convert thisExpandedNodeIdto a relative ExpandedNodeId if not already.A relative ExpandedNodeId is one that defines the namespace index rather than namespace URI.
Returns
Optional.empty()if the URI is not found in the namespace table.- Parameters:
namespaceTable- theNamespaceTableto use when converting the URI to index.- Returns:
- a relative ExpandedNodeId, or this ExpandedNodeId if it's already relative.
- See Also:
-
reindex
Re-index thisExpandedNodeIdfrom its current namespace index to the index fornamespaceUriinnamespaceTable.If the target namespace URI is not present in the namespace table this ExpandedNodeId is returned.
- Parameters:
namespaceTable- theNamespaceTable.namespaceUri- the target namespace URI.- Returns:
- a new
NodeIdin the namespace index indicated bynamespaceUri.
-
equalTo
Check if thisExpandedNodeIdis equal tonodeId.To be considered equal this ExpandedNodeId must be in serverIndex == 0, have the same namespace index as
nodeIdor have a namespace URI at the same index in the default namespace table, and an equal identifier.- Parameters:
nodeId- theNodeIdto check equality against.- Returns:
trueif thisExpandedNodeIdis equal tonodeId.
-
equalTo
Check if thisExpandedNodeIdis equal tonodeId.To be considered equal this ExpandedNodeId must be in serverIndex == 0, have the same namespace index as
nodeIdor have a namespace URI at the same index in the default namespace table, and an equal identifier.- Parameters:
nodeId- theNodeIdto check equality against.namespaceTable- theNamespaceTableused to look up the index of a namespace URI.- Returns:
trueif thisExpandedNodeIdis equal tonodeId.
-
toParseableString
Convert thisExpandedNodeIdto its parseable String representation.- Returns:
- the parseable String representation of this
ExpandedNodeId.
-
parse
Parse a String representation of anExpandedNodeIdinto anExpandedNodeId.- Parameters:
s- the String representation of anExpandedNodeId.- Returns:
- the parsed
ExpandedNodeId. - Throws:
UaRuntimeException- if the String representation is invalid.
-
of
Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a numeric identifier.- Parameters:
identifier- the numeric identifier.- Returns:
- an ExpandedNodeId with the given numeric identifier in the OPC UA namespace.
-
of
Creates an ExpandedNodeId with the specified namespace index and numeric identifier.- Parameters:
namespaceIndex- the namespace index.identifier- the numeric identifier.- Returns:
- an ExpandedNodeId with the given namespace index and numeric identifier.
-
of
Creates an ExpandedNodeId with the specified namespace URI and numeric identifier.- Parameters:
namespaceUri- the namespace URI.identifier- the numeric identifier.- Returns:
- an ExpandedNodeId with the given namespace URI and numeric identifier.
-
of
Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a UInteger identifier.- Parameters:
identifier- the UInteger identifier.- Returns:
- an ExpandedNodeId with the given UInteger identifier in the OPC UA namespace.
-
of
Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a String identifier.- Parameters:
identifier- the String identifier.- Returns:
- an ExpandedNodeId with the given String identifier in the OPC UA namespace.
-
of
Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a UUID identifier.- Parameters:
identifier- the UUID identifier.- Returns:
- an ExpandedNodeId with the given UUID identifier in the OPC UA namespace.
-
of
Creates an ExpandedNodeId in the OPC UA namespace (index 0) with a ByteString identifier.- Parameters:
identifier- the ByteString identifier.- Returns:
- an ExpandedNodeId with the given ByteString identifier in the OPC UA namespace.
-
of
Creates an ExpandedNodeId with the specified namespace index and UInteger identifier.- Parameters:
namespaceIndex- the namespace index.identifier- the UInteger identifier.- Returns:
- an ExpandedNodeId with the given namespace index and UInteger identifier.
-
of
Creates an ExpandedNodeId with the specified namespace index and String identifier.- Parameters:
namespaceIndex- the namespace index.identifier- the String identifier.- Returns:
- an ExpandedNodeId with the given namespace index and String identifier.
-
of
Creates an ExpandedNodeId with the specified namespace index and UUID identifier.- Parameters:
namespaceIndex- the namespace index.identifier- the UUID identifier.- Returns:
- an ExpandedNodeId with the given namespace index and UUID identifier.
-
of
Creates an ExpandedNodeId with the specified namespace index and ByteString identifier.- Parameters:
namespaceIndex- the namespace index.identifier- the ByteString identifier.- Returns:
- an ExpandedNodeId with the given namespace index and ByteString identifier.
-
of
Creates an ExpandedNodeId with the specified namespace URI and UInteger identifier.- Parameters:
namespaceUri- the namespace URI.identifier- the UInteger identifier.- Returns:
- an ExpandedNodeId with the given namespace URI and UInteger identifier.
-
of
Creates an ExpandedNodeId with the specified namespace URI and String identifier.- Parameters:
namespaceUri- the namespace URI.identifier- the String identifier.- Returns:
- an ExpandedNodeId with the given namespace URI and String identifier.
-
of
Creates an ExpandedNodeId with the specified namespace URI and UUID identifier.- Parameters:
namespaceUri- the namespace URI.identifier- the UUID identifier.- Returns:
- an ExpandedNodeId with the given namespace URI and UUID identifier.
-
of
Creates an ExpandedNodeId with the specified namespace URI and ByteString identifier.- Parameters:
namespaceUri- the namespace URI.identifier- the ByteString identifier.- Returns:
- an ExpandedNodeId with the given namespace URI and ByteString identifier.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
server
Returns the value of theserverrecord component.- Returns:
- the value of the
serverrecord component
-
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
identifier
Returns the value of theidentifierrecord component.- Returns:
- the value of the
identifierrecord component
-