com.prosysopc.ua.server
Class ModelParser

java.lang.Object
  extended by com.prosysopc.ua.ModelParserBase
      extended by com.prosysopc.ua.server.ModelParser

public class ModelParser
extends ModelParserBase

An XML parser for UA Information Model files defined according to the respective schema, http://opcfoundation.org/UA/2011/03/UANodeSet.xsd. You can use NodeManagerTable#loadModel(URL, Collection, boolean) to read the files instead of using the parser directly.


Field Summary
static boolean callAfterCreateForTopLevelNodes
          If this is set to true, then afterCreate will be called for top level nodes loaded from NodeSet2 XMLs.
 
Fields inherited from class com.prosysopc.ua.ModelParserBase
UTF8_BOM
 
Constructor Summary
ModelParser(NodeManagerTable nodeManagerTable)
          Creates a new ModelParser.
 
Method Summary
protected  void addNamespaceUri(String uri)
           
protected  void afterCreate(org.opcfoundation.ua.core.AddNodesItem item)
          This method is called once for each Variable and Object node created.
protected  org.opcfoundation.ua.builtintypes.NodeId doAddNode(org.opcfoundation.ua.core.AddNodesItem item)
          Add a new node to the address space
protected  void doAddReference(org.opcfoundation.ua.core.AddReferencesItem item)
          Add a new reference to the address space
protected  org.opcfoundation.ua.common.NamespaceTable getNamespaceTable()
           
protected  UaNode getNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
          Get an existing node in the address space.
protected  org.opcfoundation.ua.common.ServerTable getServerTable()
           
 
Methods inherited from class com.prosysopc.ua.ModelParserBase
addNodes, addReferences, characters, createModel, endElement, getEncoderContext, getErrorList, getIgnoredNodes, getNodes, getReferences, isFailOnFirstError, isIgnoredReference, isReadingExtensions, isReadingNamespaces, isSkipValuesOnAndroid, parseFile, parseFile, parseFile, setFailOnFirstError, setIgnoredNodes, setSkipValuesOnAndroid, startElement, toGlobalExpandedNodeId, toGlobalNodeId, toGlobalNodeId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callAfterCreateForTopLevelNodes

public static boolean callAfterCreateForTopLevelNodes
If this is set to true, then afterCreate will be called for top level nodes loaded from NodeSet2 XMLs. Default is true.

Constructor Detail

ModelParser

public ModelParser(NodeManagerTable nodeManagerTable)
Creates a new ModelParser.

Parameters:
nodeManagerTable - the NodeManagerTable in which the nodes should be created.
Method Detail

addNamespaceUri

protected void addNamespaceUri(String uri)
Overrides:
addNamespaceUri in class ModelParserBase

afterCreate

protected void afterCreate(org.opcfoundation.ua.core.AddNodesItem item)
Description copied from class: ModelParserBase
This method is called once for each Variable and Object node created. First call is after they all have been added to the address space. The default implementation does nothing.

Overrides:
afterCreate in class ModelParserBase

doAddNode

protected org.opcfoundation.ua.builtintypes.NodeId doAddNode(org.opcfoundation.ua.core.AddNodesItem item)
                                                      throws StatusException
Description copied from class: ModelParserBase
Add a new node to the address space

Overrides:
doAddNode in class ModelParserBase
Parameters:
item -
Returns:
Throws:
StatusException

doAddReference

protected void doAddReference(org.opcfoundation.ua.core.AddReferencesItem item)
                       throws StatusException
Description copied from class: ModelParserBase
Add a new reference to the address space

Overrides:
doAddReference in class ModelParserBase
Parameters:
item -
Throws:
StatusException

getNamespaceTable

protected org.opcfoundation.ua.common.NamespaceTable getNamespaceTable()
Specified by:
getNamespaceTable in class ModelParserBase
Returns:

getNode

protected UaNode getNode(org.opcfoundation.ua.builtintypes.NodeId nodeId)
                  throws StatusException
Description copied from class: ModelParserBase
Get an existing node in the address space.

Specified by:
getNode in class ModelParserBase
Throws:
StatusException

getServerTable

protected org.opcfoundation.ua.common.ServerTable getServerTable()
Specified by:
getServerTable in class ModelParserBase
Returns:


Copyright © 2018. All rights reserved.