version 1.4, 2005/03/03 20:41:00
|
version 1.5, 2005/03/07 19:33:42
|
Line 6 from OFS.Folder import Folder
|
Line 6 from OFS.Folder import Folder
|
from AccessControl import ClassSecurityInfo |
from AccessControl import ClassSecurityInfo |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
from Products.PageTemplates.PageTemplateFile import PageTemplateFile |
import os.path |
import os.path |
|
import sys |
import xml.dom.minidom |
import xml.dom.minidom |
import xml.dom.pulldom |
import xml.dom.pulldom |
import OSAS_helpers |
import OSAS_helpers |
Line 262 class OSAS_Metadata(Folder):
|
Line 263 class OSAS_Metadata(Folder):
|
|
|
def getDisplayFieldsAsStr(self,indexMeta): |
def getDisplayFieldsAsStr(self,indexMeta): |
ret=[] |
ret=[] |
|
if indexMeta and not (indexMeta==""): |
dom=xml.dom.pulldom.parseString(indexMeta) |
dom=xml.dom.pulldom.parseString(indexMeta) |
|
|
for (event,node) in dom: |
for (event,node) in dom: |
Line 284 class OSAS_Metadata(Folder):
|
Line 285 class OSAS_Metadata(Folder):
|
"""nothing""" |
"""nothing""" |
|
|
return "; ".join(ret) |
return "; ".join(ret) |
|
else: |
|
return "" |
|
|
def getDisplayFieldsAsStrOLD(self,indexMeta): |
def getDisplayFieldsAsStrOLD(self,indexMeta): |
"""Gebe display fields als string zurück |
"""Gebe display fields als string zurück |
Line 391 class OSAS_Metadata(Folder):
|
Line 394 class OSAS_Metadata(Folder):
|
MDF_path=MDF_path[0] |
MDF_path=MDF_path[0] |
|
|
indexFile=os.path.join(MDF_path,'index.meta') |
indexFile=os.path.join(MDF_path,'index.meta') |
print "load index file",indexFile |
|
server=xmlrpclib.Server(self.serverUrl) |
server=xmlrpclib.Server(self.serverUrl) |
if newdoc: |
if newdoc: |
if not actualNode: actualNode=newdoc |
if not actualNode: actualNode=newdoc |
dom=newdoc |
dom=newdoc |
else: |
else: |
documentStr=server.getFile(indexFile) |
documentStr=server.getFile(indexFile) |
print indexFile |
|
print "ds",documentStr |
|
if documentStr: |
if documentStr: |
print "hhh" |
|
newdoc=xml.dom.minidom.parseString(documentStr) |
newdoc=xml.dom.minidom.parseString(documentStr) |
dom=newdoc.documentElement |
dom=newdoc.documentElement |
actualNode=dom |
actualNode=dom |
|
|
|
|
else: |
else: |
print "ho2" |
|
impl=xml.dom.minidom.getDOMImplementation() |
impl=xml.dom.minidom.getDOMImplementation() |
newdoc=None |
newdoc=None |
|
|
Line 438 class OSAS_Metadata(Folder):
|
Line 440 class OSAS_Metadata(Folder):
|
else: |
else: |
xpathStr=MDF_xpathStart |
xpathStr=MDF_xpathStart |
|
|
print xpathStr,actualNode |
|
xpathNodes=xml.xpath.Evaluate(xpathStr,actualNode) |
xpathNodes=xml.xpath.Evaluate(xpathStr,actualNode) |
|
|
|
|