Trees | Indices | Help |
|
---|
|
Introduction ============ The Person record is the GRAMPS in-memory representation of an individual person. It contains all the information related to an individual. Usage ===== Person objects are usually created in one of two ways. 1. Creating a new person object, which is then initialized and added to the database. 2. Retrieving an object from the database using the records handle. Once a Person object has been modified, it must be committed to the database using the database object's commit_person function, or the changes will be lost.
Instance Methods | |||
|
|||
tuple |
|
||
|
|||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
|
|||
Name |
|
||
list |
|
||
|
|||
|
|||
|
|||
|
|||
int |
|
||
|
|||
|
|||
EventRef |
|
||
event_ref |
|
||
|
|||
list |
|
||
list |
|
||
|
|||
|
|||
bool |
|
||
list |
|
||
|
|||
|
|||
bool |
|
||
list |
|
||
list |
|
||
|
|||
|
|||
tuple |
|
||
bool |
|
||
str |
|
||
|
|||
list |
|
||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
Class Variables | |
UNKNOWN = 2
|
|
MALE = 1
|
|
FEMALE = 0
|
Method Details |
Create a new Person instance. After initialization, most data items have empty or null values, including the database handle.
|
Convert 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.
|
Convert the data held in a tuple created by the serialize method back into the data in a Person object.
|
Return the list of all textual attributes of the object.
|
Return the list of child objects that may carry textual data.
|
Return the list of child secondary objects that may refer sources.
|
Return the list of child secondary objects that may refer notes.
|
Return the list of (classname, handle) tuples for all directly referenced primary objects.
|
Return the list of child objects which may, directly or through their children, reference primary objects.
|
Set the primary name of the Person to the specified Name instance. |
Return the Name instance marked as the Person's primary name.
|
Return the list of alternate Name instances.
|
Change the list of alternate names to the passed list.
|
Add a Name instance to the list of alternative names. |
Set the gender of the Person.
|
Return the gender of the Person.
|
Assign the birth event to the Person object. This is accomplished by assigning the EventRef of the birth event in the current database.
|
Assign the death event to the Person object. This is accomplished by assigning the EventRef of the death event in the current database.
|
Return the EventRef for Person's birth event. This should correspond to an Event in the database's Event list. |
Return the EventRef for the Person's death event. This should correspond to an Event in the database's Event list. |
Add the EventRef to the Person instance's EventRef list. This is accomplished by assigning the EventRef of a valid Event in the current database. |
Return the list of EventRef objects associated with Event instances.
|
Return the list of EventRef objects associated with Event instances that have been marked as primary events.
|
Set the Person instance's EventRef list to the passed list.
|
Add the Family handle to the Person instance's Family list. This is accomplished by assigning the handle of a valid Family in the current database. Adding a Family handle to a Person does not automatically update the corresponding Family. The developer is responsible to make sure that when a Family is added to Person, that the Person is assigned to either the father or mother role in the Family. |
Set the family_handle specified to be the preferred Family. The preferred Family is determined by the first Family in the Family list, and is typically used to indicate the preferred Family for navigation or reporting. The family_handle must already be in the list, or the function call has no effect. |
Return the list of Family handles in which the person is a parent or spouse.
|
Assign the passed list to the Person's list of families in which it is a parent or spouse.
|
Remove the specified Family handle from the list of marriages/partnerships. If the handle does not exist in the list, the operation has no effect.
|
Return the list of Family handles in which the person is a child.
|
Return the list of Family handles in which the person is a child.
|
Add the Family handle to the Person instance's list of families in which it is a child. This is accomplished by assigning the handle of a valid Family in the current database. Adding a Family handle to a Person does not automatically update the corresponding Family. The developer is responsible to make sure that when a Family is added to Person, that the Person is added to the Family instance's child list. |
Remove the specified Family handle from the list of parent families (families in which the parent is a child). If the handle does not exist in the list, the operation has no effect.
|
Set the main Family in which the Person is a child. The main Family is the Family typically used for reports and navigation. This is accomplished by moving the Family to the beginning of the list. The family_handle must be in the list for this to have any effect. |
Return the handle of the Family considered to be the main Family in which the Person is a child.
|
|
Return the list of PersonRef objects.
|
Set the Person instance's PersonRef list to the passed list.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Mar 9 21:52:40 2008 | http://epydoc.sourceforge.net |