diff MpdlXmlTextServer.py @ 559:eabfbad6aeb4

"extended" layer for index view and some bugfixes.
author casties
date Fri, 28 Sep 2012 18:50:59 +0200
parents c56bc63436de
children 9255acc4518d
line wrap: on
line diff
--- a/MpdlXmlTextServer.py	Fri Sep 28 11:25:25 2012 +0200
+++ b/MpdlXmlTextServer.py	Fri Sep 28 18:50:59 2012 +0200
@@ -52,6 +52,17 @@
         return getHttpData(url,data,timeout=self.timeout)
 
 
+    def getTextDownloadUrl(self, type='xml', docinfo=None):
+        """returns a URL to download the current text"""
+        docpath = docinfo.get('textURLPath', None)
+        if not docpath:
+            return None
+
+        docpath = docpath.replace('.xml','.'+type)
+        url = '%sgetDoc?doc=%s'%(self.serverUrl.replace('interface/',''), docpath)
+        return url
+
+
     def getPlacesOnPage(self, docinfo=None, pn=None):
         """Returns list of GIS places of page pn"""
         docpath = docinfo.get('textURLPath',None)