diff -r 94f586daa623 -r 8ca7f2cea729 alcatel/dataparser/DocumentaryFileAnnotationAttributes.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alcatel/dataparser/DocumentaryFileAnnotationAttributes.py Thu Jan 24 16:58:55 2013 +0100 @@ -0,0 +1,37 @@ +''' +Created on 10 August 2012 + +@author: Gerard +''' +import logging + +logger = logging.getLogger('document') + +class DocumentaryFileAnnotationCreateAttributes(object): + + def __init__(self, request): + self.request = request + + def get_user(self): + user = '' + try: + user = self.request.POST['user'] + except Exception, err: + logger.info('No user attribute in the http request.'+str(err)) + return user + + def get_documentary_file_id(self): + documentary_file_id = '' + try: + documentary_file_id = self.request.POST['documentary_file_id'] + except Exception, err: + logger.info('No documentary_file_id attribute in the http request. ' + str(err)) + return documentary_file_id + + def get_annotation(self): + annotation = '' + try: + annotation = self.request.POST['annotation'] + except Exception, err: + logger.info('No annotation attribute in the http request.' + str(err)) + return annotation \ No newline at end of file