comparison MetaDataFolder.py @ 20:9a1e75e708e1

small bugs in metadata context field in metadata docinfo added osa_system2 nicht mehr noetig
author dwinter
date Sun, 23 Oct 2011 21:29:02 +0200
parents 611b6df70840
children 5ed16f971297 d036de7fd78d
comparison
equal deleted inserted replaced
19:bd3025a6a6c0 20:9a1e75e708e1
123 return dom 123 return dom
124 124
125 def getXmlPathObj(self, xmlpath): 125 def getXmlPathObj(self, xmlpath):
126 """returns object at xmlpath""" 126 """returns object at xmlpath"""
127 # make xmlpath relative for Zope 127 # make xmlpath relative for Zope
128 logging.debug("XMlPAth:"+xmlpath)
128 if xmlpath[0] == '/': 129 if xmlpath[0] == '/':
129 xmlpath = xmlpath[1:] 130 xmlpath = xmlpath[1:]
130 131
131 obj = self.restrictedTraverse(xmlpath, None) 132 obj = self.restrictedTraverse(xmlpath, None)
132 return obj 133 return obj
195 196
196 def getCopyrightFormatted(self, template, path=None, dom=None, data=None, recursive=1, all=True): 197 def getCopyrightFormatted(self, template, path=None, dom=None, data=None, recursive=1, all=True):
197 """returns formatted contents of access tag""" 198 """returns formatted contents of access tag"""
198 # information is two tags deep - recursive=1 199 # information is two tags deep - recursive=1
199 return self.getXmlPathFormatted('resource/meta/access-conditions/copyright', template, path=path, dom=dom, data=data, recursive=recursive, all=all) 200 return self.getXmlPathFormatted('resource/meta/access-conditions/copyright', template, path=path, dom=dom, data=data, recursive=recursive, all=all)
201
202 def getContextData(self, path=None, dom=None, all=True):
203 """returns contents of context tag as dict"""
204 # information is two tags deep - recursive=1
205
206 return self.getXmlPathData('resource/meta/context', path=path, dom=dom, all=all)
207
200 208
201 def getBibData(self, path=None, dom=None): 209 def getBibData(self, path=None, dom=None):
202 """returns contents of bib tag as dict""" 210 """returns contents of bib tag as dict"""
203 return self.resource.meta.bib.getData(path=path, dom=dom) 211 return self.resource.meta.bib.getData(path=path, dom=dom)
204 212