* src/RelLib/_Note.py (serialize,unserialize): Save and read

change.
	* src/RelLib/_Repository.py (serialize,unserialize): Save and read
	change.


svn: r8188
This commit is contained in:
Alex Roitman 2007-02-20 07:21:16 +00:00
parent c603a7a2c7
commit 7836382732
3 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,8 @@
2007-02-19 Alex Roitman <shura@gramps-project.org>
* src/RelLib/_Note.py (serialize,unserialize): Save and read
change.
* src/RelLib/_Repository.py (serialize,unserialize): Save and read
change.
* src/GrampsDb/_GrampsDbWriteXML.py): Export top-level notes and
note references.
* src/RelLib/_Note.py (set_type,get_type): Add methods.

View File

@ -72,14 +72,15 @@ class Note(BasicPrimaryObject):
Converts the object to a serialized tuple of data
"""
return (self.handle,self.gramps_id,self.text,self.format,
self.type.serialize(),self.marker.serialize(),self.private)
self.type.serialize(),self.change,
self.marker.serialize(),self.private)
def unserialize(self, data):
"""
Converts a serialized tuple of data to an object
"""
(self.handle,self.gramps_id,self.text,self.format,
the_type,the_marker,self.private) = data
the_type,self.change,the_marker,self.private) = data
self.marker.unserialize(the_marker)
self.type.unserialize(the_type)

View File

@ -63,7 +63,7 @@ class Repository(NoteBase, AddressBase, UrlBase, PrimaryObject):
NoteBase.serialize(self),
AddressBase.serialize(self),
UrlBase.serialize(self),
self.marker.serialize(), self.private)
self.change, self.marker.serialize(), self.private)
def unserialize(self, data):
"""
@ -71,7 +71,7 @@ class Repository(NoteBase, AddressBase, UrlBase, PrimaryObject):
back into the data in an Repository structure.
"""
(self.handle, self.gramps_id, the_type, self.name, note_list,
address_list, urls, marker, self.private) = data
address_list, urls, self.change, marker, self.private) = data
self.marker.unserialize(marker)
self.type.unserialize(the_type)