com.prosysopc.ua.nodes
Interface UaType

All Superinterfaces:
UaNode
All Known Subinterfaces:
UaDataType, UaExternalNode, UaObjectType, UaReferenceType, UaVariableType
All Known Implementing Classes:
UaDataTypeImpl, UaDataTypeNode, UaExternalNodeImpl, UaObjectTypeImpl, UaObjectTypeNode, UaReferenceTypeImpl, UaReferenceTypeNode, UaTypeImpl, UaTypeNode, UaVariableTypeImpl, UaVariableTypeNode

public interface UaType
extends UaNode

Common interface for all UA Types.

Note that the specification does not define any generic behavior for types and there is no specific node class, called type.

This interface is defined solely to make it possible to classify the UA types from the instances.

See Also:
UaDataType, UaObjectType, UaReferenceType, UaVariableType

Method Summary
 void addSubType(UaType type)
          Add a new sub type for the type.
 Boolean getIsAbstract()
          A boolean Attribute with the following values: true it is an abstract Type, i.e. no instances of this type shall exist, only of its subtypes.
 Class<?> getJavaClass()
          Defines a Java class which is used to keep data of the specified UA type.
 UaType getSuperType()
           
 boolean hasSuperType()
           
 boolean inheritsFrom(org.opcfoundation.ua.builtintypes.NodeId typeId)
          Check if the type inherits from the specified type.
 boolean inheritsFrom(UaType type)
          Check if the type inherits from the specified type.
 void setIsAbstract(Boolean isAbstract)
           
 void setJavaClass(Class<?> javaClass)
           
 void setSuperType(UaType parent)
          Set the ModelParent reference.
 
Methods inherited from interface com.prosysopc.ua.nodes.UaNode
addComponent, addProperty, addReference, addReference, addReference, deleteReference, deleteReference, deleteReference, deleteReference, getAddressSpace, getAttributes, getBrowseName, getComponent, getComponents, getDescription, getDisplayName, getForwardReferences, getInverseReferences, getMethod, getNodeClass, getNodeId, getNodeVersion, getProperties, getProperty, getReference, getReferences, getReferences, getSupportedAttributes, getUserWriteMask, getWriteMask, hasUserWriteAccess, hasWriteAccess, readAttribute, readAttribute, removeComponent, removeProperty, setAttribute, setAttributes, setBrowseName, setDescription, setDisplayName, setReferences, setUserWriteMask, setWriteMask, supportsAttribute, writeAttribute
 

Method Detail

addSubType

void addSubType(UaType type)
Add a new sub type for the type.

Adds a new reference of type HasSubType to the node with target set to type.

Parameters:
type - the node to add.

getIsAbstract

Boolean getIsAbstract()
A boolean Attribute with the following values:
true it is an abstract Type, i.e. no instances of this type shall exist, only of its subtypes.
false it is not an abstract Type, i.e. instances of this type can exist.

Returns:
the current value of IsAbstract

getJavaClass

Class<?> getJavaClass()
Defines a Java class which is used to keep data of the specified UA type. Mostly used for UA DataTypes, but can also define classes for specific object and variable types.

For example, the node for UA DataType Int32 typically defines java.lang.Integer as the Java class.

Returns:
the Java class used for the type

getSuperType

UaType getSuperType()
Returns:
the UA type that is defined as the ancestor of the type in the UA AddressSpace. Or null, if the type has no super type (e.g. BaseObjectType has no super type)
See Also:
hasSuperType()

hasSuperType

boolean hasSuperType()
Returns:
whether the type has a super type. If not, getSuperType() returns null.

inheritsFrom

boolean inheritsFrom(org.opcfoundation.ua.builtintypes.NodeId typeId)
Check if the type inherits from the specified type.

Parameters:
typeId - The NodeId of the type to check
Returns:
true if this type inherits from the specified type, i.e. it is itself or (recursively) has a modelParent that equals to typeId
See Also:
getSuperType()

inheritsFrom

boolean inheritsFrom(UaType type)
Check if the type inherits from the specified type.

Parameters:
type - The NodeId of the type to check
Returns:
true if this type inherits from the specified type, i.e. it is itself or (recursively) has a modelParent that equals to typeId
See Also:
getSuperType()

setIsAbstract

void setIsAbstract(Boolean isAbstract)
Parameters:
isAbstract - the value to set for IsAbstract
See Also:
getIsAbstract()

setJavaClass

void setJavaClass(Class<?> javaClass)
Parameters:
javaClass - the Java class to use for the type.
See Also:
getJavaClass()

setSuperType

void setSuperType(UaType parent)
Set the ModelParent reference.

Parameters:
parent - the super type to set.


Copyright © 2018. All rights reserved.