#NEWLINE# @ classmethod #NEWLINE# def get_resource_type( cls , ref ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( not cls . is_reference ( ref ) ) : #NEWLINE# #INDENT# raise ValueError ( ( '%s is not a valid reference.' % ref ) ) #NEWLINE# #UNINDENT# return ref . split ( cls . separator , 1 ) [ 0 ] #NEWLINE# #UNINDENT# except ( ValueError , IndexError , AttributeError ) : #NEWLINE# #INDENT# raise common_models . InvalidReferenceError ( ref = ref )