ChimeraTK-ControlSystemAdapter-OPCUAAdapter  04.00.01
open62541_XMLPreprocessor.preProcessDocument Class Reference
+ Collaboration diagram for open62541_XMLPreprocessor.preProcessDocument:

Public Member Functions

def __init__ (self, originXML)
 
def clean (self)
 
def getTargetXMLName (self)
 
def extractNamespaceURIs (self)
 
def analyze (self)
 
def getNamespaceId (self)
 
def getReferencedNamespaceUri (self, nsId)
 
def getNamespaceDependencies (self)
 
def finalize (self)
 
def reassignReferencedNamespaceId (self, currentNsId, newNsId)
 
def reassignNamespaceId (self, currentNsId, newNsId)
 

Public Attributes

 originXML
 
 targetXML
 
 parseOK
 
 containedNodes
 
 referencedNodes
 
 namespaceOrder
 
 referencedNamesSpaceUris
 
 namespaceQualifiers
 
 nodeset
 

Static Public Attributes

string originXML = ''
 
tuple targetXML = ()
 
string nodeset = ''
 
bool parseOK = False;
 
list containedNodes = []
 
list referencedNodes = []
 
list namespaceOrder = []
 
list namespaceQualifiers = []
 
list referencedNamesSpaceUris = []
 

Detailed Description

Definition at line 36 of file open62541_XMLPreprocessor.py.

Constructor & Destructor Documentation

◆ __init__()

def open62541_XMLPreprocessor.preProcessDocument.__init__ (   self,
  originXML 
)

Definition at line 47 of file open62541_XMLPreprocessor.py.

Member Function Documentation

◆ analyze()

def open62541_XMLPreprocessor.preProcessDocument.analyze (   self)
analyze()

analyze will gather information about the nodes and references contained in a XML File
to facilitate later preprocessing stages that adresss XML dependency issues

returns: No return value

Definition at line 107 of file open62541_XMLPreprocessor.py.

+ Here is the call graph for this function:

◆ clean()

def open62541_XMLPreprocessor.preProcessDocument.clean (   self)

Definition at line 65 of file open62541_XMLPreprocessor.py.

◆ extractNamespaceURIs()

def open62541_XMLPreprocessor.preProcessDocument.extractNamespaceURIs (   self)
extractNamespaceURIs

minidom gobbles up <NamespaceUris></NamespaceUris> elements, without a decent
way to reliably access this dom2 <uri></uri> elements (only attribute xmlns= are
accessible using minidom).  We need them for dereferencing though... This
function attempts to do just that.

returns: Nothing

Definition at line 74 of file open62541_XMLPreprocessor.py.

+ Here is the caller graph for this function:

◆ finalize()

def open62541_XMLPreprocessor.preProcessDocument.finalize (   self)

Definition at line 194 of file open62541_XMLPreprocessor.py.

◆ getNamespaceDependencies()

def open62541_XMLPreprocessor.preProcessDocument.getNamespaceDependencies (   self)

Definition at line 187 of file open62541_XMLPreprocessor.py.

◆ getNamespaceId()

def open62541_XMLPreprocessor.preProcessDocument.getNamespaceId (   self)
namespaceId()

Counts the namespace IDs in all nodes of this XML and picks the most used
namespace as the numeric identifier of this data model.

returns: Integer ID of the most propable/most used namespace in this XML

Definition at line 141 of file open62541_XMLPreprocessor.py.

◆ getReferencedNamespaceUri()

def open62541_XMLPreprocessor.preProcessDocument.getReferencedNamespaceUri (   self,
  nsId 
)
getReferencedNamespaceUri

returns an URL that hopefully corresponds to the nsId that was used to reference this model

return: URI string corresponding to nsId

Definition at line 166 of file open62541_XMLPreprocessor.py.

◆ getTargetXMLName()

def open62541_XMLPreprocessor.preProcessDocument.getTargetXMLName (   self)

Definition at line 69 of file open62541_XMLPreprocessor.py.

◆ reassignNamespaceId()

def open62541_XMLPreprocessor.preProcessDocument.reassignNamespaceId (   self,
  currentNsId,
  newNsId 
)
reassignNamespaceId

Iterates over all nodes in this document, find those in namespace currentNsId and changes them to newNsId.

returns: nothing

Definition at line 217 of file open62541_XMLPreprocessor.py.

◆ reassignReferencedNamespaceId()

def open62541_XMLPreprocessor.preProcessDocument.reassignReferencedNamespaceId (   self,
  currentNsId,
  newNsId 
)
reassignReferencedNamespaceId

Iterates over all references in this document, find references to currentNsId and changes them to newNsId.
NodeIds themselves are not altered.

returns: nothing

Definition at line 203 of file open62541_XMLPreprocessor.py.

Member Data Documentation

◆ containedNodes [1/2]

list open62541_XMLPreprocessor.preProcessDocument.containedNodes = []
static

Definition at line 41 of file open62541_XMLPreprocessor.py.

◆ containedNodes [2/2]

open62541_XMLPreprocessor.preProcessDocument.containedNodes

Definition at line 51 of file open62541_XMLPreprocessor.py.

◆ namespaceOrder [1/2]

list open62541_XMLPreprocessor.preProcessDocument.namespaceOrder = []
static

Definition at line 43 of file open62541_XMLPreprocessor.py.

◆ namespaceOrder [2/2]

open62541_XMLPreprocessor.preProcessDocument.namespaceOrder

Definition at line 53 of file open62541_XMLPreprocessor.py.

◆ namespaceQualifiers [1/2]

list open62541_XMLPreprocessor.preProcessDocument.namespaceQualifiers = []
static

Definition at line 44 of file open62541_XMLPreprocessor.py.

◆ namespaceQualifiers [2/2]

open62541_XMLPreprocessor.preProcessDocument.namespaceQualifiers

Definition at line 55 of file open62541_XMLPreprocessor.py.

◆ nodeset [1/2]

string open62541_XMLPreprocessor.preProcessDocument.nodeset = ''
static

Definition at line 39 of file open62541_XMLPreprocessor.py.

◆ nodeset [2/2]

open62541_XMLPreprocessor.preProcessDocument.nodeset

Definition at line 57 of file open62541_XMLPreprocessor.py.

◆ originXML [1/2]

string open62541_XMLPreprocessor.preProcessDocument.originXML = ''
static

Definition at line 37 of file open62541_XMLPreprocessor.py.

◆ originXML [2/2]

open62541_XMLPreprocessor.preProcessDocument.originXML

Definition at line 48 of file open62541_XMLPreprocessor.py.

◆ parseOK [1/2]

bool open62541_XMLPreprocessor.preProcessDocument.parseOK = False;
static

Definition at line 40 of file open62541_XMLPreprocessor.py.

◆ parseOK [2/2]

open62541_XMLPreprocessor.preProcessDocument.parseOK

Definition at line 50 of file open62541_XMLPreprocessor.py.

◆ referencedNamesSpaceUris [1/2]

list open62541_XMLPreprocessor.preProcessDocument.referencedNamesSpaceUris = []
static

Definition at line 45 of file open62541_XMLPreprocessor.py.

◆ referencedNamesSpaceUris [2/2]

open62541_XMLPreprocessor.preProcessDocument.referencedNamesSpaceUris

Definition at line 54 of file open62541_XMLPreprocessor.py.

◆ referencedNodes [1/2]

list open62541_XMLPreprocessor.preProcessDocument.referencedNodes = []
static

Definition at line 42 of file open62541_XMLPreprocessor.py.

◆ referencedNodes [2/2]

open62541_XMLPreprocessor.preProcessDocument.referencedNodes

Definition at line 52 of file open62541_XMLPreprocessor.py.

◆ targetXML [1/2]

tuple open62541_XMLPreprocessor.preProcessDocument.targetXML = ()
static

Definition at line 38 of file open62541_XMLPreprocessor.py.

◆ targetXML [2/2]

open62541_XMLPreprocessor.preProcessDocument.targetXML

Definition at line 49 of file open62541_XMLPreprocessor.py.


The documentation for this class was generated from the following file: