Example #1
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in an Repository structure.
        """
        (self.handle, self.gramps_id, the_type, self.name, note, address_list, urls, marker, self.private) = data

        self.marker.unserialize(marker)
        self.type.unserialize(the_type)
        NoteBase.unserialize(self, note)
        AddressBase.unserialize(self, address_list)
        UrlBase.unserialize(self, urls)
Example #2
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in an Repository structure.
        """
        (self.handle, self.gramps_id, the_type, self.name, note,
         address_list, urls, marker, self.private) = data

        self.marker.unserialize(marker)
        self.type.unserialize(the_type)
        NoteBase.unserialize(self, note)
        AddressBase.unserialize(self, address_list)
        UrlBase.unserialize(self, urls)
Example #3
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in a Person object.

        @param data: tuple containing the persistent data associated the
            Person object
        @type data: tuple
        """
        (self.handle,             #  0
         self.gramps_id,          #  1
         self.gender,             #  2
         primary_name,            #  3
         alternate_names,         #  4
         self.death_ref_index,    #  5
         self.birth_ref_index,    #  6
         event_ref_list,          #  7
         self.family_list,        #  8
         self.parent_family_list, #  9
         media_list,              # 10
         address_list,            # 11
         attribute_list,          # 12
         urls,                    # 13
         lds_ord_list,            # 14
         source_list,             # 15
         note,                    # 16
         self.change,             # 17
         marker,                  # 18
         self.private,            # 19
         person_ref_list,         # 20
         ) = data

        self.marker.unserialize(marker)
        self.primary_name.unserialize(primary_name)
        self.alternate_names = [Name().unserialize(name)
                                for name in alternate_names]
        self.event_ref_list = [EventRef().unserialize(er)
                               for er in event_ref_list]
        self.person_ref_list = [PersonRef().unserialize(pr)
                                for pr in person_ref_list]
        MediaBase.unserialize(self, media_list)
        LdsOrdBase.unserialize(self, lds_ord_list)
        AddressBase.unserialize(self, address_list)
        AttributeBase.unserialize(self, attribute_list)
        UrlBase.unserialize(self, urls)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)