--- OSAS/OSA_system/OSAS_Root.py 2004/04/05 21:54:42 1.7 +++ OSAS/OSA_system/OSAS_Root.py 2004/05/10 15:54:40 1.9 @@ -3,6 +3,8 @@ from Acquisition import Implicit from OFS.Folder import Folder from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplate import PageTemplate +import urllib +import re class OSAS_Root(Folder,Implicit): """Implicit Folder of the Storage Systems""" @@ -47,6 +49,20 @@ class OSAS_Root(Folder,Implicit): self.uploadServletUrl=uploadServletUrl except: return "http://foxridge.rz-berlin.mpg.de:8000/upload/up" + + def downloadExternalXML(self,index_meta_url,xml_url): + """lade xml file""" + xmlneu=urllib.urlopen(xml_url).read() + + path=re.sub(self.REQUEST['SERVER_URL'],'',index_meta_url) + path=re.sub('http://foxridge.mpiwg-berlin.mpg.de:8080','',path) # falls foxridge als server + path=re.sub('http://foxridge.mpiwg-berlin.mpg.de','',path) # falls foxridge als server + + fh=open(path,'w') + fh.write(xmlneu) + fh.close() + return "ok" + def manage_AddOSAS_RootForm(self): """interface for adding the OSAS_root""" pt=PageTemplateFile('Products/OSA_system/zpt/AddOSAS_Root.zpt').__of__(self)