Ejemplo n.º 1
0
 def iter_people(self, order_by=None):
     """
     Protected version of iter_people
     """
     if order_by:
         retval = []
         for person in filter(None, self.db.iter_people()):
             if self.__is_living(person):
                 if self.mode == self.MODE_EXCLUDE_ALL:
                     continue
                 else:
                     retval.append(self.__restrict_person(person))
             else:
                 retval.append(person)
         retval = sort_objects(retval, order_by, self)
         for item in retval:
             yield item
     else:
         for person in filter(None, self.db.iter_people()):
             if self.__is_living(person):
                 if self.mode == self.MODE_EXCLUDE_ALL:
                     continue
                 else:
                     yield self.__restrict_person(person)
             else:
                 yield person
Ejemplo n.º 2
0
 def iter_notes(self, order_by=None):
     """
     Return an iterator over objects for Notes in the database
     """
     if order_by:
         return sort_objects(map(self.get_note_from_handle, self.nlist), order_by, self)
     else:
         return map(self.get_note_from_handle, self.nlist)
Ejemplo n.º 3
0
 def iter_families(self, order_by=None):
     """
     Return an iterator over objects for Families in the database
     """
     if order_by:
         return sort_objects(map(self.get_family_from_handle, self.flist), order_by, self)
     else:
         return map(self.get_family_from_handle, self.flist)
Ejemplo n.º 4
0
 def iter_events(self, order_by=None):
     """
     Return an iterator over objects for Events in the database
     """
     if order_by:
         return sort_objects(map(self.get_event_from_handle, self.elist), order_by, self)
     else:
         return map(self.get_event_from_handle, self.elist)
Ejemplo n.º 5
0
 def iter_people(self, order_by=None):
     """
     Return an iterator over objects for Persons in the database
     """
     if order_by:
         return sort_objects(map(self.get_person_from_handle, self.plist), order_by, self)
     else:
         return map(self.get_person_from_handle, self.plist)
Ejemplo n.º 6
0
 def iter_events(self, order_by=None):
     """
     Return an iterator over objects for Events in the database
     """
     if order_by:
         return sort_objects(map(self.get_event_from_handle, self.elist),
                             order_by, self)
     else:
         return map(self.get_event_from_handle, self.elist)
Ejemplo n.º 7
0
 def iter_people(self, order_by=None):
     """
     Return an iterator over objects for Persons in the database
     """
     if order_by:
         return sort_objects(map(self.get_person_from_handle, self.plist),
                             order_by, self)
     else:
         return map(self.get_person_from_handle, self.plist)