# HG changeset patch # User casties # Date 1355855102 -3600 # Node ID 1f845c76dad365ff934af8120224911ca0244012 # Parent a0a147409f67495487ad45512e9ab079cbd7494c all getXXX take recursive and all parameters. diff -r a0a147409f67 -r 1f845c76dad3 MetaDataFolder.py --- 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"): diff -r a0a147409f67 -r 1f845c76dad3 version.txt --- 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