Package gen :: Package lib :: Module baseobj :: Class BaseObject
[frames] | no frames]

Class BaseObject

source code


The BaseObject is the base class for all data objects in GRAMPS, whether primary or not.

Its main goal is to provide common capabilites to all objects, such as searching through all available information.

Instance Methods
 
serialize(self)
Convert the object to a serialized tuple of data.
source code
 
unserialize(self, data)
Convert a serialized tuple of data to an object.
source code
bool
matches_string(self, pattern, case_sensitive=False)
Return True if any text data in the object or any of it's child objects matches a given pattern.
source code
bool
matches_regexp(self, pattern, case_sensitive=False)
Return True if any text data in the object or any of it's child objects matches a given regular expression.
source code
list
get_text_data_list(self)
Return the list of all textual attributes of the object.
source code
list
get_text_data_child_list(self)
Return the list of child objects that may carry textual data.
source code
list
get_referenced_handles(self)
Return the list of (classname, handle) tuples for all directly referenced primary objects.
source code
list
get_handle_referents(self)
Return the list of child objects which may, directly or through their children, reference primary objects.
source code
list
get_referenced_handles_recursively(self)
Return the list of (classname, handle) tuples for all referenced primary objects, whether directly or through child objects.
source code
Method Details

matches_string(self, pattern, case_sensitive=False)

source code 

Return True if any text data in the object or any of it's child objects matches a given pattern.

Parameters:
  • pattern (str) - The pattern to match.
  • case_sensitive (bool) - Whether the match is case-sensitive.
Returns: bool
Returns whether any text data in the object or any of it's child objects matches a given pattern.

matches_regexp(self, pattern, case_sensitive=False)

source code 

Return True if any text data in the object or any of it's child objects matches a given regular expression.

Parameters:
  • pattern (str) - The pattern to match.
Returns: bool
Returns whether any text data in the object or any of it's child objects matches a given regexp.

get_text_data_list(self)

source code 

Return the list of all textual attributes of the object.

Returns: list
Returns the list of all textual attributes of the object.

get_text_data_child_list(self)

source code 

Return the list of child objects that may carry textual data.

Returns: list
Returns the list of child objects that may carry textual data.

get_referenced_handles(self)

source code 

Return the list of (classname, handle) tuples for all directly referenced primary objects.

Returns: list
Returns the list of (classname, handle) tuples for referenced objects.

get_handle_referents(self)

source code 

Return the list of child objects which may, directly or through their children, reference primary objects.

Returns: list
Returns the list of objects refereincing primary objects.

get_referenced_handles_recursively(self)

source code 

Return the list of (classname, handle) tuples for all referenced primary objects, whether directly or through child objects.

Returns: list
Returns the list of (classname, handle) tuples for referenced objects.