#NEWLINE# def classToElementName( self , classObject ) : #NEWLINE# #INDENT# 'Get the element name for a given object' #NEWLINE# name = classObject . __name__ #NEWLINE# if self . rClassMapping . has_key ( name ) : #NEWLINE# #INDENT# return self . rClassMapping . get ( name ) #NEWLINE# #UNINDENT# short = name . split ( '.' ) [ ( - 1 ) ] #NEWLINE# count = 2 #NEWLINE# while self . classMapping . has_key ( short ) : #NEWLINE# #INDENT# short = ( short + str ( count ) ) #NEWLINE# count += 1 #NEWLINE# #UNINDENT# self . classMapping [ short ] = name #NEWLINE# self . rClassMapping [ name ] = short #NEWLINE# return short