Package gen :: Package proxy :: Module living :: Class LivingProxyDb
[frames] | no frames]

Class LivingProxyDb

source code


A proxy to a Gramps database. This proxy will act like a Gramps database, but all living people will be hidden from the user.

Instance Methods
 
__init__(self, db, mode, current_year=None, years_after_death=0)
Create a new LivingProxyDb instance.
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 handle.
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
 
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
 
get_person_handles(self, sort_handles=True)
Return a list of database handles, one handle for each Person in the database.
source code
 
get_place_handles(self, sort_handles=True)
Return a list of database handles, one handle for each Place in the database.
source code
 
get_source_handles(self, sort_handles=True)
Return a list of database handles, one handle for each Source in the database.
source code
 
get_media_object_handles(self, sort_handles=True)
Return a list of database handles, one handle for each MediaObject in the database.
source code
 
get_event_handles(self)
Return a list of database handles, one handle for each Event in the database.
source code
 
get_family_handles(self)
Return a list of database handles, one handle for each Family in the database.
source code
 
get_repository_handles(self)
Return a list of database handles, one handle for each Repository in the database.
source code
 
get_note_handles(self)
Return a list of database handles, one handle for each Note in the database.
source code
 
get_researcher(self)
returns the Researcher instance, providing information about the owner of the database
source code
 
get_default_person(self)
returns the default Person of the database
source code
 
get_default_handle(self)
returns the default Person of the database
source code
 
has_person_handle(self, handle)
returns True if the handle exists in the current Person database.
source code
 
has_event_handle(self, handle)
returns True if the handle exists in the current Event database.
source code
 
has_source_handle(self, handle)
returns True if the handle exists in the current Source database.
source code
 
has_place_handle(self, handle)
returns True if the handle exists in the current Place database.
source code
 
has_family_handle(self, handle)
returns True if the handle exists in the current Family database.
source code
 
has_object_handle(self, handle)
returns True if the handle exists in the current MediaObjectdatabase.
source code
 
has_repository_handle(self, handle)
returns True if the handle exists in the current Repository database.
source code
 
has_note_handle(self, handle)
returns True if the handle exists in the current Note database.
source code
 
find_backlink_handles(self, handle, include_classes=None)
Find all objects that hold a reference to the object handle.
source code

Inherited from proxybase.ProxyDbBase: delete_primary_from_reference_map, get_bookmarks, get_child_column_order, get_child_reference_types, get_event_bookmarks, get_event_column_order, get_event_roles, get_family_attribute_types, get_family_bookmarks, get_family_event_types, get_family_list_column_order, get_family_relation_types, get_gramps_ids, get_marker_types, get_media_attribute_types, get_media_bookmarks, get_media_column_order, get_mediapath, get_name_group_keys, get_name_group_mapping, get_name_types, get_note_bookmarks, get_note_column_order, get_note_types, get_number_of_events, get_number_of_families, get_number_of_media_objects, get_number_of_notes, get_number_of_people, get_number_of_places, get_number_of_repositories, get_number_of_sources, get_person_attribute_types, get_person_column_order, get_person_event_types, get_place_bookmarks, get_place_column_order, get_raw_event_data, get_raw_family_data, get_raw_note_data, get_raw_object_data, get_raw_person_data, get_raw_place_data, get_raw_repository_data, get_raw_source_data, get_repo_bookmarks, get_repository_column_order, get_repository_types, get_save_path, get_source_bookmarks, get_source_column_order, get_source_media_types, get_url_types, has_gramps_id, has_name_group_key, is_open, reindex_reference_map, set_child_column_order, set_column_order, set_event_column_order, set_family_list_column_order, set_media_column_order, set_note_column_order, set_person_column_order, set_place_column_order, set_repository_column_order, set_source_column_order, update_reference_map

Inherited from dbbase.DbBase: add_event, add_family, add_family_event, add_note, add_object, add_person, add_person_event, add_place, add_repository, add_source, add_to_surname_list, build_surname_list, check_event_from_handle, check_family_from_handle, check_note_from_handle, check_object_from_handle, check_person_from_handle, check_place_from_handle, check_repository_from_handle, check_source_from_handle, close, close_undodb, commit_base, commit_event, commit_family, commit_family_event, commit_media_object, commit_note, commit_person, commit_personal_event, commit_place, commit_repository, commit_source, create_id, del_event, del_family, del_media, del_note, del_person, del_place, del_repository, del_source, do_commit, find_event_from_handle, find_family_from_handle, find_initial_person, find_next_event_gramps_id, find_next_family_gramps_id, find_next_note_gramps_id, find_next_object_gramps_id, find_next_person_gramps_id, find_next_place_gramps_id, find_next_repository_gramps_id, find_next_source_gramps_id, find_note_from_handle, find_object_from_handle, find_person_from_handle, find_place_from_handle, find_repository_from_handle, find_source_from_handle, get_event_cursor, get_event_cursor_iter, get_family_cursor, get_family_cursor_iter, get_media_cursor, get_media_cursor_iter, get_note_cursor, get_note_cursor_iter, get_person_cursor, get_person_cursor_iter, get_place_cursor, get_place_cursor_iter, get_repository_cursor, get_repository_cursor_iter, get_source_cursor, get_source_cursor_iter, get_surname_list, gramps_upgrade, load, load_from, need_upgrade, open_undodb, rebuild_secondary, redo, redo_available, remove_event, remove_family, remove_from_surname_list, remove_note, remove_object, remove_person, remove_place, remove_repository, remove_source, request_rebuild, set_default_person_handle, set_event_id_prefix, set_family_id_prefix, set_mediapath, set_name_group_mapping, set_note_id_prefix, set_object_id_prefix, set_person_id_prefix, set_place_id_prefix, set_prefixes, set_redo_callback, set_repository_id_prefix, set_researcher, set_save_path, set_source_id_prefix, set_undo_callback, transaction_begin, transaction_commit, undo, undo_available, undo_reference, version_supported

Class Variables
  MODE_EXCLUDE = 0
  MODE_RESTRICT = 1
Method Details

__init__(self, db, mode, current_year=None, years_after_death=0)
(Constructor)

source code 

Create a new LivingProxyDb instance.

Parameters:
  • db (DbBase) - The database to be a proxy for
  • mode (int) - The method for handling living people. LivingProxyDb.MODE_EXCLUDE will remove living people altogether. LivingProxyDb.MODE_RESTRICT will remove all information and change their given name to "Living".
  • current_year (int or None) - The current year to use for living determination. If None is supplied, the current year will be found from the system.
  • years_after_death (int) - The number of years after a person's death to still consider them living.
Overrides: proxybase.ProxyDbBase.__init__

get_person_from_handle(self, handle)

source code 

Finds a Person in the database from the passed gramps ID. If no such Person exists, None is returned.

Overrides: dbbase.DbBase.get_person_from_handle

get_source_from_handle(self, handle)

source code 

Finds a Source in the database from the passed gramps ID. If no such Source exists, None is returned.

Overrides: dbbase.DbBase.get_source_from_handle

get_object_from_handle(self, handle)

source code 

Finds an Object in the database from the passed gramps ID. If no such Object exists, None is returned.

Overrides: dbbase.DbBase.get_object_from_handle

get_place_from_handle(self, handle)

source code 

Finds a Place in the database from the passed gramps ID. If no such Place exists, None is returned.

Overrides: dbbase.DbBase.get_place_from_handle

get_event_from_handle(self, handle)

source code 

Finds a Event in the database from the passed gramps ID. If no such Event exists, None is returned.

Overrides: dbbase.DbBase.get_event_from_handle

get_family_from_handle(self, handle)

source code 

Finds a Family in the database from the passed handle. If no such Family exists, None is returned.

Overrides: dbbase.DbBase.get_family_from_handle

get_repository_from_handle(self, handle)

source code 

Finds a Repository in the database from the passed gramps' ID. If no such Repository exists, None is returned.

Overrides: dbbase.DbBase.get_repository_from_handle

get_note_from_handle(self, handle)

source code 

Finds a Note in the database from the passed gramps' ID. If no such Note exists, None is returned.

Overrides: dbbase.DbBase.get_note_from_handle

get_person_from_gramps_id(self, val)

source code 

Finds a Person in the database from the passed GRAMPS ID. If no such Person exists, None is returned.

Overrides: dbbase.DbBase.get_person_from_gramps_id

get_family_from_gramps_id(self, val)

source code 

Finds a Family in the database from the passed GRAMPS ID. If no such Family exists, None is returned.

Overrides: dbbase.DbBase.get_family_from_gramps_id

get_event_from_gramps_id(self, val)

source code 

Finds an Event in the database from the passed GRAMPS ID. If no such Event exists, None is returned.

Overrides: dbbase.DbBase.get_event_from_gramps_id

get_place_from_gramps_id(self, val)

source code 

Finds a Place in the database from the passed gramps' ID. If no such Place exists, None is returned.

Overrides: dbbase.DbBase.get_place_from_gramps_id

get_source_from_gramps_id(self, val)

source code 

Finds a Source in the database from the passed gramps' ID. If no such Source exists, None is returned.

Overrides: dbbase.DbBase.get_source_from_gramps_id

get_object_from_gramps_id(self, val)

source code 

Finds a MediaObject in the database from the passed gramps' ID. If no such MediaObject exists, None is returned.

Overrides: dbbase.DbBase.get_object_from_gramps_id

get_repository_from_gramps_id(self, val)

source code 

Finds a Repository in the database from the passed gramps' ID. If no such Repository exists, None is returned.

Overrides: dbbase.DbBase.get_repository_from_gramps_id

get_note_from_gramps_id(self, val)

source code 

Finds a Note in the database from the passed gramps' ID. If no such Note exists, None is returned.

Overrides: dbbase.DbBase.get_note_from_gramps_id

get_person_handles(self, sort_handles=True)

source code 

Return a list of database handles, one handle for each Person in the database. If sort_handles is True, the list is sorted by surnames

Overrides: dbbase.DbBase.get_person_handles

get_place_handles(self, sort_handles=True)

source code 

Return a list of database handles, one handle for each Place in the database. If sort_handles is True, the list is sorted by Place title.

Overrides: dbbase.DbBase.get_place_handles

get_source_handles(self, sort_handles=True)

source code 

Return a list of database handles, one handle for each Source in the database. If sort_handles is True, the list is sorted by Source title.

Overrides: dbbase.DbBase.get_source_handles

get_media_object_handles(self, sort_handles=True)

source code 

Return a list of database handles, one handle for each MediaObject in the database. If sort_handles is True, the list is sorted by title.

Overrides: dbbase.DbBase.get_media_object_handles

get_event_handles(self)

source code 

Return a list of database handles, one handle for each Event in the database.

Overrides: dbbase.DbBase.get_event_handles

get_family_handles(self)

source code 

Return a list of database handles, one handle for each Family in the database.

Overrides: dbbase.DbBase.get_family_handles

get_repository_handles(self)

source code 

Return a list of database handles, one handle for each Repository in the database.

Overrides: dbbase.DbBase.get_repository_handles

get_note_handles(self)

source code 

Return a list of database handles, one handle for each Note in the database.

Overrides: dbbase.DbBase.get_note_handles

get_researcher(self)

source code 

returns the Researcher instance, providing information about the owner of the database

Overrides: dbbase.DbBase.get_researcher

get_default_person(self)

source code 

returns the default Person of the database

Overrides: dbbase.DbBase.get_default_person

get_default_handle(self)

source code 

returns the default Person of the database

Overrides: dbbase.DbBase.get_default_handle

has_person_handle(self, handle)

source code 

returns True if the handle exists in the current Person database.

Overrides: dbbase.DbBase.has_person_handle

has_event_handle(self, handle)

source code 

returns True if the handle exists in the current Event database.

Overrides: dbbase.DbBase.has_event_handle

has_source_handle(self, handle)

source code 

returns True if the handle exists in the current Source database.

Overrides: dbbase.DbBase.has_source_handle

has_place_handle(self, handle)

source code 

returns True if the handle exists in the current Place database.

Overrides: dbbase.DbBase.has_place_handle

has_family_handle(self, handle)

source code 

returns True if the handle exists in the current Family database.

Overrides: dbbase.DbBase.has_family_handle

has_object_handle(self, handle)

source code 

returns True if the handle exists in the current MediaObjectdatabase.

Overrides: dbbase.DbBase.has_object_handle

has_repository_handle(self, handle)

source code 

returns True if the handle exists in the current Repository database.

Overrides: dbbase.DbBase.has_repository_handle

has_note_handle(self, handle)

source code 

returns True if the handle exists in the current Note database.

Overrides: dbbase.DbBase.has_note_handle

find_backlink_handles(self, handle, include_classes=None)

source code 

Find all objects that hold a reference to the object handle. Returns an interator over alist of (class_name, handle) tuples.

Parameters:
  • handle (database handle) - handle of the object to search for.
  • include_classes (list of class names

    This default implementation does a sequencial scan through all the primary object databases and is very slow. Backends can override this method to provide much faster implementations that make use of additional capabilities of the backend.

    Note that this is a generator function, it returns a iterator for use in loops. If you want a list of the results use:

    > result_list = [i for i in find_backlink_handles(handle)]

    ) - list of class names to include in the results. Default: None means include all classes.
Overrides: dbbase.DbBase.find_backlink_handles