changeset 33:1f845c76dad3

all getXXX take recursive and all parameters.
author casties
date Tue, 18 Dec 2012 19:25:02 +0100
parents a0a147409f67
children 460c286c252e
files MetaDataFolder.py version.txt
diffstat 2 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MetaDataFolder.py	Tue Dec 11 16:05:50 2012 -0500
+++ b/MetaDataFolder.py	Tue Dec 18 19:25:02 2012 +0100
@@ -148,25 +148,25 @@
             logging.error("getXmlPathFormatted: MetaData object for '%s' not found!"%xmlpath)
             return ''
 
-    def getResourceData(self, path=None, dom=None):
+    def getResourceData(self, path=None, dom=None, recursive=0, all=False):
         """returns contents of resource tag as dict"""
-        return self.getXmlPathData('resource', path=path, dom=dom)
+        return self.getXmlPathData('resource', path=path, dom=dom, recursive=recursive, all=all)
 
     def getTexttoolData(self, path=None, dom=None, recursive=0, all=False):
         """returns contents of texttool tag as dict"""
         return self.getXmlPathData('resource/meta/texttool', path=path, dom=dom, recursive=recursive, all=all)
 
-    def getAccessData(self, path=None, dom=None):
+    def getAccessData(self, path=None, dom=None, recursive=0, all=False):
         """returns contents of access tag as dict"""
-        return self.getXmlPathData('resource/meta/access-conditions/access', path=path, dom=dom)
+        return self.getXmlPathData('resource/meta/access-conditions/access', path=path, dom=dom, recursive=recursive, all=all)
     
-    def getAttributionData(self, path=None, dom=None, all=True):
+    def getAttributionData(self, path=None, dom=None, recursive=0, all=True):
         """returns contents of attribution tag as dict"""
-        return self.getXmlPathData('resource/meta/access-conditions/attribution', path=path, dom=dom, all=all)
+        return self.getXmlPathData('resource/meta/access-conditions/attribution', path=path, dom=dom, recursive=recursive, all=all)
     
-    def getAttributionFormatted(self, template, path=None, dom=None, data=None, all=True):
+    def getAttributionFormatted(self, template, path=None, dom=None, data=None, recursive=0, all=True):
         """returns formatted contents of access tag"""
-        return self.getXmlPathFormatted('resource/meta/access-conditions/attribution', template, path=path, dom=dom, data=data, all=all)
+        return self.getXmlPathFormatted('resource/meta/access-conditions/attribution', template, path=path, dom=dom, data=data, recursive=recursive, all=all)
     
     def getCopyrightData(self, path=None, dom=None, recursive=1, all=True):
         """returns contents of copyright tag as dict"""
@@ -178,10 +178,10 @@
         # information is two tags deep - recursive=1
         return self.getXmlPathFormatted('resource/meta/access-conditions/copyright', template, path=path, dom=dom, data=data, recursive=recursive, all=all)
     
-    def getContextData(self, path=None, dom=None, all=True):
+    def getContextData(self, path=None, dom=None, recursive=0, all=True):
         """returns contents of context tag as dict"""
         # information is two tags deep - recursive=1
-        return self.getXmlPathData('resource/meta/context', path=path, dom=dom,  all=all)
+        return self.getXmlPathData('resource/meta/context', path=path, dom=dom, recursive=recursive,  all=all)
         
     
     def getDRI(self, path=None, dom=None, type="escidoc"):
--- a/version.txt	Tue Dec 11 16:05:50 2012 -0500
+++ b/version.txt	Tue Dec 18 19:25:02 2012 +0100
@@ -1,1 +1,1 @@
-2.0.2
\ No newline at end of file
+2.0.3
\ No newline at end of file