7157: better support for objects having citations as subobjects

This commit is contained in:
Benny Malengier 2014-01-15 09:33:30 +01:00 committed by Jérôme Rapinat
parent d96b0ee74c
commit e70849f4f0

View File

@ -187,6 +187,8 @@ class CitationBase(object):
for item in self.get_citation_child_list(): for item in self.get_citation_child_list():
list += item.get_citation_list() list += item.get_citation_list()
for subitem in item.get_citation_child_list():
list += subitem.get_citation_list()
return list return list
def has_citation_reference(self, citation_handle): def has_citation_reference(self, citation_handle):
@ -325,3 +327,14 @@ class IndirectCitationBase(object):
""" """
for item in self.get_citation_child_list(): for item in self.get_citation_child_list():
item.remove_citation_references(citation_handle_list) item.remove_citation_references(citation_handle_list)
def get_citation_list(self):
"""
Return the list of :class:`~gen.lib.citation.Citation` handles
associated with the object. For an IndirectCitationBase this is always
the empty list
:returns: The list of :class:`~gen.lib.citation.Citation` handles
:rtype: list
"""
return []