'''
Created on 06 August 2012

@author: Corinne
'''
import logging

logger = logging.getLogger('document')

class ClientDocumentaryFileAttributes(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 post request.' + str(err))
        return user
    
    def get_title(self):
        title = ''
        try:
            title = self.request.POST['title']
        except Exception, err:
            logger.info('No title attribute in the http post request.' + str(err))
        return title
    
    def get_description(self):
        description = ''
        try:
            description = self.request.POST['description']
        except Exception, err:
            logger.info('No description attribute in the http post request.' + str(err))
        return description
    
    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 post request. ' + str(err))
        return documentary_file_id
    
    def get_query_id(self):
        query_id = ''
        try:
            query_id = self.request.POST['query_id']
        except Exception, err:
            logger.info('No query_id attribute in the http post request. ' + str(err))
        return query_id
    
    def get_json_treemap(self):
        jsontreemap = ''
        try:
            jsontreemap = self.request.POST['jsontreemap']
        except Exception, err:
            logger.info('No jsontreemap attribute in the http post request. ' + str(err))
        return jsontreemap
    
    def get_json_streamgraph(self):
        jsonstreamgraph = ''
        try:
            jsonstreamgraph = self.request.POST['jsonstreamgraph']
        except Exception, err:
            logger.info('No jsonstreamgraph attribute in the http post request. ' + str(err))
        return jsonstreamgraph
    
    def get_visibility(self):
        visibility = False
        try:
            visibility = self.request.POST['visibility']
        except Exception, err:
            logger.info('No visibility attribute in the http post request. ' + str(err))
        return visibility