#NEWLINE# def __call__( self , element , metadata ) : #NEWLINE# #INDENT# super ( DareDIDL , self ) . __call__ ( element , metadata ) #NEWLINE# data = DIDL . record #NEWLINE# DIDL = ElementMaker ( namespace = self . ns [ 'didl' ] , nsmap = self . ns ) #NEWLINE# DII = ElementMaker ( namespace = self . ns [ 'dii' ] ) #NEWLINE# DIP = ElementMaker ( namespace = self . ns [ 'dip' ] ) #NEWLINE# didl_item = element . getchildren ( ) [ 0 ] . getchildren ( ) [ 0 ] #NEWLINE# didl_item . insert ( 0 , DIDL . Descriptor ( DIDL . Statement ( DII . Identifier ( data [ 'metadata' ] . get ( 'dare_id' , [ '' ] ) [ 0 ] ) , mimeType = 'application/xml' ) ) )