~ubuntu-branches/ubuntu/utopic/gramps/utopic

« back to all changes in this revision

Viewing changes to src/gen/lib/ldsord.py

  • Committer: Package Import Robot
  • Author(s): James A. Treacy
  • Date: 2012-05-22 17:18:36 UTC
  • mfrom: (39.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20120522171836-35fi62lp4w7jnrd7
Tags: 3.4.0-1
* New upstream version
* Updated desktop file. Closes: #667472

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#
4
4
# Copyright (C) 2000-2007  Donald N. Allingham
5
5
# Copyright (C) 2010       Michiel D. Nauta
 
6
# Copyright (C) 2011       Tim G L Lyons
6
7
#
7
8
# This program is free software; you can redistribute it and/or modify
8
9
# it under the terms of the GNU General Public License as published by
19
20
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21
#
21
22
 
22
 
# $Id: ldsord.py 16592 2011-02-09 16:03:52Z m_d_n $
 
23
# $Id: ldsord.py 18548 2011-12-04 17:09:17Z kulath $
23
24
 
24
25
"""
25
26
LDS Ordinance class for GRAMPS.
39
40
#
40
41
#-------------------------------------------------------------------------
41
42
from gen.lib.secondaryobj import SecondaryObject
42
 
from gen.lib.srcbase import SourceBase
 
43
from gen.lib.citationbase import CitationBase
43
44
from gen.lib.notebase import NoteBase
44
45
from gen.lib.datebase import DateBase
45
46
from gen.lib.placebase import PlaceBase
51
52
# LDS Ordinance class
52
53
#
53
54
#-------------------------------------------------------------------------
54
 
class LdsOrd(SecondaryObject, SourceBase, NoteBase,
 
55
class LdsOrd(SecondaryObject, CitationBase, NoteBase,
55
56
             DateBase, PlaceBase, PrivacyBase):
56
57
    """
57
58
    Class that contains information about LDS Ordinances. 
116
117
 
117
118
    def __init__(self, source=None):
118
119
        """Create a LDS Ordinance instance."""
119
 
        SourceBase.__init__(self, source)
 
120
        CitationBase.__init__(self, source)
120
121
        NoteBase.__init__(self, source)
121
122
        DateBase.__init__(self, source)
122
123
        PlaceBase.__init__(self, source)
137
138
        """
138
139
        Convert the object to a serialized tuple of data.
139
140
        """
140
 
        return (SourceBase.serialize(self),
 
141
        return (CitationBase.serialize(self),
141
142
                NoteBase.serialize(self),
142
143
                DateBase.serialize(self),
143
144
                self.type, self.place,
147
148
        """
148
149
        Convert a serialized tuple of data to an object.
149
150
        """
150
 
        (source_list, note_list, date, self.type, self.place,
 
151
        (citation_list, note_list, date, self.type, self.place,
151
152
         self.famc, self.temple, self.status, self.private) = data
152
 
        SourceBase.unserialize(self, source_list)
 
153
        CitationBase.unserialize(self, citation_list)
153
154
        NoteBase.unserialize(self, note_list)
154
155
        DateBase.unserialize(self, date)
155
156
        return self
171
172
        :returns: Returns the list of child objects that may carry textual data.
172
173
        :rtype: list
173
174
        """
174
 
        return self.source_list
 
175
        return []
175
176
 
176
177
    def get_note_child_list(self):
177
178
        """
181
182
                refer notes.
182
183
        :rtype: list
183
184
        """
184
 
        return self.source_list
 
185
        return []
185
186
 
186
187
    def get_referenced_handles(self):
187
188
        """
191
192
        :returns: List of (classname, handle) tuples for referenced objects.
192
193
        :rtype: list
193
194
        """
194
 
        ret = self.get_referenced_note_handles()
 
195
        ret = self.get_referenced_note_handles() + \
 
196
                self.get_referenced_citation_handles()
195
197
        if self.place:
196
198
            ret += [('Place', self.place)]
197
199
        if self.famc:
206
208
        :returns: Returns the list of objects referencing primary objects.
207
209
        :rtype: list
208
210
        """
209
 
        return self.source_list
 
211
        return []
210
212
 
211
213
    def is_equivalent(self, other):
212
214
        """
241
243
        """
242
244
        self._merge_privacy(acquisition)
243
245
        self._merge_note_list(acquisition)
244
 
        self._merge_source_reference_list(acquisition)
 
246
        self._merge_citation_list(acquisition)
245
247
 
246
248
    def get_type(self):
247
249
        """