#NEWLINE# def init( self , config ) : #NEWLINE# #INDENT# self . config = config #NEWLINE# self . processInfo = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . hasProcessInfo = False #NEWLINE# Nodelist = self . m_base . m_doc . getElementsByTagName ( 'MosaicDataset' ) #NEWLINE# if ( Nodelist . length == 0 ) : #NEWLINE# #INDENT# self . log ( 'Error: <MosaicDataset> node is not found! Invalid schema.' , self . const_critical_text ) #NEWLINE# return False #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# for node in Nodelist [ 0 ] . childNodes : #NEWLINE# #INDENT# node = node . nextSibling #NEWLINE# if ( ( key != None ) and ( node . nodeType == minidom . Node . ELEMENT_NODE ) ) : #NEWLINE# #INDENT# if ( node . nodeName == 'Processes' ) : #NEWLINE# #INDENT# for node in node . childNodes : #NEWLINE# #INDENT# if ( ( node != None ) and ( node . nodeType == minidom . Node . ELEMENT_NODE ) ) : #NEWLINE# #INDENT# procesName = node . nodeName #NEWLINE# procesName = procesName . lower ( ) #NEWLINE# if ( procesName in self . m_hsh_parent_child_nodes . keys ( ) ) : #NEWLINE# #INDENT# parentNode = self . m_hsh_parent_child_nodes [ procesName ] [ 'parent' ] #NEWLINE# childNode = self . m_hsh_parent_child_nodes [ procesName ] [ 'child' ] #NEWLINE# if ( ( parentNode in self . processInfo . keys ( ) ) == False ) : #NEWLINE# #INDENT# self . processInfo [ parentNode ] = [ ] #NEWLINE# #UNINDENT# aryCV = [ ] #NEWLINE# for node in node . childNodes : #NEWLINE# #INDENT# if ( ( node != None ) and ( node . nodeType == minidom . Node . ELEMENT_NODE ) ) : #NEWLINE# #INDENT# key = node . nodeName . lower ( ) #NEWLINE# if ( key == childNode ) : #NEWLINE# #INDENT# hashCV = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for node in node . childNodes : #NEWLINE# #INDENT# if ( ( node != None ) and ( node . nodeType == minidom . Node . ELEMENT_NODE ) ) : #NEWLINE# #INDENT# keyName = node . nodeName . lower ( ) #NEWLINE# value = '#' #NEWLINE# try : #NEWLINE# #INDENT# value = node . firstChild . nodeValue #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# Warning_ = True #NEWLINE# #UNINDENT# hashCV [ keyName ] = value #NEWLINE# #UNINDENT# #UNINDENT# aryCV . append ( hashCV ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . processInfo [ parentNode ] . append ( aryCV ) #NEWLINE# continue #NEWLINE# #UNINDENT# if ( ( procesName in self . processInfo . keys ( ) ) == False ) : #NEWLINE# #INDENT# self . processInfo [ procesName ] = [ ] #NEWLINE# #UNINDENT# hashCV = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for node in node . childNodes : #NEWLINE# #INDENT# if ( ( node != None ) and ( node . nodeType == minidom . Node . ELEMENT_NODE ) ) : #NEWLINE# #INDENT# key = node . nodeName #NEWLINE# key = key . lower ( ) #NEWLINE# value = '#' #NEWLINE# try : #NEWLINE# #INDENT# if self . userProcessInfoValues : #NEWLINE# #INDENT# value = self . userProcessInfo [ procesName ] [ key ] #NEWLINE# if ( value == '#' ) : #NEWLINE# #INDENT# value = '' #NEWLINE# #UNINDENT# if ( node . childNodes . length == 0 ) : #NEWLINE# #INDENT# node . appendChild ( self . m_base . m_doc . createTextNode ( value ) ) #NEWLINE# #UNINDENT# node . firstChild . nodeValue = value #NEWLINE# #UNINDENT# value = node . firstChild . nodeValue #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# Warning_ = True #NEWLINE# #UNINDENT# hashCV [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# self . processInfo [ procesName ] . append ( hashCV ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# except Exception as inst : #NEWLINE# #INDENT# self . log ( 'Error: Reading <MosaicDataset> node.' , self . const_critical_text ) #NEWLINE# return False #NEWLINE# #UNINDENT# if ( len ( self . processInfo ) > 0 ) : #NEWLINE# #INDENT# self . hasProcessInfo = True #NEWLINE# #UNINDENT# self . userProcessInfoValues = False #NEWLINE# return True