def serialize(self): """ Converts the data held in the Place to a Python tuple that represents all the data elements. This method is used to convert the object into a form that can easily be saved to a database. These elements may be primative Python types (string, integers), complex Python types (lists or tuples, or Python objects. If the target database cannot handle complex types (such as objectes or lists), the database is responsible for converting the data into a form that it can use. @returns: Returns a python tuple containing the data that should be considered persistent. @rtype: tuple """ if self.main_loc == None or self.main_loc.serialize() == _EMPTY_LOC: main_loc = None else: main_loc = self.main_loc.serialize() return (self.handle, self.gramps_id, self.title, self.long, self.lat, main_loc, [al.serialize() for al in self.alt_loc], UrlBase.serialize(self), MediaBase.serialize(self), SourceBase.serialize(self), NoteBase.serialize(self), self.change, self.marker.serialize() ,self.private)
def serialize(self): """ Converts the data held in the event to a Python tuple that represents all the data elements. This method is used to convert the object into a form that can easily be saved to a database. These elements may be primative Python types (string, integers), complex Python types (lists or tuples, or Python objects. If the target database cannot handle complex types (such as objectes or lists), the database is responsible for converting the data into a form that it can use. @returns: Returns a python tuple containing the data that should be considered persistent. @rtype: tuple """ return (self.handle, self.gramps_id, self.father_handle, self.mother_handle, [cr.serialize() for cr in self.child_ref_list], self.type.serialize(), [er.serialize() for er in self.event_ref_list], MediaBase.serialize(self), AttributeBase.serialize(self), LdsOrdBase.serialize(self), SourceBase.serialize(self), NoteBase.serialize(self), self.change, self.marker.serialize(), self.private)
def serialize(self): """ Converts the object to a serialized tuple of data """ return (self.handle, self.gramps_id, unicode(self.title), unicode(self.author), unicode(self.pubinfo), NoteBase.serialize(self), MediaBase.serialize(self), unicode(self.abbrev), self.change, self.datamap, [rr.serialize() for rr in self.reporef_list], self.marker.serialize(), self.private)
def serialize(self): """ Converts the object to a serialized tuple of data """ return (self.handle, self.gramps_id, unicode(self.title), unicode(self.author), unicode(self.pubinfo), NoteBase.serialize(self), MediaBase.serialize(self), unicode(self.abbrev), self.change,self.datamap, [rr.serialize() for rr in self.reporef_list], self.marker.serialize(),self.private)
def serialize(self): """ Converts the data held in the Person to a Python tuple that represents all the data elements. This method is used to convert the object into a form that can easily be saved to a database. These elements may be primative Python types (string, integers), complex Python types (lists or tuples, or Python objects. If the target database cannot handle complex types (such as objectes or lists), the database is responsible for converting the data into a form that it can use. @returns: Returns a python tuple containing the data that should be considered persistent. @rtype: tuple """ return ( self.handle, # 0 self.gramps_id, # 1 self.gender, # 2 self.primary_name.serialize(), # 3 [name.serialize() for name in self.alternate_names], # 4 self.death_ref_index, # 5 self.birth_ref_index, # 6 [er.serialize() for er in self.event_ref_list], # 7 self.family_list, # 8 self.parent_family_list, # 9 MediaBase.serialize(self), # 10 AddressBase.serialize(self), # 11 AttributeBase.serialize(self), # 12 UrlBase.serialize(self), # 13 LdsOrdBase.serialize(self), # 14 SourceBase.serialize(self), # 15 NoteBase.serialize(self), # 16 self.change, # 17 self.marker.serialize(), # 18 self.private, # 19 [pr.serialize() for pr in self.person_ref_list] # 20 )