version 1.1, 2003/10/05 19:11:09
|
version 1.5, 2004/01/07 15:29:01
|
Line 527 class metacheck(Implicit, Persistent, Ro
|
Line 527 class metacheck(Implicit, Persistent, Ro
|
return [retstr,error] |
return [retstr,error] |
else: |
else: |
return ['','running'] |
return ['','running'] |
|
|
def __init__(self,path): |
def __init__(self,path): |
"""archive the documents in path""" |
"""archive the documents in path""" |
self.lines=[] |
self.lines=[] |
Line 636 def getText(nodelist):
|
Line 637 def getText(nodelist):
|
|
|
rc = "" |
rc = "" |
for node in nodelist: |
for node in nodelist: |
|
|
if node.nodeType == node.TEXT_NODE: |
if node.nodeType == node.TEXT_NODE: |
rc = rc + node.data |
rc = rc + node.data |
return rc |
return rc |
Line 734 def isdigilib2(path):
|
Line 736 def isdigilib2(path):
|
|
|
def isFullText(path,folder_name): |
def isFullText(path,folder_name): |
"""check if foldername in path is full text""" |
"""check if foldername in path is full text""" |
|
|
try: |
try: |
dom=xml.dom.minidom.parse(path+"/index.meta") |
dom=xml.dom.minidom.parse(path+"/index.meta") |
|
except: |
|
""" nothing""" |
|
return 0 |
for node in dom.getElementsByTagName("dir"): |
for node in dom.getElementsByTagName("dir"): |
|
|
if getText(node.getElementsByTagName("content-type")[0].childNodes)=="fulltext": |
try: |
|
child=getText(node.getElementsByTagName("content-type")[0].childNodes) |
|
|
|
if child =="fulltext": |
|
|
if getText(node.getElementsByTagName("name")[0].childNodes)==folder_name: |
if getText(node.getElementsByTagName("name")[0].childNodes)==folder_name: |
return 1 |
return 1 |
return 0 |
|
except: |
except: |
|
"""nothing""" |
|
#print "erro",node |
|
#print sys.exc_info() |
|
#return 0 |
|
|
return 0 |
return 0 |
|
|
|
|
|
|
def isPresentation(path,folder_name): |
def isPresentation(path,folder_name): |
"""check if foldername in path is full text""" |
"""check if foldername in path is full text""" |
try: |
try: |