Пример #1
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (source_list, note, date, self.type, self.place, self.famc, self.temple, self.status) = data
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     DateBase.unserialize(self, date)
     return self
Пример #2
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (source_list, note, date, self.type, self.place, self.famc,
      self.temple, self.status) = data
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     DateBase.unserialize(self, date)
     return self
Пример #3
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, source_list, note, ref, self.rel) = data
     PrivacyBase.unserialize(self, privacy)
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     return self
Пример #4
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, source_list, note, the_type, self.value) = data
     PrivacyBase.unserialize(self, privacy)
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     self.type.unserialize(the_type)
     return self
Пример #5
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, source_list, note, date, location) = data
     
     PrivacyBase.unserialize(self, privacy)
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     DateBase.unserialize(self, date)
     LocationBase.unserialize(self, location)
     return self
Пример #6
0
 def unserialize(self, data):
     """
     Converts a serialized tuple of data to an object
     """
     (privacy, source_list, note, date,
      self.first_name, self.surname, self.suffix, self.title,
      name_type, self.prefix, self.patronymic,
      self.group_as, self.sort_as, self.display_as, self.call) = data
     self.type.unserialize(name_type)
     PrivacyBase.unserialize(self, privacy)
     SourceBase.unserialize(self, source_list)
     NoteBase.unserialize(self, note)
     DateBase.unserialize(self, date)
     return self
Пример #7
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)
Пример #8
0
    def unserialize(self, data):
        """
        Converts 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, source_list, note, self.change, date, marker,
         self.private) = data

        self.marker.unserialize(marker)
        AttributeBase.unserialize(self, attribute_list)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)
        DateBase.unserialize(self, date)
Пример #9
0
    def unserialize(self, data):
        """
        Converts 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, source_list, note, self.change,
         date, marker, self.private) = data

        self.marker.unserialize(marker)
        AttributeBase.unserialize(self, attribute_list)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)
        DateBase.unserialize(self, date)
Пример #10
0
 def __init__(self, source=None, data=None):
     """creates a new Name instance, copying from the source if provided"""
     SecondaryObject.__init__(self)
     PrivacyBase.__init__(self, source)
     SourceBase.__init__(self, source)
     NoteBase.__init__(self, source)
     DateBase.__init__(self, source)
     if data:
         (privacy, source_list, note, date,
          self.first_name, self.surname, self.suffix, self.title,
          name_type, self.prefix, self.patronymic,
          self.group_as, self.sort_as, self.display_as, self.call) = data
         self.type = NameType(name_type)
         PrivacyBase.unserialize(self, privacy)
         SourceBase.unserialize(self, source_list)
         NoteBase.unserialize(self, note)
         DateBase.unserialize(self, date)
     elif source:
         self.first_name = source.first_name
         self.surname = source.surname
         self.suffix = source.suffix
         self.title = source.title
         self.type = source.type
         self.prefix = source.prefix
         self.patronymic = source.patronymic
         self.group_as = source.group_as
         self.sort_as = source.sort_as
         self.display_as = source.display_as
         self.call = source.call
     else:
         self.first_name = ""
         self.surname = ""
         self.suffix = ""
         self.title = ""
         self.type = NameType()
         self.prefix = ""
         self.patronymic = ""
         self.group_as = ""
         self.sort_as = self.DEF
         self.display_as = self.DEF
         self.call = u''
Пример #11
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in a Family structure.
        """
        (self.handle, self.gramps_id, self.father_handle, self.mother_handle,
         child_ref_list, the_type, event_ref_list, media_list,
         attribute_list, lds_seal_list, source_list, note,
         self.change, marker, self.private) = data

        self.marker.unserialize(marker)
        self.type.unserialize(the_type)
        self.event_ref_list = [EventRef().unserialize(er)
                               for er in event_ref_list]
        self.child_ref_list = [ChildRef().unserialize(cr)
                               for cr in child_ref_list]
        MediaBase.unserialize(self, media_list)
        AttributeBase.unserialize(self, attribute_list)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)
        LdsOrdBase.unserialize(self, lds_seal_list)
Пример #12
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in a Place object.

        @param data: tuple containing the persistent data associated the
            Person object
        @type data: tuple
        """
        (self.handle, self.gramps_id, self.title, self.long, self.lat,
         main_loc, alt_loc, urls, media_list, source_list, note,
         self.change, marker, self.private) = data

        if main_loc == None:
            self.main_loc = None
        else:
            self.main_loc = Location().unserialize(main_loc)
        self.alt_loc = [Location().unserialize(al) for al in alt_loc]
        self.marker.unserialize(marker)
        UrlBase.unserialize(self, urls)
        MediaBase.unserialize(self, media_list)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)
Пример #13
0
    def unserialize(self, data):
        """
        Converts the data held in a tuple created by the serialize method
        back into the data in a Family structure.
        """
        (self.handle, self.gramps_id, self.father_handle, self.mother_handle,
         child_ref_list, the_type, event_ref_list, media_list, attribute_list,
         lds_seal_list, source_list, note, self.change, marker,
         self.private) = data

        self.marker.unserialize(marker)
        self.type.unserialize(the_type)
        self.event_ref_list = [
            EventRef().unserialize(er) for er in event_ref_list
        ]
        self.child_ref_list = [
            ChildRef().unserialize(cr) for cr in child_ref_list
        ]
        MediaBase.unserialize(self, media_list)
        AttributeBase.unserialize(self, attribute_list)
        SourceBase.unserialize(self, source_list)
        NoteBase.unserialize(self, note)
        LdsOrdBase.unserialize(self, lds_seal_list)