Package GrampsDb :: Module _GrampsDbBase :: Class GrampsDbBase
[frames] | no frames]

Class GrampsDbBase

source code


GRAMPS database object. This object is a base class for all database interfaces.

Instance Methods
 
__init__(self)
Creates a new GrampsDbBase instance.
source code
 
set_prefixes(self, person, media, family, source, place, event, repository, note) source code
 
rebuild_secondary(self, callback) source code
 
version_supported(self)
Returns True when the file has a supported version
source code
 
need_upgrade(self) source code
 
gramps_upgrade(self) source code
 
create_id(self) source code
 
get_person_cursor(self) source code
 
get_person_cursor_iter(self, msg='Processing Person records') source code
 
get_family_cursor(self) source code
 
get_family_cursor_iter(self, msg='Processing Family records') source code
 
get_event_cursor(self) source code
 
get_event_cursor_iter(self, msg='Processing Event records') source code
 
get_place_cursor(self) source code
 
get_place_cursor_iter(self, msg='Processing Place records') source code
 
get_source_cursor(self) source code
 
get_source_cursor_iter(self, msg='Processing Source records') source code
 
get_media_cursor(self) source code
 
get_media_cursor_iter(self, msg='Processing Media records') source code
 
get_repository_cursor(self) source code
 
get_repository_cursor_iter(self, msg='Processing Repository records') source code
 
get_note_cursor(self) source code
 
get_note_cursor_iter(self, msg='Processing Note records') source code
 
open_undodb(self) source code
 
close_undodb(self) source code
 
load(self, name, callback, mode='w')
Opens the specified database.
source code
 
load_from(self, other_database, filename, callback)
Loads data from the other database into itself.
source code
 
close(self)
Closes the specified database.
source code
 
is_open(self)
Returns 1 if the database has been opened.
source code
 
request_rebuild(self)
Notifies clients that the data has change significantly, and that all internal data dependent on the database should be rebuilt.
source code
 
commit_person(self, person, transaction, change_time=None)
Commits the specified Person to the database, storing the changes as part of the transaction.
source code
 
commit_media_object(self, obj, transaction, change_time=None)
Commits the specified MediaObject to the database, storing the changes as part of the transaction.
source code
 
commit_source(self, source, transaction, change_time=None)
Commits the specified Source to the database, storing the changes as part of the transaction.
source code
 
commit_place(self, place, transaction, change_time=None)
Commits the specified Place to the database, storing the changes as part of the transaction.
source code
 
commit_personal_event(self, event, transaction, change_time=None) source code
 
commit_family_event(self, event, transaction, change_time=None) source code
 
commit_event(self, event, transaction, change_time=None)
Commits the specified Event to the database, storing the changes as part of the transaction.
source code
 
commit_family(self, family, transaction, change_time=None)
Commits the specified Family to the database, storing the changes as part of the transaction.
source code
 
commit_repository(self, repository, transaction, change_time=None)
Commits the specified Repository to the database, storing the changes as part of the transaction.
source code
 
commit_note(self, note, transaction, change_time=None)
Commits the specified Note to the database, storing the changes as part of the transaction.
source code
 
find_next_person_gramps_id(self)
Returns the next available GRAMPS' ID for a Person object based off the person ID prefix.
source code
 
find_next_place_gramps_id(self)
Returns the next available GRAMPS' ID for a Place object based off the person ID prefix.
source code
 
find_next_event_gramps_id(self)
Returns the next available GRAMPS' ID for a Event object based off the person ID prefix.
source code
 
find_next_object_gramps_id(self)
Returns the next available GRAMPS' ID for a MediaObject object based off the person ID prefix.
source code
 
find_next_source_gramps_id(self)
Returns the next available GRAMPS' ID for a Source object based off the person ID prefix.
source code
 
find_next_family_gramps_id(self)
Returns the next available GRAMPS' ID for a Family object based off the person ID prefix.
source code
 
find_next_repository_gramps_id(self)
Returns the next available GRAMPS' ID for a Respository object based off the repository ID prefix.
source code
 
find_next_note_gramps_id(self)
Returns the next available GRAMPS' ID for a Note object based off the repository ID prefix.
source code
 
get_person_from_handle(self, handle)
Finds a Person in the database from the passed gramps' ID.
source code
 
get_source_from_handle(self, handle)
Finds a Source in the database from the passed gramps' ID.
source code
 
get_object_from_handle(self, handle)
Finds an Object in the database from the passed gramps' ID.
source code
 
get_place_from_handle(self, handle)
Finds a Place in the database from the passed gramps' ID.
source code
 
get_event_from_handle(self, handle)
Finds a Event in the database from the passed gramps' ID.
source code
 
get_family_from_handle(self, handle)
Finds a Family in the database from the passed gramps' ID.
source code
 
get_repository_from_handle(self, handle)
Finds a Repository in the database from the passed gramps' ID.
source code
 
get_note_from_handle(self, handle)
Finds a Note in the database from the passed gramps' ID.
source code
 
find_person_from_handle(self, handle, transaction)
Finds a Person in the database from the passed GRAMPS ID.
source code
 
find_source_from_handle(self, handle, transaction)
Finds a Source in the database from the passed handle.
source code
 
find_event_from_handle(self, handle, transaction)
Finds a Event in the database from the passed handle.
source code
 
find_object_from_handle(self, handle, transaction)
Finds an MediaObject in the database from the passed handle.
source code
 
find_place_from_handle(self, handle, transaction)
Finds a Place in the database from the passed handle.
source code
 
find_family_from_handle(self, handle, transaction)
Finds a Family in the database from the passed handle.
source code
 
find_repository_from_handle(self, handle, transaction)
Finds a Repository in the database from the passed handle.
source code
 
find_note_from_handle(self, handle, transaction)
Finds a Note in the database from the passed handle.
source code
 
check_person_from_handle(self, handle, transaction)
Checks whether a Person with the passed handle exists in the database.
source code
 
check_source_from_handle(self, handle, transaction)
Checks whether a Source with the passed handle exists in the database.
source code
 
check_event_from_handle(self, handle, transaction)
Checks whether an Event with the passed handle exists in the database.
source code
 
check_object_from_handle(self, handle, transaction)
Checks whether a MediaObject with the passed handle exists in the database.
source code
 
check_place_from_handle(self, handle, transaction)
Checks whether a Place with the passed handle exists in the database.
source code
 
check_family_from_handle(self, handle, transaction)
Checks whether a Family with the passed handle exists in the database.
source code
 
check_repository_from_handle(self, handle, transaction)
Checks whether a Repository with the passed handle exists in the database.
source code
 
check_note_from_handle(self, handle, transaction)
Checks whether a Note with the passed handle exists in the database.
source code
 
get_person_from_gramps_id(self, val)
Finds a Person in the database from the passed GRAMPS ID.
source code
 
get_family_from_gramps_id(self, val)
Finds a Family in the database from the passed GRAMPS ID.
source code
 
get_event_from_gramps_id(self, val)
Finds an Event in the database from the passed GRAMPS ID.
source code
 
get_place_from_gramps_id(self, val)
Finds a Place in the database from the passed gramps' ID.
source code
 
get_source_from_gramps_id(self, val)
Finds a Source in the database from the passed gramps' ID.
source code
 
get_object_from_gramps_id(self, val)
Finds a MediaObject in the database from the passed gramps' ID.
source code
 
get_repository_from_gramps_id(self, val)
Finds a Repository in the database from the passed gramps' ID.
source code
 
get_note_from_gramps_id(self, val)
Finds a Note in the database from the passed gramps' ID.
source code
 
add_person(self, person, transaction)
Adds a Person to the database, assigning internal IDs if they have not already been defined.
source code
 
add_family(self, family, transaction)
Adds a Family to the database, assigning internal IDs if they have not already been defined.
source code
 
add_source(self, source, transaction)
Adds a Source to the database, assigning internal IDs if they have not already been defined.
source code
 
add_event(self, event, transaction)
Adds an Event to the database, assigning internal IDs if they have not already been defined.
source code
 
add_person_event(self, event, transaction)
Adds an Event to the database, assigning internal IDs if they have not already been defined.
source code
 
add_family_event(self, event, transaction)
Adds an Event to the database, assigning internal IDs if they have not already been defined.
source code
 
add_place(self, place, transaction)
Adds a Place to the database, assigning internal IDs if they have not already been defined.
source code
 
add_object(self, obj, transaction)
Adds a MediaObject to the database, assigning internal IDs if they have not already been defined.
source code
 
add_repository(self, obj, transaction)
Adds a Repository to the database, assigning internal IDs if they have not already been defined.
source code
 
add_note(self, obj, transaction)
Adds a Note to the database, assigning internal IDs if they have not already been defined.
source code
 
get_name_group_mapping(self, name)
Returns the default grouping name for a surname
source code
 
get_name_group_keys(self)
Returns the defined names that have been assigned to a default grouping
source code
 
set_name_group_mapping(self, name, group)
Sets the default grouping name for a surname.
source code
 
get_number_of_people(self)
Returns the number of people currently in the databse.
source code
 
get_number_of_families(self)
Returns the number of families currently in the databse.
source code
 
get_number_of_events(self)
Returns the number of events currently in the databse.
source code
 
get_number_of_places(self)
Returns the number of places currently in the databse.
source code
 
get_number_of_sources(self)
Returns the number of sources currently in the databse.
source code
 
get_number_of_media_objects(self)
Returns the number of media objects currently in the databse.
source code
 
get_number_of_repositories(self)
Returns the number of source repositories currently in the databse.
source code
 
get_number_of_notes(self)
Returns the number of notes currently in the databse.
source code
 
get_person_handles(self, sort_handles=True)
Returns a list of database handles, one handle for each Person in the database.
source code
 
get_place_handles(self, sort_handles=True)
Returns a list of database handles, one handle for each Place in the database.
source code
 
get_source_handles(self, sort_handles=True)
Returns a list of database handles, one handle for each Source in the database.
source code
 
get_media_object_handles(self, sort_handles=True)
Returns a list of database handles, one handle for each MediaObject in the database.
source code
 
get_event_handles(self)
Returns a list of database handles, one handle for each Event in the database.
source code
 
get_family_handles(self)
Returns a list of database handles, one handle for each Family in the database.
source code
 
get_repository_handles(self)
Returns a list of database handles, one handle for each Repository in the database.
source code
 
get_note_handles(self)
Returns a list of database handles, one handle for each Note in the database.
source code
 
get_gramps_ids(self, obj_key) source code
 
has_gramps_id(self, obj_key, gramps_id) source code
 
find_initial_person(self) source code
 
set_person_id_prefix(self, val)
Sets the naming template for GRAMPS Person ID values.
source code
 
set_source_id_prefix(self, val)
Sets the naming template for GRAMPS Source ID values.
source code
 
set_object_id_prefix(self, val)
Sets the naming template for GRAMPS MediaObject ID values.
source code
 
set_place_id_prefix(self, val)
Sets the naming template for GRAMPS Place ID values.
source code
 
set_family_id_prefix(self, val)
Sets the naming template for GRAMPS Family ID values.
source code
 
set_event_id_prefix(self, val)
Sets the naming template for GRAMPS Event ID values.
source code
 
set_repository_id_prefix(self, val)
Sets the naming template for GRAMPS Repository ID values.
source code
 
set_note_id_prefix(self, val)
Sets the naming template for GRAMPS Note ID values.
source code
 
transaction_begin(self, msg='', batch=False, no_magic=False)
Creates a new Transaction tied to the current UNDO database.
source code
 
transaction_commit(self, transaction, msg)
Commits the transaction to the assocated UNDO database.
source code
 
undo_available(self)
returns boolean of whether or not there's a possibility of undo
source code
 
redo_available(self)
returns boolean of whether or not there's a possibility of redo
source code
 
undo(self, update_history=True)
Accesses the last committed transaction, and reverts the data to the state before the transaction was committed.
source code
 
redo(self, update_history=True)
Accesses the last undone transaction, and reverts the data to the state before the transaction was undone.
source code
 
undo_reference(self, data, handle) source code
 
undo_data(self, data, handle, db_map, signal_root) source code
 
set_undo_callback(self, callback)
Defines the callback function that is called whenever an undo operation is executed.
source code
 
set_redo_callback(self, callback)
Defines the callback function that is called whenever an redo operation is executed.
source code
 
get_surname_list(self)
Returns the list of locale-sorted surnames contained in the database.
source code
 
build_surname_list(self)
Builds the list of locale-sorted surnames contained in the database.
source code
 
sort_surname_list(self) source code
 
add_to_surname_list(self, person, batch_transaction) source code
 
remove_from_surname_list(self, person)
Check whether there are persons with the same surname left in the database.
source code
 
get_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_family_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_event_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_place_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_source_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_media_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_repo_bookmarks(self)
returns the list of Person handles in the bookmarks
source code
 
get_note_bookmarks(self)
returns the list of Note handles in the bookmarks
source code
 
set_researcher(self, owner)
sets the information about the owner of the database
source code
 
get_researcher(self)
returns the Researcher instance, providing information about the owner of the database
source code
 
set_default_person_handle(self, handle)
sets the default Person to the passed instance