version 1.120, 2010/10/13 15:35:41
|
version 1.143, 2010/10/19 09:41:04
|
Line 187 class documentViewer(Folder):
|
Line 187 class documentViewer(Folder):
|
return self.template.fulltextclient.getSearch(**args) |
return self.template.fulltextclient.getSearch(**args) |
|
|
def getGisPlaces(self, **args): |
def getGisPlaces(self, **args): |
"""get search""" |
"""get gis places""" |
return self.template.fulltextclient.getGisPlaces(**args) |
return self.template.fulltextclient.getGisPlaces(**args) |
|
|
|
def getAllGisPlaces(self, **args): |
|
"""get all gis places """ |
|
return self.template.fulltextclient.getAllGisPlaces(**args) |
|
|
|
def getOrigPages(self, **args): |
|
"""get original page number """ |
|
return self.template.fulltextclient.getOrigPages(**args) |
|
|
def getNumPages(self, docinfo): |
def getNumPages(self, docinfo): |
"""get numpages""" |
"""get numpages""" |
return self.template.fulltextclient.getNumPages(docinfo) |
return self.template.fulltextclient.getNumPages(docinfo) |
Line 235 class documentViewer(Folder):
|
Line 243 class documentViewer(Folder):
|
self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" |
self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" |
|
|
docinfo = self.getDocinfo(mode=mode,url=url) |
docinfo = self.getDocinfo(mode=mode,url=url) |
|
#pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) |
pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) |
pageinfo = self.getPageinfo(start=start,current=pn,docinfo=docinfo) |
|
''' ZDES ''' |
pt = getattr(self.template, 'thumbs_main_rss') |
pt = getattr(self.template, 'thumbs_main_rss') |
|
|
if viewMode=="auto": # automodus gewaehlt |
if viewMode=="auto": # automodus gewaehlt |
Line 561 class documentViewer(Folder):
|
Line 571 class documentViewer(Folder):
|
path=getParentDir(path) |
path=getParentDir(path) |
dom = self.getDomFromIndexMeta(path) |
dom = self.getDomFromIndexMeta(path) |
|
|
#docinfo['indexMetaPath']=self.getIndexMetaPath(path); |
|
|
|
#result= dom.xpath("//result/resultPage") |
|
#docinfo['numPages']=int(getTextFromNode(result[0])) |
|
|
|
#result =dom.xpath("//name") |
|
docinfo['name']=getTextFromNode(dom.xpath("/resource/name")[0]) |
docinfo['name']=getTextFromNode(dom.xpath("/resource/name")[0]) |
logging.debug("documentViewer docinfo[name] %s"%docinfo['name']) |
logging.debug("documentViewer docinfo[name] %s"%docinfo['name']) |
|
|
#logging.debug("documentViewer (getbibinfofromindexmeta) using mapping for %s"%bibtype) |
|
return docinfo |
return docinfo |
|
|
def getDocinfoFromTextTool(self, url, dom=None, docinfo=None): |
def getDocinfoFromTextTool(self, url, dom=None, docinfo=None): |
Line 660 class documentViewer(Folder):
|
Line 662 class documentViewer(Folder):
|
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 |
docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom) |
docinfo = self.getNameFromIndexMeta(url, docinfo=docinfo, dom=dom) |
|
#docinfo =self.getOrigPages(docinfo=docinfo) |
|
|
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 |
Line 740 class documentViewer(Folder):
|
Line 743 class documentViewer(Folder):
|
raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode)) |
raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode)) |
|
|
logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) |
logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) |
|
#logging.debug("documentViewer (getdocinfo) docinfo: %s"%) |
self.REQUEST.SESSION['docinfo'] = docinfo |
self.REQUEST.SESSION['docinfo'] = docinfo |
return docinfo |
return docinfo |
|
|
Line 747 class documentViewer(Folder):
|
Line 751 class documentViewer(Folder):
|
"""returns pageinfo with the given parameters""" |
"""returns pageinfo with the given parameters""" |
pageinfo = {} |
pageinfo = {} |
current = getInt(current) |
current = getInt(current) |
|
|
pageinfo['current'] = current |
pageinfo['current'] = current |
rows = int(rows or self.thumbrows) |
rows = int(rows or self.thumbrows) |
pageinfo['rows'] = rows |
pageinfo['rows'] = rows |
Line 766 class documentViewer(Folder):
|
Line 771 class documentViewer(Folder):
|
pageinfo['numgroups'] += 1 |
pageinfo['numgroups'] += 1 |
pageinfo['viewMode'] = viewMode |
pageinfo['viewMode'] = viewMode |
pageinfo['tocMode'] = tocMode |
pageinfo['tocMode'] = tocMode |
#pageinfo['characterNormalization'] =characterNormalization |
pageinfo ['originalPage'] = self.getOrigPages(docinfo=None, pageinfo=None) |
pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization',' ') |
pageinfo['characterNormalization'] = self.REQUEST.get('characterNormalization',' ') |
pageinfo['query'] = self.REQUEST.get('query',' ') |
pageinfo['query'] = self.REQUEST.get('query',' ') |
pageinfo['queryType'] = self.REQUEST.get('queryType',' ') |
pageinfo['queryType'] = self.REQUEST.get('queryType',' ') |
Line 779 class documentViewer(Folder):
|
Line 784 class documentViewer(Folder):
|
toc = int (pageinfo['tocPN']) |
toc = int (pageinfo['tocPN']) |
pageinfo['textPages'] =int (toc) |
pageinfo['textPages'] =int (toc) |
|
|
|
|
|
|
if 'tocSize_%s'%tocMode in docinfo: |
if 'tocSize_%s'%tocMode in docinfo: |
tocSize = int(docinfo['tocSize_%s'%tocMode]) |
tocSize = int(docinfo['tocSize_%s'%tocMode]) |
tocPageSize = int(pageinfo['tocPageSize']) |
tocPageSize = int(pageinfo['tocPageSize']) |