changeset 226:0b614f078f7b

*** empty log message ***
author abukhman
date Fri, 08 Oct 2010 15:49:44 +0200
parents 57c2f5b6ada5
children fd9aa1d0941a
files documentViewer.py
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/documentViewer.py	Fri Oct 08 15:34:50 2010 +0200
+++ b/documentViewer.py	Fri Oct 08 15:49:44 2010 +0200
@@ -404,14 +404,6 @@
         logging.debug("(getDomFromIndexMeta): URLXAXA: %s"%regpath.group(2))            
         return ("/mpiwg/online/"+regpath.group(1)+"/"+regpath.group(2))
      
-    def getIndexMetaName(self,url):
-        """gib nur den Pfad zurueck"""
-        #regexp = re.compile(r".*(experimental|permanent)/(.*)")
-        regpath = regexp.match(url)
-        if (regpath==None):
-            return ""
-        logging.debug("(getIndexMetaName): XAXA: %s"%regpath.group(2))            
-        return regpath
     
     
     def getIndexMetaUrl(self,url):
@@ -539,7 +531,10 @@
                 docinfo['lang']=getTextFromNode(dom.xpath("//bib/lang")[0])
             except:
                 docinfo['lang']=''
-
+            try:
+                docinfo['name']=getTextFromNode(dom.xpath("//%s"%bibmap['name'][0])[0])
+            except: pass
+            
         return docinfo
     
      
@@ -553,7 +548,7 @@
                 path=getParentDir(path)
             dom = self.getDomFromIndexMeta(path)
         
-        docinfo['indexMetaPath']=self.getIndexMetaPath(path);
+        #docinfo['indexMetaPath']=self.getIndexMetaPath(path);
         
         #result= dom.xpath("//result/resultPage")
         #docinfo['numPages']=int(getTextFromNode(result[0]))
@@ -687,6 +682,10 @@
             docinfo['year']=getTextFromNode(dom.xpath("//date")[0])
         except:
             pass
+        try:
+            docinfo['name']=getTextFromNode(dom.xpath("//name")[0])
+        except:
+            pass
         return docinfo
     
     def getDocinfoFromImagePath(self,path,docinfo=None,cut=0):