changeset 430:d6a2125a4b09

bibliograpfical info
author abukhman
date Mon, 14 Feb 2011 15:41:13 +0100
parents ebe50e81710f
children 630a4581992a
files documentViewer.py
diffstat 1 files changed, 55 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Mon Feb 14 15:41:12 2011 +0100
+++ b/documentViewer.py	Mon Feb 14 15:41:13 2011 +0100
@@ -230,7 +230,19 @@
     def getTextPage(self, **args):
         """get page"""
         return self.template.fulltextclient.getTextPage(**args)
-
+    
+    def getText(self, **args):
+        """get page text"""
+        return self.template.fulltextclient.getText(**args)
+    
+    def getXML(self, **args):
+        """get page xml"""
+        return self.template.fulltextclient.getXML(**args)
+    
+    def getDictionary(self, **args):
+        """get page dictionary"""
+        return self.template.fulltextclient.getDictionary(**args)
+    
     def getQuery(self, **args):
         """get query in search"""
         return self.template.fulltextclient.getQuery(**args)
@@ -336,7 +348,8 @@
         if (docinfo.get('textURLPath',None)):
             page = self.getTextPage(docinfo=docinfo, pageinfo=pageinfo)
             pageinfo['textPage'] = page
-        pt = getattr(self.template, 'viewer_main')               
+        tt = getattr(self, 'template')   
+        pt = getattr(tt, 'viewer_main')               
         return pt(docinfo=docinfo,pageinfo=pageinfo,viewMode=viewMode,mk=self.generateMarks(mk))
   
     def generateMarks(self,mk):
@@ -628,7 +641,46 @@
                 docinfo['lang']=getTextFromNode(dom.xpath("//bib/lang")[0])
             except:
                 docinfo['lang']=''
-
+            try:
+                docinfo['city']=getTextFromNode(dom.xpath("//bib/city")[0])
+            except:
+                docinfo['city']=''
+            try:
+                docinfo['number_of_pages']=getTextFromNode(dom.xpath("//bib/number_of_pages")[0])
+            except:
+                docinfo['number_of_pages']=''
+            try:
+                docinfo['series_volume']=getTextFromNode(dom.xpath("//bib/series_volume")[0])
+            except:
+                docinfo['series_volume']=''
+            try:
+                docinfo['number_of_volumes']=getTextFromNode(dom.xpath("//bib/number_of_volumes")[0])
+            except:
+                docinfo['number_of_volumes']=''
+            try:
+                docinfo['translator']=getTextFromNode(dom.xpath("//bib/translator")[0])
+            except:
+                docinfo['translator']=''
+            try:
+                docinfo['edition']=getTextFromNode(dom.xpath("//bib/edition")[0])
+            except:
+                docinfo['edition']=''
+            try:
+                docinfo['series_author']=getTextFromNode(dom.xpath("//bib/series_author")[0])
+            except:
+                docinfo['series_author']=''
+            try:
+                docinfo['publisher']=getTextFromNode(dom.xpath("//bib/publisher")[0])
+            except:
+                docinfo['publisher']=''
+            try:
+                docinfo['series_title']=getTextFromNode(dom.xpath("//bib/series_title")[0])
+            except:
+                docinfo['series_title']=''
+            try:
+                docinfo['isbn_issn']=getTextFromNode(dom.xpath("//bib/isbn_issn")[0])
+            except:
+                docinfo['isbn_issn']=''           
         return docinfo