version 1.38, 2009/03/06 15:36:38
|
version 1.41, 2010/02/12 14:33:02
|
Line 213 class documentViewer(Folder):
|
Line 213 class documentViewer(Folder):
|
ps = "&".join(["%s=%s"%(k,urllib.quote(v)) for (k, v) in params.items()]) |
ps = "&".join(["%s=%s"%(k,urllib.quote(v)) for (k, v) in params.items()]) |
url=self.REQUEST['URL1']+"?"+ps |
url=self.REQUEST['URL1']+"?"+ps |
return url |
return url |
|
|
def getInfo_xml(self,url,mode): |
def getInfo_xml(self,url,mode): |
"""returns info about the document as XML""" |
"""returns info about the document as XML""" |
|
|
Line 385 class documentViewer(Folder):
|
Line 386 class documentViewer(Folder):
|
path=getParentDir(path) |
path=getParentDir(path) |
dom = self.getIndexMeta(path) |
dom = self.getIndexMeta(path) |
|
|
|
logging.debug("documentViewer (getbibinfofromindexmeta cutted) path: %s"%(path)) |
# put in all raw bib fields as dict "bib" |
# put in all raw bib fields as dict "bib" |
bib = dom.xpath("//bib/*") |
bib = dom.xpath("//bib/*") |
if bib and len(bib)>0: |
if bib and len(bib)>0: |
Line 499 class documentViewer(Folder):
|
Line 501 class documentViewer(Folder):
|
|
|
docinfo['textURL'] = textUrl |
docinfo['textURL'] = textUrl |
|
|
|
textUrls=dom.xpath("//texttool/text-url-path") |
|
if textUrls and (len(textUrls)>0): |
|
textUrl=getTextFromNode(textUrls[0]) |
|
|
|
docinfo['textURLPath'] = textUrl |
|
|
presentationUrls=dom.xpath("//texttool/presentation") |
presentationUrls=dom.xpath("//texttool/presentation") |
docinfo = self.getBibinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) # get info von bib tag |
docinfo = self.getBibinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) # get info von bib tag |
|
|
if presentationUrls and (len(presentationUrls)>0): # ueberschreibe diese durch presentation informationen |
if presentationUrls and (len(presentationUrls)>0): # ueberschreibe diese durch presentation informationen |
# presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten |
# presentation url ergiebt sich ersetzen von index.meta in der url der fuer die Metadaten |
# durch den relativen Pfad auf die presentation infos |
# durch den relativen Pfad auf die presentation infos |
presentationUrl=url.replace('index.meta',getTextFromNode(presentationUrls[0])) |
presentationPath = getTextFromNode(presentationUrls[0]) |
|
if url.endswith("index.meta"): |
|
presentationUrl=url.replace('index.meta',presentationPath) |
|
else: |
|
presentationUrl=url + "/" + presentationPath |
|
|
docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl,docinfo=docinfo,dom=dom) |
docinfo = self.getBibinfoFromTextToolPresentation(presentationUrl,docinfo=docinfo,dom=dom) |
|
|
docinfo = self.getAuthinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) # get access info |
docinfo = self.getAuthinfoFromIndexMeta(url,docinfo=docinfo,dom=dom) # get access info |
Line 539 class documentViewer(Folder):
|
Line 552 class documentViewer(Folder):
|
docinfo['imagePath'] = path |
docinfo['imagePath'] = path |
docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut) |
docinfo=self.getDirinfoFromDigilib(path,docinfo=docinfo,cut=cut) |
|
|
|
pathorig=path |
for x in range(cut): |
for x in range(cut): |
path=getParentDir(path) |
path=getParentDir(path) |
logging.error("PATH:"+path) |
logging.error("PATH:"+path) |
imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path |
imageUrl=self.digilibBaseUrl+"/servlet/Scaler?fn="+path |
docinfo['imageURL'] = imageUrl |
docinfo['imageURL'] = imageUrl |
|
|
docinfo = self.getBibinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) |
#path ist the path to the images it assumes that the index.meta file is one level higher. |
docinfo = self.getAuthinfoFromIndexMeta(path,docinfo=docinfo,cut=cut) |
docinfo = self.getBibinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) |
|
docinfo = self.getAuthinfoFromIndexMeta(pathorig,docinfo=docinfo,cut=cut+1) |
return docinfo |
return docinfo |
|
|
|
|