Trees | Indices | Help |
|
---|
|
Provide a simplified database access system. This system has been designed to ease the development of reports.
The user needs to take care when using this interface. Since it returns real objects instead of database references, it can consume a significant amount of memory if the user is not careful.
A typical system of usage would be:
sa = SimpleAccess(database) print "Person : ", sa.name(person) print "Gender : ", sa.gender(person) print "Birth date : ", sa.birth_date(person) print "Birth place : ", sa.birth_place(person) print "Death date : ", sa.death_date(person) print "Death place : ", sa.death_place(person) print "Father : ", sa.name(sa.father(person)) print "Mother : ", sa.name(sa.mother(person)) print "Spouse : ", sa.name(sa.spouse(person)) print "Marriage Type : ", sa.marriage_type(person) print "Marriage Date : ", sa.marriage_date(person) print "Marriage Place: ", sa.marriage_place(person) for child in sa.children(person): print "Child : ", sa.name(child) # Print out burial and baptism events for event in sa.events( person , [ "Burial", "Baptism" ]): print "Event : ", sa.event_type(event), sa.event_date(event), print sa.event_place(event)
This would produce an output that looks like:
Person : Garner, Lewis Anderson Gender : male Birth date : 6/21/1855 Birth place : Great Falls, MT Death date : 6/28/1911 Death place : Twin Falls, ID Father : Garner, Robert W. Mother : Zielinski, Phoebe Emily Spouse : Martel, Luella Jacques Marriage Type : Married Marriage Date : 4/1/1875 Marriage Place: Paragould, AR Child : Garner, Eugene Stanley Child : Garner, Jesse V. Child : Garner, Raymond E. Child : Garner, Jennie S. Child : Garner, Walter E. Child : Garner, Daniel Webster Child : Garner, Bertha P. Child : Garner, Elizabeth Event : Burial 7/1/1911 Twin Falls, ID
Instance Methods | |||
|
|||
unicode |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
gen.lib.Person |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
list |
|
||
gen.lib.Person |
|
||
gen.lib.Person |
|
||
unicode |
|
||
gen.lib.Date |
|
||
unicode |
|
||
unicode |
|
||
gen.lib.Date |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
unicode |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
unicode |
|
||
unicode |
|
Method Details |
Initialize the SimpleAccess object with the database that will be used.
|
Return the name of the person, or and empty string if the person is None
|
Return the name of the person, or and empty string if the person is None
|
Return the first name of the person, or and empty string if the person is None
|
Return the GRAMPS ID of the person or family
|
Return a string representing the gender of the person
|
Return the primary spouse of the person
|
Return a string describing the relationship between the person and his/per primary spouse.
|
Return a string describing the place where the person and his/her spouse where married.
|
Return a string indicating the date when the person and his/her spouse where married.
|
Return a list of the children as the children of the primary spouse.
|
Return the primary father of the person or the father of the associated family.
|
Returns the primary mother of the person or the mother of the associated family.
|
Return a string indicating the date when the person's birth.
|
Return the date when the person's birth.
|
Return a string indicating the place of the person's birth.
|
Return a string indicating the date when the person's death.
|
Return the date when the person's death.
|
Return a string indicating the place of the person's death.
|
Return a string indicating the place of the event
|
Return a string representation a date_obj
|
Return a string indicating the date of the event
|
Return a string indicating the type of the event
|
Return a list of events associated with the object. This object can be either a gen.lib.Person or gen.lib.Family.
|
Return a list of events associated with the object. This object can be either a gen.lib.Person or gen.lib.Family.
|
Return a list of families in which the person is listed as a parent.
|
Return a list of families in which the person is listed as a child.
|
Return a all the people in the database, one at a time as an iterator. The user can treat this just like a list. For example: for person in sa.all_people(): sa.print(person)
|
Return all the families in the database, one at a time as an iterator. The user can treat this just like a list. For example: for person in sa.all_families(): sa.print(sa.father(person))
|
Return all the events in the database, one at a time as an iterator. The user can treat this just like a list. For example: for person in sa.all_events(): sa.print(sa.event_place(event))
|
Return all the sources in the database, one at a time as an iterator. The user can treat this just like a list. For example:
|
Return the title of the source.
|
Return the author of the source.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 9 21:52:23 2008 | http://epydoc.sourceforge.net |