version 1.9, 2010/08/19 12:02:55
|
version 1.12, 2010/08/20 14:03:47
|
Line 130 class MpdlXmlTextServer(SimpleItem):
|
Line 130 class MpdlXmlTextServer(SimpleItem):
|
docinfo['numPages'] = text.count("<pb ") |
docinfo['numPages'] = text.count("<pb ") |
return docinfo |
return docinfo |
|
|
def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization=""): |
def getTextPage(self, mode="text", pn=1, docinfo=None, pageinfo=None, highlightQuery=None,sn=None, viewMode=None, tocMode=None, tocPN=None, characterNormalization="reg"): |
"""returns single page from fulltext""" |
"""returns single page from fulltext""" |
docpath = docinfo['textURLPath'] |
docpath = docinfo['textURLPath'] |
path = docinfo['textURLPath'] |
path = docinfo['textURLPath'] |
Line 144 class MpdlXmlTextServer(SimpleItem):
|
Line 144 class MpdlXmlTextServer(SimpleItem):
|
textmode = "textPollux" |
textmode = "textPollux" |
else: |
else: |
textmode = mode |
textmode = mode |
|
logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization)) |
textParam = "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn) |
textParam = "document=%s&mode=%s&pn=%s"%(docpath,textmode,pn) |
if highlightQuery is not None: |
if highlightQuery is not None: |
textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn) |
textParam +="&highlightQuery=%s&sn=%s"%(highlightQuery,sn) |
Line 310 class MpdlXmlTextServer(SimpleItem):
|
Line 310 class MpdlXmlTextServer(SimpleItem):
|
|
|
page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&characterNormalization=%s'%(selfurl,url, viewMode, tocMode, tocPN, characterNormalization)) |
page = data.replace('page-fragment.xql?document=%s'%str(path),'%s?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&characterNormalization=%s'%(selfurl,url, viewMode, tocMode, tocPN, characterNormalization)) |
text = page.replace('mode=image','mode=texttool') |
text = page.replace('mode=image','mode=texttool') |
|
logging.debug("documentViewer (characterNormalization) characterNormalization: %s"%(characterNormalization)) |
|
logging.debug("documentViewer (characterNormalization) text: %s"%(text)) |
return text |
return text |
|
|
def manage_changeMpdlXmlTextServer(self,title="",serverUrl="http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/interface/",timeout=40,RESPONSE=None): |
def manage_changeMpdlXmlTextServer(self,title="",serverUrl="http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/interface/",timeout=40,RESPONSE=None): |