Mercurial > hg > documentViewer
comparison documentViewer.py @ 73:0f534c12cc9e
minor
author | dwinter |
---|---|
date | Tue, 04 Nov 2008 21:23:49 +0100 |
parents | 6412c45dff58 |
children | 5c9837484085 |
comparison
equal
deleted
inserted
replaced
72:1493ff41d380 | 73:0f534c12cc9e |
---|---|
238 | 238 |
239 logger("documentViewer (accessOK)", logging.INFO, "unknown access type %s"%access) | 239 logger("documentViewer (accessOK)", logging.INFO, "unknown access type %s"%access) |
240 return False | 240 return False |
241 | 241 |
242 | 242 |
243 def getDirinfoFromDigilib(self,path,docinfo=None): | 243 def getDirinfoFromDigilib(self,path,docinfo=None,cut=0): |
244 """gibt param von dlInfo aus""" | 244 """gibt param von dlInfo aus""" |
245 num_retries = 3 | 245 num_retries = 3 |
246 if docinfo is None: | 246 if docinfo is None: |
247 docinfo = {} | 247 docinfo = {} |
248 | 248 |
249 for x in range(cut): | |
250 path=getParentDir(path) | |
249 infoUrl=self.digilibBaseUrl+"/dirInfo-xml.jsp?mo=dir&fn="+path | 251 infoUrl=self.digilibBaseUrl+"/dirInfo-xml.jsp?mo=dir&fn="+path |
250 | 252 |
251 logger("documentViewer (getparamfromdigilib)", logging.INFO, "dirInfo from %s"%(infoUrl)) | 253 logger("documentViewer (getparamfromdigilib)", logging.INFO, "dirInfo from %s"%(infoUrl)) |
252 | 254 |
253 for cnt in range(num_retries): | 255 for cnt in range(num_retries): |
517 logger("documentViewer (getdocinfofromimagepath)", logging.INFO,"path: %s"%(path)) | 519 logger("documentViewer (getdocinfofromimagepath)", logging.INFO,"path: %s"%(path)) |
518 if docinfo is None: | 520 if docinfo is None: |
519 docinfo = {} | 521 docinfo = {} |
520 path=path.replace("/mpiwg/online","") | 522 path=path.replace("/mpiwg/online","") |
521 docinfo['imagePath'] = path | 523 docinfo['imagePath'] = path |
522 docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo) | 524 docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut) |
523 imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path | 525 imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path |
524 docinfo['imageURL'] = imageUrl | 526 docinfo['imageURL'] = imageUrl |
525 | 527 |
526 docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) | 528 docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) |
527 docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) | 529 docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) |