#NEWLINE# @ staticmethod #NEWLINE# def from_dict( domain_specific_properties_dict ) : #NEWLINE# #INDENT# if ( not domain_specific_properties_dict ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# xsi_type = domain_specific_properties_dict . get ( 'xsi:type' ) #NEWLINE# if ( not xsi_type ) : #NEWLINE# #INDENT# raise ValueError ( 'dictionary does not have xsi:type key' ) #NEWLINE# #UNINDENT# klass_name = xsi_type . split ( ':' ) [ 1 ] . rstrip ( 'Type' ) #NEWLINE# klass = globals ( ) [ klass_name ] #NEWLINE# dom_obj = klass . from_dict ( xsi_type ) #NEWLINE# return dom_obj