alcatel/dataparser/AnnotationsGetAttributes.py
changeset 27 8ca7f2cea729
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/alcatel/dataparser/AnnotationsGetAttributes.py	Thu Jan 24 16:58:55 2013 +0100
@@ -0,0 +1,38 @@
+'''
+Created on 7 aout 2012
+
+@author: gerard
+'''
+import logging
+
+logger = logging.getLogger('document')
+
+class AnnotationsGetAttributes(object):
+ 
+    def __init__(self, request):
+        self.request = request
+
+    
+    def get_article(self):
+        article = ''
+        try:
+            article = self.request.GET['document_id']
+        except Exception, err:
+            logger.info('No article in the http get request. ' + str(err))
+        return article
+    
+    def get_offset(self):
+        offset = ''
+        try:
+            offset = self.request.GET['offset']
+        except Exception, err:
+            logger.info('No offset in the http get request. ' + str(err))
+        return offset
+    
+    def get_count(self):
+        count = ''
+        try:
+            count = self.request.GET['count']
+        except Exception, err:
+            logger.info('No count in the http get request. ' + str(err))
+        return count
\ No newline at end of file