|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.server.instantiation.NodeBuilder<T>
public final class NodeBuilder<T extends UaInstance>
Builds UaNodes with given UaType. First, setXXX-methods are called for setting different parameters for the root node. Then, build-method is called to build the UaNode.
Minimum of supplied arguments are name and defaultNamespaceIndex. These are used to create the NodeId, browse name and display name of the root node. Node id, browse name and display name can also be given explicitly, in which case the name and defaultNamespaceIndex are overridden. Currently, NodeBuilder creates the mandatory structure of the given UaType for the new instance. NodeIds for the new nodes are generated based on the NodeId of the root node of the structure and the browse path of the target node.
| Constructor Summary | |
|---|---|
NodeBuilder(NodeManagerUaNode nodeManager,
UaNodeBuilderConfiguration configuration,
UaType type)
Creates a new NodeBuilder, that creates instances of the given type and uses the factory to create the nodes. |
|
| Method Summary | |
|---|---|
T |
build()
Builds a new (@link UaInstance) with the structure of the UaType. |
void |
clear()
Clears all settable fields |
protected static boolean |
isTypeOnlyReference(ExternalReferenceDeclaration reference)
|
NodeBuilder<T> |
setBrowseName(org.opcfoundation.ua.builtintypes.QualifiedName name)
Sets the browse name of the root node of the created UaNode. |
NodeBuilder<T> |
setDefaultNameSpaceIndex(int defaultNameSpaceIndex)
Sets the default namespace index. |
NodeBuilder<T> |
setDisplayName(org.opcfoundation.ua.builtintypes.LocalizedText name)
Sets the display name of the root node of the created UaNode. |
NodeBuilder<T> |
setName(String name)
Sets the name. |
NodeBuilder<T> |
setNodeId(org.opcfoundation.ua.builtintypes.NodeId id)
Sets the node id of the root node of the created UaNode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NodeBuilder(NodeManagerUaNode nodeManager,
UaNodeBuilderConfiguration configuration,
UaType type)
throws InvalidTypeNodeException
nodeManager - the node manager to which the node(s) are built. Must not be null.configuration - the configuration options for the builder. Must not be null.type - the UA type of the node(s) to build. Must not be null.
InvalidTypeNodeException - if the given type node cannot be used for instantiation.| Method Detail |
|---|
protected static boolean isTypeOnlyReference(ExternalReferenceDeclaration reference)
reference -
public T build()
throws NodeBuilderException
UaType. Clears settable
fields after building.
NodeBuilderException - if node id, browse name or display name could not be deduced for
the new root node.public void clear()
public NodeBuilder<T> setBrowseName(org.opcfoundation.ua.builtintypes.QualifiedName name)
public NodeBuilder<T> setDefaultNameSpaceIndex(int defaultNameSpaceIndex)
public NodeBuilder<T> setDisplayName(org.opcfoundation.ua.builtintypes.LocalizedText name)
public NodeBuilder<T> setName(String name)
public NodeBuilder<T> setNodeId(org.opcfoundation.ua.builtintypes.NodeId id)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||