#NEWLINE# def to_obj( self , return_obj = None , ns_info = None ) : #NEWLINE# #INDENT# self . _collect_ns_info ( ns_info ) #NEWLINE# if ( return_obj == None ) : #NEWLINE# #INDENT# obj = core_binding . ObjectType ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# obj = return_obj #NEWLINE# #UNINDENT# if self . id_ : #NEWLINE# #INDENT# obj . id = self . id_ #NEWLINE# #UNINDENT# if self . idref : #NEWLINE# #INDENT# obj . idref = self . idref #NEWLINE# #UNINDENT# if self . properties : #NEWLINE# #INDENT# obj . Properties = self . properties . to_obj ( ns_info = ns_info ) #NEWLINE# #UNINDENT# if self . related_objects : #NEWLINE# #INDENT# relobj_obj = core_binding . RelatedObjectsType ( ) #NEWLINE# for x in self . related_objects : #NEWLINE# #INDENT# relobj_obj . add_Related_Object ( x . to_obj ( ns_info = ns_info ) ) #NEWLINE# #UNINDENT# obj . Related_Objects = relobj_obj #NEWLINE# #UNINDENT# if ( self . domain_specific_object_properties is not None ) : #NEWLINE# #INDENT# obj . Domain_Specific_Object_Properties = self . domain_specific_object_properties . to_obj ( ns_info = ns_info ) #NEWLINE# #UNINDENT# return obj