def unserialize(self, data): """ Convert a serialized tuple of data to an object. """ (citation_list, note_list, date, self.type, self.place, self.famc, self.temple, self.status, self.private) = data CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note_list) DateBase.unserialize(self, date) return self
def unserialize(self, data): """ Convert a serialized tuple of data to an object. """ (privacy, citation_list, note_list, date, location) = data PrivacyBase.unserialize(self, privacy) CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note_list) DateBase.unserialize(self, date) LocationBase.unserialize(self, location) return self
def unserialize(self, data): """ Convert a serialized tuple of data to an object. """ (privacy, citation_list, note_list, date, self.first_name, surname_list, self.suffix, self.title, name_type, self.group_as, self.sort_as, self.display_as, self.call, self.nick, self.famnick) = data self.type = NameType(name_type) PrivacyBase.unserialize(self, privacy) SurnameBase.unserialize(self, surname_list) CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note_list) DateBase.unserialize(self, date) return self
def unserialize(self, data): """ Convert the data held in a tuple created by the serialize method back into the data in an Event structure. :param data: tuple containing the persistent data associated the object :type data: tuple """ (self.handle, self.gramps_id, self.path, self.mime, self.desc, attribute_list, citation_list, note_list, self.change, date, tag_list, self.private) = data AttributeBase.unserialize(self, attribute_list) CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note_list) DateBase.unserialize(self, date) TagBase.unserialize(self, tag_list)
def __init__(self, source=None, data=None): """Create a new Name instance, copying from the source if provided. We should connect here to 'person-groupname-rebuild' and do something correct when first parameter is the name, and second parameter is different from the group here. However, that would be complicated and no real errors that cannot be ammended can be done if group is saved differently. """ PrivacyBase.__init__(self, source) SurnameBase.__init__(self, source) CitationBase.__init__(self, source) NoteBase.__init__(self, source) DateBase.__init__(self, source) if data: (privacy, citation_list, note, date, self.first_name, surname_list, self.suffix, self.title, name_type, self.group_as, self.sort_as, self.display_as, self.call, self.nick, self.famnick) = data self.type = NameType(name_type) SurnameBase.unserialize(self, surname_list) PrivacyBase.unserialize(self, privacy) CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note) DateBase.unserialize(self, date) elif source: self.first_name = source.first_name self.suffix = source.suffix self.title = source.title self.type = NameType(source.type) self.group_as = source.group_as self.sort_as = source.sort_as self.display_as = source.display_as self.call = source.call self.nick = source.nick self.famnick = source.famnick else: self.first_name = "" self.suffix = "" self.title = "" self.type = NameType() self.group_as = "" self.sort_as = self.DEF self.display_as = self.DEF self.call = u'' self.nick = u'' self.famnick = u''
def unserialize(self, data): """ Convert the data held in a tuple created by the serialize method back into the data in an Event structure. :param data: tuple containing the persistent data associated the Person object :type data: tuple """ (self.handle, self.gramps_id, the_type, date, self.__description, self.place, citation_list, note_list, media_list, attribute_list, self.change, self.private) = data self.__type = EventType() self.__type.unserialize(the_type) DateBase.unserialize(self, date) MediaBase.unserialize(self, media_list) AttributeBase.unserialize(self, attribute_list) CitationBase.unserialize(self, citation_list) NoteBase.unserialize(self, note_list) return self
def unserialize(self, data): """ Convert the data held in a tuple created by the serialize method back into the data in a Citation structure. """ ( self.handle, # 0 self.gramps_id, # 1 date, # 2 self.page, # 3 self.confidence, # 4 self.source_handle, # 5 note_list, # 6 media_list, # 7 self.datamap, # 8 self.change, # 9 self.private # 10 ) = data DateBase.unserialize(self, date) NoteBase.unserialize(self, note_list) MediaBase.unserialize(self, media_list) return self