Trees | Indices | Help |
|
---|
|
1 # 2 # Gramps - a GTK+/GNOME based genealogy program 3 # 4 # Copyright (C) 2000-2007 Donald N. Allingham 5 # 6 # This program is free software; you can redistribute it and/or modify 7 # it under the terms of the GNU General Public License as published by 8 # the Free Software Foundation; either version 2 of the License, or 9 # (at your option) any later version. 10 # 11 # This program is distributed in the hope that it will be useful, 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 # GNU General Public License for more details. 15 # 16 # You should have received a copy of the GNU General Public License 17 # along with this program; if not, write to the Free Software 18 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 # 20 21 # $Id: address.py 10103 2008-02-24 13:55:55Z acraphae $ 22 23 """ 24 Address class for GRAMPS. 25 """ 26 27 #------------------------------------------------------------------------- 28 # 29 # GRAMPS modules 30 # 31 #------------------------------------------------------------------------- 32 from gen.lib.secondaryobj import SecondaryObject 33 from gen.lib.privacybase import PrivacyBase 34 from gen.lib.srcbase import SourceBase 35 from gen.lib.notebase import NoteBase 36 from gen.lib.datebase import DateBase 37 from gen.lib.locationbase import LocationBase 38 39 #------------------------------------------------------------------------- 40 # 41 # Address for Person/Repository 42 # 43 #-------------------------------------------------------------------------46 """Provide address information.""" 4712749 """ 50 Create a new Address instance, copying from the source if provided. 51 """ 52 PrivacyBase.__init__(self, source) 53 SourceBase.__init__(self, source) 54 NoteBase.__init__(self, source) 55 DateBase.__init__(self, source) 56 LocationBase.__init__(self, source)5759 """ 60 Convert the object to a serialized tuple of data. 61 """ 62 return (PrivacyBase.serialize(self), 63 SourceBase.serialize(self), 64 NoteBase.serialize(self), 65 DateBase.serialize(self), 66 LocationBase.serialize(self))6769 """ 70 Convert a serialized tuple of data to an object. 71 """ 72 (privacy, source_list, note_list, date, location) = data 73 74 PrivacyBase.unserialize(self, privacy) 75 SourceBase.unserialize(self, source_list) 76 NoteBase.unserialize(self, note_list) 77 DateBase.unserialize(self, date) 78 LocationBase.unserialize(self, location) 79 return self8082 """ 83 Return the list of all textual attributes of the object. 84 85 @return: Returns the list of all textual attributes of the object. 86 @rtype: list 87 """ 88 return LocationBase.get_text_data_list(self)8991 """ 92 Return the list of child objects that may carry textual data. 93 94 @return: Returns the list of child objects that may carry textual data. 95 @rtype: list 96 """ 97 return self.source_list98100 """ 101 Return the list of child secondary objects that may refer notes. 102 103 @return: Returns the list of child secondary child objects that may refer notes. 104 @rtype: list 105 """ 106 return self.source_list107109 """ 110 Return the list of child objects which may, directly or through 111 their children, reference primary objects. 112 113 @return: Returns the list of objects referencing primary objects. 114 @rtype: list 115 """ 116 return self.source_list117119 """ 120 Return the list of (classname, handle) tuples for all directly 121 referenced primary objects. 122 123 @return: List of (classname, handle) tuples for referenced objects. 124 @rtype: list 125 """ 126 return self.get_referenced_note_handles()
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 9 21:53:24 2008 | http://epydoc.sourceforge.net |