Improve gen.proxy documentation
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Proxy class for the GRAMPS databases. Apply filter
|
Proxy class for the Gramps databases. Apply filter
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@@ -85,7 +85,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed gramps' ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
If no such Person exists, None is returned.
|
If no such Person exists, None is returned.
|
||||||
"""
|
"""
|
||||||
if handle in self.plist:
|
if handle in self.plist:
|
||||||
@@ -138,7 +138,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_source_from_handle(self, handle):
|
def get_source_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Source in the database from the passed gramps' ID.
|
Finds a Source in the database from the passed Gramps ID.
|
||||||
If no such Source exists, None is returned.
|
If no such Source exists, None is returned.
|
||||||
"""
|
"""
|
||||||
source = self.db.get_source_from_handle(handle)
|
source = self.db.get_source_from_handle(handle)
|
||||||
@@ -162,7 +162,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_citation_from_handle(self, handle):
|
def get_citation_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Citation in the database from the passed gramps' ID.
|
Finds a Citation in the database from the passed Gramps ID.
|
||||||
If no such Citation exists, None is returned.
|
If no such Citation exists, None is returned.
|
||||||
"""
|
"""
|
||||||
citation = self.db.get_citation_from_handle(handle)
|
citation = self.db.get_citation_from_handle(handle)
|
||||||
@@ -172,7 +172,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_object_from_handle(self, handle):
|
def get_object_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a MediaObject in the database from the passed GRAMPS' handle.
|
Finds a MediaObject in the database from the passed Gramps handle.
|
||||||
If no such Object exists, None is returned.
|
If no such Object exists, None is returned.
|
||||||
"""
|
"""
|
||||||
media = self.db.get_object_from_handle(handle)
|
media = self.db.get_object_from_handle(handle)
|
||||||
@@ -189,7 +189,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_place_from_handle(self, handle):
|
def get_place_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Place in the database from the passed GRAMPS' handle.
|
Finds a Place in the database from the passed Gramps handle.
|
||||||
If no such Place exists, None is returned.
|
If no such Place exists, None is returned.
|
||||||
"""
|
"""
|
||||||
place = self.db.get_place_from_handle(handle)
|
place = self.db.get_place_from_handle(handle)
|
||||||
@@ -209,7 +209,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_event_from_handle(self, handle):
|
def get_event_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Event in the database from the passed gramps' ID.
|
Finds a Event in the database from the passed Gramps ID.
|
||||||
If no such Event exists, None is returned.
|
If no such Event exists, None is returned.
|
||||||
"""
|
"""
|
||||||
if handle in self.elist:
|
if handle in self.elist:
|
||||||
@@ -222,7 +222,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_family_from_handle(self, handle):
|
def get_family_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Family in the database from the passed gramps' ID.
|
Finds a Family in the database from the passed Gramps ID.
|
||||||
If no such Family exists, None is returned.
|
If no such Family exists, None is returned.
|
||||||
"""
|
"""
|
||||||
if handle in self.flist:
|
if handle in self.flist:
|
||||||
@@ -277,7 +277,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_repository_from_handle(self, handle):
|
def get_repository_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Repository in the database from the passed gramps' ID.
|
Finds a Repository in the database from the passed Gramps ID.
|
||||||
If no such Repository exists, None is returned.
|
If no such Repository exists, None is returned.
|
||||||
"""
|
"""
|
||||||
repository = self.db.get_repository_from_handle(handle)
|
repository = self.db.get_repository_from_handle(handle)
|
||||||
@@ -288,7 +288,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_note_from_handle(self, handle):
|
def get_note_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Note in the database from the passed gramps' ID.
|
Finds a Note in the database from the passed Gramps ID.
|
||||||
If no such Note exists, None is returned.
|
If no such Note exists, None is returned.
|
||||||
"""
|
"""
|
||||||
if handle in self.nlist:
|
if handle in self.nlist:
|
||||||
@@ -298,7 +298,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_person_from_gramps_id(self, val):
|
def get_person_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed GRAMPS ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
If no such Person exists, None is returned.
|
If no such Person exists, None is returned.
|
||||||
"""
|
"""
|
||||||
person = self.db.get_person_from_gramps_id(val)
|
person = self.db.get_person_from_gramps_id(val)
|
||||||
@@ -309,7 +309,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_family_from_gramps_id(self, val):
|
def get_family_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Family in the database from the passed GRAMPS ID.
|
Finds a Family in the database from the passed Gramps ID.
|
||||||
If no such Family exists, None is returned.
|
If no such Family exists, None is returned.
|
||||||
"""
|
"""
|
||||||
family = self.db.get_family_from_gramps_id(val)
|
family = self.db.get_family_from_gramps_id(val)
|
||||||
@@ -320,7 +320,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_event_from_gramps_id(self, val):
|
def get_event_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds an Event in the database from the passed GRAMPS ID.
|
Finds an Event in the database from the passed Gramps ID.
|
||||||
If no such Event exists, None is returned.
|
If no such Event exists, None is returned.
|
||||||
"""
|
"""
|
||||||
event = self.db.get_event_from_gramps_id(val)
|
event = self.db.get_event_from_gramps_id(val)
|
||||||
@@ -331,7 +331,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_place_from_gramps_id(self, val):
|
def get_place_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Place in the database from the passed gramps' ID.
|
Finds a Place in the database from the passed Gramps ID.
|
||||||
If no such Place exists, None is returned.
|
If no such Place exists, None is returned.
|
||||||
"""
|
"""
|
||||||
place = self.db.get_place_from_gramps_id(val)
|
place = self.db.get_place_from_gramps_id(val)
|
||||||
@@ -342,7 +342,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_source_from_gramps_id(self, val):
|
def get_source_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Source in the database from the passed gramps' ID.
|
Finds a Source in the database from the passed Gramps ID.
|
||||||
If no such Source exists, None is returned.
|
If no such Source exists, None is returned.
|
||||||
"""
|
"""
|
||||||
source = self.db.get_source_from_gramps_id(val)
|
source = self.db.get_source_from_gramps_id(val)
|
||||||
@@ -353,7 +353,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_citation_from_gramps_id(self, val):
|
def get_citation_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Citation in the database from the passed gramps' ID.
|
Finds a Citation in the database from the passed Gramps ID.
|
||||||
If no such Citation exists, None is returned.
|
If no such Citation exists, None is returned.
|
||||||
"""
|
"""
|
||||||
citation = self.db.get_citation_from_gramps_id(val)
|
citation = self.db.get_citation_from_gramps_id(val)
|
||||||
@@ -364,7 +364,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_object_from_gramps_id(self, val):
|
def get_object_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a MediaObject in the database from the passed gramps' ID.
|
Finds a MediaObject in the database from the passed Gramps ID.
|
||||||
If no such MediaObject exists, None is returned.
|
If no such MediaObject exists, None is returned.
|
||||||
"""
|
"""
|
||||||
media = self.db.get_object_from_gramps_id(val)
|
media = self.db.get_object_from_gramps_id(val)
|
||||||
@@ -375,7 +375,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_repository_from_gramps_id(self, val):
|
def get_repository_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Repository in the database from the passed gramps' ID.
|
Finds a Repository in the database from the passed Gramps ID.
|
||||||
If no such Repository exists, None is returned.
|
If no such Repository exists, None is returned.
|
||||||
"""
|
"""
|
||||||
repository = self.db.get_repository_from_gramps_id(val)
|
repository = self.db.get_repository_from_gramps_id(val)
|
||||||
@@ -386,7 +386,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_note_from_gramps_id(self, val):
|
def get_note_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Note in the database from the passed gramps' ID.
|
Finds a Note in the database from the passed Gramps ID.
|
||||||
If no such Note exists, None is returned.
|
If no such Note exists, None is returned.
|
||||||
"""
|
"""
|
||||||
note = self.db.get_note_from_gramps_id(val)
|
note = self.db.get_note_from_gramps_id(val)
|
||||||
@@ -521,11 +521,11 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
Find all objects that hold a reference to the object handle.
|
Find all objects that hold a reference to the object handle.
|
||||||
Returns an iterator over a list of (class_name, handle) tuples.
|
Returns an iterator over a list of (class_name, handle) tuples.
|
||||||
|
|
||||||
@param handle: handle of the object to search for.
|
:param handle: handle of the object to search for.
|
||||||
@type handle: database handle
|
:type handle: database handle
|
||||||
@param include_classes: list of class names to include in the results.
|
:param include_classes: list of class names to include in the results.
|
||||||
Default: None means include all classes.
|
Default: None means include all classes.
|
||||||
@type include_classes: list of class names
|
:type include_classes: list of class names
|
||||||
|
|
||||||
This default implementation does a sequential scan through all
|
This default implementation does a sequential scan through all
|
||||||
the primary object databases and is very slow. Backends can
|
the primary object databases and is very slow. Backends can
|
||||||
@@ -533,7 +533,7 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
make use of additional capabilities of the backend.
|
make use of additional capabilities of the backend.
|
||||||
|
|
||||||
Note that this is a generator function, it returns a iterator for
|
Note that this is a generator function, it returns a iterator for
|
||||||
use in loops. If you want a list of the results use:
|
use in loops. If you want a list of the results use::
|
||||||
|
|
||||||
> result_list = list(find_backlink_handles(handle))
|
> result_list = list(find_backlink_handles(handle))
|
||||||
"""
|
"""
|
||||||
@@ -543,8 +543,9 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
def sanitize_notebase(self, notebase):
|
def sanitize_notebase(self, notebase):
|
||||||
"""
|
"""
|
||||||
Filters notes out of the passed notebase object according to the Note Filter.
|
Filters notes out of the passed notebase object according to the Note Filter.
|
||||||
@param notebase: NoteBase object to clean
|
|
||||||
@type event: NoteBase
|
:param notebase: NoteBase object to clean
|
||||||
|
:type event: NoteBase
|
||||||
"""
|
"""
|
||||||
if notebase:
|
if notebase:
|
||||||
note_list = notebase.get_note_list()
|
note_list = notebase.get_note_list()
|
||||||
@@ -560,8 +561,9 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
def sanitize_person(self, person):
|
def sanitize_person(self, person):
|
||||||
"""
|
"""
|
||||||
Cleans filtered notes out of the passed person
|
Cleans filtered notes out of the passed person
|
||||||
@param event: Person object to clean
|
|
||||||
@type event: Person
|
:param event: Person object to clean
|
||||||
|
:type event: Person
|
||||||
"""
|
"""
|
||||||
if person:
|
if person:
|
||||||
# Filter note references
|
# Filter note references
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Proxy class for the GRAMPS databases. Filter out all living people.
|
Proxy class for the Gramps databases. Filter out all living people.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@@ -63,22 +63,23 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
"""
|
"""
|
||||||
Create a new LivingProxyDb instance.
|
Create a new LivingProxyDb instance.
|
||||||
|
|
||||||
@param dbase: The database to be a proxy for
|
:param dbase: The database to be a proxy for
|
||||||
@type dbase: DbBase
|
:type dbase: DbBase
|
||||||
@param mode: The method for handling living people.
|
:param mode:
|
||||||
LivingProxyDb.MODE_EXCLUDE_ALL will remove living people altogether.
|
The method for handling living people.
|
||||||
LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY will remove all information
|
LivingProxyDb.MODE_EXCLUDE_ALL will remove living people altogether.
|
||||||
and change their given name to "[Living]" or what has been set in
|
LivingProxyDb.MODE_INCLUDE_LAST_NAME_ONLY will remove all
|
||||||
Preferences -> Text.
|
information and change their given name to "[Living]" or what has
|
||||||
LivingProxyDb.MODE_INCLUDE_FULL_NAME_ONLY will remove all information
|
been set in Preferences -> Text.
|
||||||
but leave the entire name intact.
|
LivingProxyDb.MODE_INCLUDE_FULL_NAME_ONLY will remove all
|
||||||
@type mode: int
|
information but leave the entire name intact.
|
||||||
@param current_year: The current year to use for living determination.
|
:type mode: int
|
||||||
|
:param current_year: The current year to use for living determination.
|
||||||
If None is supplied, the current year will be found from the system.
|
If None is supplied, the current year will be found from the system.
|
||||||
@type current_year: int or None
|
:type current_year: int or None
|
||||||
@param years_after_death: The number of years after a person's death to
|
:param years_after_death: The number of years after a person's death to
|
||||||
still consider them living.
|
still consider them living.
|
||||||
@type years_after_death: int
|
:type years_after_death: int
|
||||||
"""
|
"""
|
||||||
ProxyDbBase.__init__(self, dbase)
|
ProxyDbBase.__init__(self, dbase)
|
||||||
self.mode = mode
|
self.mode = mode
|
||||||
@@ -91,7 +92,7 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed gramps ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
If no such Person exists, None is returned.
|
If no such Person exists, None is returned.
|
||||||
"""
|
"""
|
||||||
person = self.db.get_person_from_handle(handle)
|
person = self.db.get_person_from_handle(handle)
|
||||||
@@ -126,7 +127,7 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_person_from_gramps_id(self, val):
|
def get_person_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed GRAMPS ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
If no such Person exists, None is returned.
|
If no such Person exists, None is returned.
|
||||||
"""
|
"""
|
||||||
person = self.db.get_person_from_gramps_id(val)
|
person = self.db.get_person_from_gramps_id(val)
|
||||||
@@ -140,7 +141,7 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_family_from_gramps_id(self, val):
|
def get_family_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Family in the database from the passed GRAMPS ID.
|
Finds a Family in the database from the passed Gramps ID.
|
||||||
If no such Family exists, None is returned.
|
If no such Family exists, None is returned.
|
||||||
"""
|
"""
|
||||||
family = self.db.get_family_from_gramps_id(val)
|
family = self.db.get_family_from_gramps_id(val)
|
||||||
@@ -179,11 +180,11 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
Find all objects that hold a reference to the object handle.
|
Find all objects that hold a reference to the object handle.
|
||||||
Returns an iterator over a list of (class_name, handle) tuples.
|
Returns an iterator over a list of (class_name, handle) tuples.
|
||||||
|
|
||||||
@param handle: handle of the object to search for.
|
:param handle: handle of the object to search for.
|
||||||
@type handle: database handle
|
:type handle: database handle
|
||||||
@param include_classes: list of class names to include in the results.
|
:param include_classes: list of class names to include in the results.
|
||||||
Default: None means include all classes.
|
Default: None means include all classes.
|
||||||
@type include_classes: list of class names
|
:type include_classes: list of class names
|
||||||
|
|
||||||
This default implementation does a sequential scan through all
|
This default implementation does a sequential scan through all
|
||||||
the primary object databases and is very slow. Backends can
|
the primary object databases and is very slow. Backends can
|
||||||
@@ -191,7 +192,7 @@ class LivingProxyDb(ProxyDbBase):
|
|||||||
make use of additional capabilities of the backend.
|
make use of additional capabilities of the backend.
|
||||||
|
|
||||||
Note that this is a generator function, it returns a iterator for
|
Note that this is a generator function, it returns a iterator for
|
||||||
use in loops. If you want a list of the results use:
|
use in loops. If you want a list of the results use::
|
||||||
|
|
||||||
> result_list = list(find_backlink_handles(handle))
|
> result_list = list(find_backlink_handles(handle))
|
||||||
"""
|
"""
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Proxy class for the GRAMPS databases. Filter out all data marked private.
|
Proxy class for the Gramps databases. Filter out all data marked private.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@@ -61,7 +61,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_person_from_handle(self, handle):
|
def get_person_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Person in the database from the passed gramps' ID.
|
Finds a Person in the database from the passed Gramps ID.
|
||||||
If no such Person exists, None is returned.
|
If no such Person exists, None is returned.
|
||||||
"""
|
"""
|
||||||
person = self.db.get_person_from_handle(handle)
|
person = self.db.get_person_from_handle(handle)
|
||||||
@@ -71,7 +71,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_source_from_handle(self, handle):
|
def get_source_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Source in the database from the passed gramps' ID.
|
Finds a Source in the database from the passed Gramps ID.
|
||||||
If no such Source exists, None is returned.
|
If no such Source exists, None is returned.
|
||||||
"""
|
"""
|
||||||
source = self.db.get_source_from_handle(handle)
|
source = self.db.get_source_from_handle(handle)
|
||||||
@@ -81,7 +81,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_citation_from_handle(self, handle):
|
def get_citation_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Citation in the database from the passed gramps' ID.
|
Finds a Citation in the database from the passed Gramps ID.
|
||||||
If no such Citation exists, None is returned.
|
If no such Citation exists, None is returned.
|
||||||
"""
|
"""
|
||||||
citation = self.db.get_citation_from_handle(handle)
|
citation = self.db.get_citation_from_handle(handle)
|
||||||
@@ -91,7 +91,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_object_from_handle(self, handle):
|
def get_object_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds an Object in the database from the passed gramps' ID.
|
Finds an Object in the database from the passed Gramps ID.
|
||||||
If no such Object exists, None is returned.
|
If no such Object exists, None is returned.
|
||||||
"""
|
"""
|
||||||
media = self.db.get_object_from_handle(handle)
|
media = self.db.get_object_from_handle(handle)
|
||||||
@@ -101,7 +101,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_place_from_handle(self, handle):
|
def get_place_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Place in the database from the passed gramps' ID.
|
Finds a Place in the database from the passed Gramps ID.
|
||||||
If no such Place exists, None is returned.
|
If no such Place exists, None is returned.
|
||||||
"""
|
"""
|
||||||
place = self.db.get_place_from_handle(handle)
|
place = self.db.get_place_from_handle(handle)
|
||||||
@@ -111,7 +111,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_event_from_handle(self, handle):
|
def get_event_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Event in the database from the passed gramps' ID.
|
Finds a Event in the database from the passed Gramps ID.
|
||||||
If no such Event exists, None is returned.
|
If no such Event exists, None is returned.
|
||||||
"""
|
"""
|
||||||
event = self.db.get_event_from_handle(handle)
|
event = self.db.get_event_from_handle(handle)
|
||||||
@@ -121,7 +121,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_family_from_handle(self, handle):
|
def get_family_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Family in the database from the passed gramps' ID.
|
Finds a Family in the database from the passed Gramps ID.
|
||||||
If no such Family exists, None is returned.
|
If no such Family exists, None is returned.
|
||||||
"""
|
"""
|
||||||
family = self.db.get_family_from_handle(handle)
|
family = self.db.get_family_from_handle(handle)
|
||||||
@@ -131,7 +131,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_repository_from_handle(self, handle):
|
def get_repository_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Repository in the database from the passed gramps' ID.
|
Finds a Repository in the database from the passed Gramps ID.
|
||||||
If no such Repository exists, None is returned.
|
If no such Repository exists, None is returned.
|
||||||
"""
|
"""
|
||||||
repository = self.db.get_repository_from_handle(handle)
|
repository = self.db.get_repository_from_handle(handle)
|
||||||
@@ -141,7 +141,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_note_from_handle(self, handle):
|
def get_note_from_handle(self, handle):
|
||||||
"""
|
"""
|
||||||
Finds a Note in the database from the passed gramps' ID.
|
Finds a Note in the database from the passed Gramps ID.
|
||||||
If no such Note exists, None is returned.
|
If no such Note exists, None is returned.
|
||||||
"""
|
"""
|
||||||
note = self.db.get_note_from_handle(handle)
|
note = self.db.get_note_from_handle(handle)
|
||||||
@@ -181,7 +181,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_place_from_gramps_id(self, val):
|
def get_place_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Place in the database from the passed gramps' ID.
|
Finds a Place in the database from the passed Gramps ID.
|
||||||
If no such Place exists, None is returned.
|
If no such Place exists, None is returned.
|
||||||
"""
|
"""
|
||||||
place = self.db.get_place_from_gramps_id(val)
|
place = self.db.get_place_from_gramps_id(val)
|
||||||
@@ -191,7 +191,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_source_from_gramps_id(self, val):
|
def get_source_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Source in the database from the passed gramps' ID.
|
Finds a Source in the database from the passed Gramps ID.
|
||||||
If no such Source exists, None is returned.
|
If no such Source exists, None is returned.
|
||||||
"""
|
"""
|
||||||
source = self.db.get_source_from_gramps_id(val)
|
source = self.db.get_source_from_gramps_id(val)
|
||||||
@@ -201,7 +201,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_citation_from_gramps_id(self, val):
|
def get_citation_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Citation in the database from the passed gramps' ID.
|
Finds a Citation in the database from the passed Gramps ID.
|
||||||
If no such Citation exists, None is returned.
|
If no such Citation exists, None is returned.
|
||||||
"""
|
"""
|
||||||
citation = self.db.get_citation_from_gramps_id(val)
|
citation = self.db.get_citation_from_gramps_id(val)
|
||||||
@@ -211,7 +211,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_object_from_gramps_id(self, val):
|
def get_object_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a MediaObject in the database from the passed gramps' ID.
|
Finds a MediaObject in the database from the passed Gramps ID.
|
||||||
If no such MediaObject exists, None is returned.
|
If no such MediaObject exists, None is returned.
|
||||||
"""
|
"""
|
||||||
obj = self.db.get_object_from_gramps_id(val)
|
obj = self.db.get_object_from_gramps_id(val)
|
||||||
@@ -221,7 +221,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_repository_from_gramps_id(self, val):
|
def get_repository_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Repository in the database from the passed gramps' ID.
|
Finds a Repository in the database from the passed Gramps ID.
|
||||||
If no such Repository exists, None is returned.
|
If no such Repository exists, None is returned.
|
||||||
"""
|
"""
|
||||||
repository = self.db.get_repository_from_gramps_id(val)
|
repository = self.db.get_repository_from_gramps_id(val)
|
||||||
@@ -231,7 +231,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
|
|
||||||
def get_note_from_gramps_id(self, val):
|
def get_note_from_gramps_id(self, val):
|
||||||
"""
|
"""
|
||||||
Finds a Note in the database from the passed gramps' ID.
|
Finds a Note in the database from the passed Gramps ID.
|
||||||
If no such Note exists, None is returned.
|
If no such Note exists, None is returned.
|
||||||
"""
|
"""
|
||||||
note = self.db.get_note_from_gramps_id(val)
|
note = self.db.get_note_from_gramps_id(val)
|
||||||
@@ -405,11 +405,11 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
Find all objects that hold a reference to the object handle.
|
Find all objects that hold a reference to the object handle.
|
||||||
Returns an iterator over a list of (class_name, handle) tuples.
|
Returns an iterator over a list of (class_name, handle) tuples.
|
||||||
|
|
||||||
@param handle: handle of the object to search for.
|
:param handle: handle of the object to search for.
|
||||||
@type handle: database handle
|
:type handle: database handle
|
||||||
@param include_classes: list of class names to include in the results.
|
:param include_classes: list of class names to include in the results.
|
||||||
Default: None means include all classes.
|
Default: None means include all classes.
|
||||||
@type include_classes: list of class names
|
:type include_classes: list of class names
|
||||||
|
|
||||||
This default implementation does a sequential scan through all
|
This default implementation does a sequential scan through all
|
||||||
the primary object databases and is very slow. Backends can
|
the primary object databases and is very slow. Backends can
|
||||||
@@ -417,7 +417,7 @@ class PrivateProxyDb(ProxyDbBase):
|
|||||||
make use of additional capabilities of the backend.
|
make use of additional capabilities of the backend.
|
||||||
|
|
||||||
Note that this is a generator function, it returns a iterator for
|
Note that this is a generator function, it returns a iterator for
|
||||||
use in loops. If you want a list of the results use:
|
use in loops. If you want a list of the results use::
|
||||||
|
|
||||||
> result_list = list(find_backlink_handles(handle))
|
> result_list = list(find_backlink_handles(handle))
|
||||||
"""
|
"""
|
||||||
@@ -453,13 +453,13 @@ def copy_media_ref_list(db, original_obj, clean_obj):
|
|||||||
Copies media references from one object to another - excluding private
|
Copies media references from one object to another - excluding private
|
||||||
references and references to private objects.
|
references and references to private objects.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: MediaBase
|
:type original_obj: MediaBase
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: MediaBase
|
:type original_obj: MediaBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for media_ref in original_obj.get_media_list():
|
for media_ref in original_obj.get_media_list():
|
||||||
if media_ref and not media_ref.get_privacy():
|
if media_ref and not media_ref.get_privacy():
|
||||||
@@ -474,13 +474,13 @@ def copy_citation_ref_list(db, original_obj, clean_obj):
|
|||||||
to private citations, and references to citations that refer to private
|
to private citations, and references to citations that refer to private
|
||||||
sources.
|
sources.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: CitationBase
|
:type original_obj: CitationBase
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: CitationBase
|
:type original_obj: CitationBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for citation_handle in original_obj.get_citation_list():
|
for citation_handle in original_obj.get_citation_list():
|
||||||
citation = db.get_citation_from_handle(citation_handle)
|
citation = db.get_citation_from_handle(citation_handle)
|
||||||
@@ -495,13 +495,13 @@ def copy_notes(db, original_obj, clean_obj):
|
|||||||
Copies notes from one object to another - excluding references to private
|
Copies notes from one object to another - excluding references to private
|
||||||
notes.
|
notes.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: NoteBase
|
:type original_obj: NoteBase
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: NoteBase
|
:type original_obj: NoteBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for note_handle in original_obj.get_note_list():
|
for note_handle in original_obj.get_note_list():
|
||||||
note = db.get_note_from_handle(note_handle)
|
note = db.get_note_from_handle(note_handle)
|
||||||
@@ -513,13 +513,13 @@ def copy_associations(db, original_obj, clean_obj):
|
|||||||
Copies associations from one object to another - excluding
|
Copies associations from one object to another - excluding
|
||||||
references to private notes.
|
references to private notes.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: Base
|
:type original_obj: Base
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: Base
|
:type original_obj: Base
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
new_person_ref_list = []
|
new_person_ref_list = []
|
||||||
for person_ref in original_obj.get_person_ref_list():
|
for person_ref in original_obj.get_person_ref_list():
|
||||||
@@ -534,13 +534,13 @@ def copy_attributes(db, original_obj, clean_obj):
|
|||||||
Copies attributes from one object to another - excluding references to
|
Copies attributes from one object to another - excluding references to
|
||||||
private attributes.
|
private attributes.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: AttributeBase
|
:type original_obj: AttributeBase
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: AttributeBase
|
:type original_obj: AttributeBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for attribute in original_obj.get_attribute_list():
|
for attribute in original_obj.get_attribute_list():
|
||||||
if attribute and not attribute.get_privacy():
|
if attribute and not attribute.get_privacy():
|
||||||
@@ -556,13 +556,13 @@ def copy_srcattributes(db, original_obj, clean_obj):
|
|||||||
Copies srcattributes from one object to another - excluding references to
|
Copies srcattributes from one object to another - excluding references to
|
||||||
private srcattributes.
|
private srcattributes.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have private references
|
:param original_obj: Object that may have private references
|
||||||
@type original_obj: SrcAttributeBase
|
:type original_obj: SrcAttributeBase
|
||||||
@param clean_obj: Object that will have only non-private references
|
:param clean_obj: Object that will have only non-private references
|
||||||
@type original_obj: SrcAttributeBase
|
:type original_obj: SrcAttributeBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for attribute in original_obj.get_attribute_list():
|
for attribute in original_obj.get_attribute_list():
|
||||||
if attribute and not attribute.get_privacy():
|
if attribute and not attribute.get_privacy():
|
||||||
@@ -576,13 +576,13 @@ def copy_urls(db, original_obj, clean_obj):
|
|||||||
Copies urls from one object to another - excluding references to
|
Copies urls from one object to another - excluding references to
|
||||||
private urls.
|
private urls.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have urls
|
:param original_obj: Object that may have urls
|
||||||
@type original_obj: UrlBase
|
:type original_obj: UrlBase
|
||||||
@param clean_obj: Object that will have only non-private urls
|
:param clean_obj: Object that will have only non-private urls
|
||||||
@type original_obj: UrlBase
|
:type original_obj: UrlBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for url in original_obj.get_url_list():
|
for url in original_obj.get_url_list():
|
||||||
if url and not url.get_privacy():
|
if url and not url.get_privacy():
|
||||||
@@ -593,13 +593,13 @@ def copy_lds_ords(db, original_obj, clean_obj):
|
|||||||
Copies LDS ORDs from one object to another - excluding references to
|
Copies LDS ORDs from one object to another - excluding references to
|
||||||
private LDS ORDs.
|
private LDS ORDs.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have LDS ORDs
|
:param original_obj: Object that may have LDS ORDs
|
||||||
@type original_obj: LdsOrdBase
|
:type original_obj: LdsOrdBase
|
||||||
@param clean_obj: Object that will have only non-private LDS ORDs
|
:param clean_obj: Object that will have only non-private LDS ORDs
|
||||||
@type original_obj: LdsOrdBase
|
:type original_obj: LdsOrdBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for lds_ord in original_obj.get_lds_ord_list():
|
for lds_ord in original_obj.get_lds_ord_list():
|
||||||
if lds_ord and not lds_ord.get_privacy():
|
if lds_ord and not lds_ord.get_privacy():
|
||||||
@@ -610,13 +610,13 @@ def copy_addresses(db, original_obj, clean_obj):
|
|||||||
Copies addresses from one object to another - excluding references to
|
Copies addresses from one object to another - excluding references to
|
||||||
private addresses.
|
private addresses.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the references belongs
|
:param db: Gramps database to which the references belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param original_obj: Object that may have addresses
|
:param original_obj: Object that may have addresses
|
||||||
@type original_obj: AddressBase
|
:type original_obj: AddressBase
|
||||||
@param clean_obj: Object that will have only non-private addresses
|
:param clean_obj: Object that will have only non-private addresses
|
||||||
@type original_obj: AddressBase
|
:type original_obj: AddressBase
|
||||||
@returns: Nothing
|
:returns: Nothing
|
||||||
"""
|
"""
|
||||||
for address in original_obj.get_address_list():
|
for address in original_obj.get_address_list():
|
||||||
if address and not address.get_privacy():
|
if address and not address.get_privacy():
|
||||||
@@ -628,13 +628,13 @@ def sanitize_lds_ord(db, lds_ord):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the LdsOrd object belongs
|
:param db: Gramps database to which the LdsOrd object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param name: source LdsOrd object that will be copied with
|
:param name: source LdsOrd object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type name: LdsOrd
|
:type name: LdsOrd
|
||||||
@returns: 'cleansed' LdsOrd object
|
:returns: 'cleansed' LdsOrd object
|
||||||
@rtype: LdsOrd
|
:rtype: LdsOrd
|
||||||
"""
|
"""
|
||||||
new_lds_ord = LdsOrd()
|
new_lds_ord = LdsOrd()
|
||||||
new_lds_ord.set_type(lds_ord.get_type())
|
new_lds_ord.set_type(lds_ord.get_type())
|
||||||
@@ -664,13 +664,13 @@ def sanitize_address(db, address):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param name: source Address object that will be copied with
|
:param name: source Address object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type name: Address
|
:type name: Address
|
||||||
@returns: 'cleansed' Address object
|
:returns: 'cleansed' Address object
|
||||||
@rtype: Address
|
:rtype: Address
|
||||||
"""
|
"""
|
||||||
new_address = Address()
|
new_address = Address()
|
||||||
|
|
||||||
@@ -695,13 +695,13 @@ def sanitize_name(db, name):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param name: source Name object that will be copied with
|
:param name: source Name object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type name: Name
|
:type name: Name
|
||||||
@returns: 'cleansed' Name object
|
:returns: 'cleansed' Name object
|
||||||
@rtype: Name
|
:rtype: Name
|
||||||
"""
|
"""
|
||||||
new_name = Name()
|
new_name = Name()
|
||||||
new_name.set_group_as(name.get_group_as())
|
new_name.set_group_as(name.get_group_as())
|
||||||
@@ -728,13 +728,13 @@ def sanitize_media_ref(db, media_ref):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the MediaRef object belongs
|
:param db: Gramps database to which the MediaRef object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param source_ref: source MediaRef object that will be copied with
|
:param source_ref: source MediaRef object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type source_ref: MediaRef
|
:type source_ref: MediaRef
|
||||||
@returns: 'cleansed' MediaRef object
|
:returns: 'cleansed' MediaRef object
|
||||||
@rtype: MediaRef
|
:rtype: MediaRef
|
||||||
"""
|
"""
|
||||||
new_ref = MediaRef()
|
new_ref = MediaRef()
|
||||||
new_ref.set_rectangle(media_ref.get_rectangle())
|
new_ref.set_rectangle(media_ref.get_rectangle())
|
||||||
@@ -752,13 +752,13 @@ def sanitize_citation(db, citation):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param citation: source Citation object that will be copied with
|
:param citation: source Citation object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type citation: Citation
|
:type citation: Citation
|
||||||
@returns: 'cleansed' Citation object
|
:returns: 'cleansed' Citation object
|
||||||
@rtype: Citation
|
:rtype: Citation
|
||||||
"""
|
"""
|
||||||
new_citation = Citation()
|
new_citation = Citation()
|
||||||
new_citation.set_date_object(citation.get_date_object())
|
new_citation.set_date_object(citation.get_date_object())
|
||||||
@@ -780,13 +780,13 @@ def sanitize_event_ref(db, event_ref):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param event_ref: source EventRef object that will be copied with
|
:param event_ref: source EventRef object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type event_ref: EventRef
|
:type event_ref: EventRef
|
||||||
@returns: 'cleansed' EventRef object
|
:returns: 'cleansed' EventRef object
|
||||||
@rtype: EventRef
|
:rtype: EventRef
|
||||||
"""
|
"""
|
||||||
new_ref = EventRef()
|
new_ref = EventRef()
|
||||||
|
|
||||||
@@ -803,13 +803,13 @@ def sanitize_person(db, person):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param person: source Person object that will be copied with
|
:param person: source Person object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type person: Person
|
:type person: Person
|
||||||
@returns: 'cleansed' Person object
|
:returns: 'cleansed' Person object
|
||||||
@rtype: Person
|
:rtype: Person
|
||||||
"""
|
"""
|
||||||
new_person = Person()
|
new_person = Person()
|
||||||
|
|
||||||
@@ -896,13 +896,13 @@ def sanitize_source(db, source):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param source: source Source object that will be copied with
|
:param source: source Source object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type source: Source
|
:type source: Source
|
||||||
@returns: 'cleansed' Source object
|
:returns: 'cleansed' Source object
|
||||||
@rtype: Source
|
:rtype: Source
|
||||||
"""
|
"""
|
||||||
new_source = Source()
|
new_source = Source()
|
||||||
|
|
||||||
@@ -933,13 +933,13 @@ def sanitize_media(db, media):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param media: source Media object that will be copied with
|
:param media: source Media object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type media: MediaObject
|
:type media: MediaObject
|
||||||
@returns: 'cleansed' Media object
|
:returns: 'cleansed' Media object
|
||||||
@rtype: MediaObject
|
:rtype: MediaObject
|
||||||
"""
|
"""
|
||||||
new_media = MediaObject()
|
new_media = MediaObject()
|
||||||
|
|
||||||
@@ -964,13 +964,13 @@ def sanitize_place(db, place):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param place: source Place object that will be copied with
|
:param place: source Place object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type place: Place
|
:type place: Place
|
||||||
@returns: 'cleansed' Place object
|
:returns: 'cleansed' Place object
|
||||||
@rtype: Place
|
:rtype: Place
|
||||||
"""
|
"""
|
||||||
new_place = Place()
|
new_place = Place()
|
||||||
|
|
||||||
@@ -999,13 +999,13 @@ def sanitize_event(db, event):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param event: source Event object that will be copied with
|
:param event: source Event object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type event: Event
|
:type event: Event
|
||||||
@returns: 'cleansed' Event object
|
:returns: 'cleansed' Event object
|
||||||
@rtype: Event
|
:rtype: Event
|
||||||
"""
|
"""
|
||||||
new_event = Event()
|
new_event = Event()
|
||||||
|
|
||||||
@@ -1034,13 +1034,13 @@ def sanitize_family(db, family):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param family: source Family object that will be copied with
|
:param family: source Family object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type family: Family
|
:type family: Family
|
||||||
@returns: 'cleansed' Family object
|
:returns: 'cleansed' Family object
|
||||||
@rtype: Family
|
:rtype: Family
|
||||||
"""
|
"""
|
||||||
new_family = Family()
|
new_family = Family()
|
||||||
|
|
||||||
@@ -1102,13 +1102,13 @@ def sanitize_repository(db, repository):
|
|||||||
instance. The returned instance has all private records
|
instance. The returned instance has all private records
|
||||||
removed from it.
|
removed from it.
|
||||||
|
|
||||||
@param db: GRAMPS database to which the Person object belongs
|
:param db: Gramps database to which the Person object belongs
|
||||||
@type db: DbBase
|
:type db: DbBase
|
||||||
@param repository: source Repository object that will be copied with
|
:param repository: source Repository object that will be copied with
|
||||||
privacy records removed
|
privacy records removed
|
||||||
@type repository: Repository
|
:type repository: Repository
|
||||||
@returns: 'cleansed' Repository object
|
:returns: 'cleansed' Repository object
|
||||||
@rtype: Repository
|
:rtype: Repository
|
||||||
"""
|
"""
|
||||||
new_repository = Repository()
|
new_repository = Repository()
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Proxy class for the GRAMPS databases. Filter out all data marked private.
|
Proxy class for the Gramps databases. Filter out all data marked private.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Proxy class for the GRAMPS databases. Returns objects which are
|
Proxy class for the Gramps databases. Returns objects which are
|
||||||
referenced by a person, or through a chain of references starting with
|
referenced by a person, or through a chain of references starting with
|
||||||
a person.
|
a person.
|
||||||
"""
|
"""
|
||||||
@@ -46,9 +46,10 @@ class ReferencedBySelectionProxyDb(ProxyDbBase):
|
|||||||
"""
|
"""
|
||||||
Create a new ReferencedByPeopleProxyDb instance.
|
Create a new ReferencedByPeopleProxyDb instance.
|
||||||
|
|
||||||
all_people - if True, get all people, and the items they link
|
:param all_people: if True, get all people, and the items they link to;
|
||||||
to; if False, get all people that are connected to something,
|
if False, get all people that are connected to
|
||||||
and all of items they link to.
|
something, and all of items they link to.
|
||||||
|
:type all_people: boolean
|
||||||
"""
|
"""
|
||||||
ProxyDbBase.__init__(self, dbase)
|
ProxyDbBase.__init__(self, dbase)
|
||||||
self.reset_references()
|
self.reset_references()
|
||||||
|
Reference in New Issue
Block a user