#NEWLINE# def load_service_document( self , xml_document ) : #NEWLINE# #INDENT# "Load the Service Document XML from bytestring, `xml_document`\n        \n        Useful if SD-IRI is non-existant or invalid.\n        \n        Will set the following convenience attributes:\n            \n            `self.sd` -- the `sword2.ServiceDocument` instance\n            \n            `self.workspaces` -- a `list` of workspace tuples, of the form:\n                            ('Workspace atom:title', [<`sword2.Collection` object>, ....]),\n            \n            `self.maxUploadSize` -- the maximum filesize for a deposit, if given in the service document\n        " #NEWLINE# self . _t . start ( 'SD Parse' ) #NEWLINE# self . sd = ServiceDocument ( xml_document ) #NEWLINE# ( _ , took_time ) = self . _t . time_since_start ( 'SD Parse' ) #NEWLINE# self . workspaces = self . sd . workspaces #NEWLINE# self . maxUploadSize = self . sd . maxUploadSize #NEWLINE# if self . history : #NEWLINE# #INDENT# if self . sd . valid : #NEWLINE# #INDENT# self . history . log ( 'SD Parse' , sd_iri = self . sd_iri , valid = self . sd . valid , workspaces_found = [ k for ( k , v ) in self . sd . workspaces ] , sword_version = self . sd . version , maxUploadSize = self . sd . maxUploadSize , process_duration = took_time ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . history . log ( 'SD Parse' , sd_iri = self . sd_iri , valid = self . sd . valid , process_duration = k )