|
|
| version 1.15, 2004/03/03 13:02:54 | version 1.19, 2004/04/14 21:26:23 |
|---|---|
| Line 157 class OSAS_StoreOnline(SimpleItem): | Line 157 class OSAS_StoreOnline(SimpleItem): |
| """Test ob Eintrag ein Folder ist""" | """Test ob Eintrag ein Folder ist""" |
| return isFullText(path,folder_name) | return isFullText(path,folder_name) |
| def isPresentation(self,path,folder_name): | |
| """Test ob Eintrag ein Folder ist""" | |
| return isPresentation(path,folder_name) | |
| def date(self): | def date(self): |
| return strftime("%d.%m.%Y",localtime()) | return strftime("%d.%m.%Y",localtime()) |
| Line 165 class OSAS_StoreOnline(SimpleItem): | Line 169 class OSAS_StoreOnline(SimpleItem): |
| pt=PageTemplateFile('Products/OSA_system/zpt/OSAS_addFolder.zpt').__of__(self) | pt=PageTemplateFile('Products/OSA_system/zpt/OSAS_addFolder.zpt').__of__(self) |
| return pt() | return pt() |
| def showHelp(self,refType,genericTag): | |
| """helptext""" | |
| for reference in self.ZopeFind(self.standardMD): | |
| if reference[1].title==refType: | |
| text=getattr(reference[1],'md_'+genericTag)[2] | |
| return text | |
| return "NO EXPLANATION" | |
| def showHelpTag(self,url,reftype,item): | |
| """gen javascript for showhelp""" | |
| url2=url+'/showHelp?refType=%s&genericTag=%s'%(reftype,item) | |
| ret="""javascript:wd=window.open(\'%s\',\'Help\',\'width=300,height=250\');void(\'\');wd.focus();"""%url2 | |
| return ret | |
| def addFolder(self,path,folder_name,description,archive_creation_date,creator): | def addFolder(self,path,folder_name,description,archive_creation_date,creator): |
| """add the folder to the filesystem and write the metadata files""" | """add the folder to the filesystem and write the metadata files""" |
| Line 250 from AccessControl import ClassSecurityI | Line 267 from AccessControl import ClassSecurityI |
| from AccessControl.Role import RoleManager | from AccessControl.Role import RoleManager |
| from Acquisition import Implicit | from Acquisition import Implicit |
| from Globals import Persistent | from Globals import Persistent |
| try: | |
| from time import strptime | from time import strptime |
| except: | |
| print "ignoring time.strptime import" | |
| from time import strftime | from time import strftime |
| import time | import time |
| import os.path | import os.path |
| Line 952 def hasMetafile(path): | Line 973 def hasMetafile(path): |
| return os.path.exists(path+"/index.meta") | return os.path.exists(path+"/index.meta") |
| #return path | #return path |
| def isdigilib2(path): | def isdigilib2(path): |
| """check if folder is candidate for digilib without metadata""" | """check if folder is candidate for digilib without metadata""" |
| try: | try: |
| Line 1161 def isScannedDocument(self,path): | Line 1184 def isScannedDocument(self,path): |
| try: | try: |
| dom = xml.dom.minidom.parseString(lines) | dom = xml.dom.minidom.parseString(lines) |
| content_type=getText(dom.getElementsByTagName("content-type")[0].childNodes) | content_type=getText(dom.getElementsByTagName("content-type")[0].childNodes) |
| if (content_type=="scanned-document") or (content_type=="scanned document"): | if (content_type=="scanned-document") or (content_type=="scanned document") or (content_type=="fulltext document"): |
| return 1 | return 1 |
| else: | else: |
| return 0 | return 0 |