示例#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
     """
     (date, privacy, note, self.confidence, ref, self.page,
      self.text) = data
     DateBase.unserialize(self, date)
     PrivacyBase.unserialize(self, privacy)
     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
     """
     (date, privacy, note,
      self.confidence, ref, self.page, self.text) = data
     DateBase.unserialize(self, date)
     PrivacyBase.unserialize(self, privacy)
     NoteBase.unserialize(self, note)
     RefBase.unserialize(self, ref)
     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 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)
示例#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 __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''