diff MetaDataFolder.py @ 17:ba617e755c56

mostly finished attributions and copyright
author casties
date Tue, 02 Aug 2011 18:28:39 +0200
parents 41b90f09a1f2
children 611b6df70840
line wrap: on
line diff
--- a/MetaDataFolder.py	Tue Aug 02 13:38:01 2011 +0200
+++ b/MetaDataFolder.py	Tue Aug 02 18:28:39 2011 +0200
@@ -131,23 +131,23 @@
         obj = self.restrictedTraverse(xmlpath, None)
         return obj
 
-    def getXmlPathData(self, xmlpath, path=None, dom=None, allText=False, all=False):
+    def getXmlPathData(self, xmlpath, path=None, dom=None, recursive=0, all=False, allText=False):
         """returns contents of element at xmlpath as dict"""
         logging.error("getXmlPathData(%s)"%xmlpath)
         mdObj = self.getXmlPathObj(xmlpath)
         if mdObj is not None:
-            return mdObj.getData(path=path, dom=dom, allText=allText, all=all)
+            return mdObj.getData(path=path, dom=dom, recursive=recursive, all=all, allText=allText)
         else:
             logging.error("getXmlPathData: MetaData element at '%s' not found!"%xmlpath)
             return None
 
-    def getXmlPathFormatted(self, xmlpath, template, path=None, dom=None, data=None, allFields=False, allText=False, all=False):
+    def getXmlPathFormatted(self, xmlpath, template, path=None, dom=None, data=None, allFields=False, recursive=0, all=False, allText=False):
         """returns contents of element at xmlpath as dict"""
         logging.error("getXmlPathFormatted(xmlpath=%s, template=%s)"%(xmlpath,template))
         mdObj = self.getXmlPathObj(xmlpath)
         if mdObj is not None:
             if data is None:
-                data = mdObj.getData(path=path, dom=dom, allText=allText, all=all)
+                data = mdObj.getData(path=path, dom=dom, recursive=recursive, all=all, allText=allText)
                 
             if data is None:
                 return ''
@@ -188,9 +188,9 @@
         """returns formatted contents of access tag"""
         return self.getXmlPathFormatted('resource/meta/access-conditions/attribution', template, path=path, dom=dom, data=data, all=all)
     
-    def getCopyrightData(self, path=None, dom=None, all=True):
+    def getCopyrightData(self, path=None, dom=None, recursive=1, all=True):
         """returns contents of copyright tag as dict"""
-        return self.getXmlPathData('resource/meta/access-conditions/copyright', path=path, dom=dom, allText=True, all=all)
+        return self.getXmlPathData('resource/meta/access-conditions/copyright', path=path, dom=dom, recursive=recursive, all=all)
     
     def getCopyrightFormatted(self, template, path=None, dom=None, data=None, all=True):
         """returns formatted contents of access tag"""