Package gen :: Package lib :: Module src :: Class Source
[frames] | no frames]

Class Source

source code


A record of a source of information.

Instance Methods
 
__init__(self)
Create a new Source instance.
source code
 
serialize(self)
Convert the object to a serialized tuple of data.
source code
 
unserialize(self, data)
Convert the data held in a tuple created by the serialize method back into the data in an Event structure.
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_sourcref_child_list(self)
Return the list of child secondary objects that may refer sources.
source code
list
get_note_child_list(self)
Return the list of child secondary objects that may refer notes.
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(self)
Return the list of (classname, handle) tuples for all directly referenced primary objects.
source code
bool
has_source_reference(self, src_handle)
Return True if any of the child objects has reference to this source handle.
source code
 
remove_source_references(self, src_handle_list)
Remove references to all source handles in the list in all child objects.
source code
 
replace_source_references(self, old_handle, new_handle)
Replace references to source handles in the list in this object and all child objects.
source code
 
get_data_map(self)
Return the data map of attributes for the source.
source code
 
set_data_map(self, datamap)
Set the data map of attributes for the source.
source code
 
set_data_item(self, key, value)
Set the particular data item in the attribute data map.
source code
 
set_title(self, title)
Set the descriptive title of the Source object.
source code
str
get_title(self)
Return the descriptive title of the Place object.
source code
 
set_author(self, author)
Set the author of the Source.
source code
 
get_author(self)
Return the author of the Source.
source code
 
set_publication_info(self, text)
Set the publication information of the Source.
source code
 
get_publication_info(self)
Return the publication information of the Source.
source code
 
set_abbreviation(self, abbrev)
Set the title abbreviation of the Source.
source code
 
get_abbreviation(self)
Return the title abbreviation of the Source.
source code
 
add_repo_reference(self, repo_ref)
Add a RepoRef instance to the Source's reporef list.
source code
list
get_reporef_list(self)
Return the list of RepoRef instances associated with the Source.
source code
 
set_reporef_list(self, reporef_list)
Set the list of RepoRef instances associated with the Source.
source code
bool
has_repo_reference(self, repo_handle)
Return True if the Source has reference to this Repository handle.
source code
 
remove_repo_references(self, repo_handle_list)
Remove references to all Repository handles in the list.
source code
 
replace_repo_references(self, old_handle, new_handle)
Replace all references to old Repository handle with the new handle.
source code

Inherited from mediabase.MediaBase: add_media_reference, get_media_list, has_media_reference, remove_media_references, replace_media_references, set_media_list

Inherited from notebase.NoteBase: add_note, get_note_list, get_referenced_note_handles, remove_note, set_note_list

Inherited from primaryobj.PrimaryObject: get_marker, has_handle_reference, remove_handle_references, replace_handle_reference, set_marker

Inherited from primaryobj.BasicPrimaryObject: get_change_display, get_change_time, get_gramps_id, get_handle, set_gramps_id, set_handle

Inherited from baseobj.BaseObject: get_referenced_handles_recursively, matches_regexp, matches_string

Inherited from privacybase.PrivacyBase: get_privacy, set_privacy

Method Details

__init__(self)
(Constructor)

source code 

Create a new Source instance.

Parameters:
  • source - Object used to initialize the new object
Overrides: privacybase.PrivacyBase.__init__

serialize(self)

source code 

Convert the object to a serialized tuple of data.

Overrides: privacybase.PrivacyBase.serialize

unserialize(self, data)

source code 

Convert the data held in a tuple created by the serialize method back into the data in an Event structure.

Overrides: privacybase.PrivacyBase.unserialize

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.
Overrides: baseobj.BaseObject.get_text_data_list

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.
Overrides: baseobj.BaseObject.get_text_data_child_list

get_sourcref_child_list(self)

source code 

Return the list of child secondary objects that may refer sources.

Returns: list
Returns the list of child secondary child objects that may refer sources.

get_note_child_list(self)

source code 

Return the list of child secondary objects that may refer notes.

Returns: list
Returns the list of child secondary child objects that may refer notes.
Overrides: notebase.NoteBase.get_note_child_list

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.
Overrides: baseobj.BaseObject.get_handle_referents

get_referenced_handles(self)

source code 

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

Returns: list
List of (classname, handle) tuples for referenced objects.
Overrides: baseobj.BaseObject.get_referenced_handles

has_source_reference(self, src_handle)

source code 

Return True if any of the child objects has reference to this source handle.

Parameters:
  • src_handle (str) - The source handle to be checked.
Returns: bool
Returns whether any of it's child objects has reference to this source handle.
Overrides: primaryobj.BasicPrimaryObject.has_source_reference

remove_source_references(self, src_handle_list)

source code 

Remove references to all source handles in the list in all child objects.

Parameters:
  • src_handle_list (list) - The list of source handles to be removed.
Overrides: primaryobj.BasicPrimaryObject.remove_source_references

replace_source_references(self, old_handle, new_handle)

source code 

Replace references to source handles in the list in this object and all child objects.

Parameters:
  • old_handle (str) - The source handle to be replaced.
  • new_handle (str) - The source handle to replace the old one with.
Overrides: primaryobj.BasicPrimaryObject.replace_source_references

set_title(self, title)

source code 

Set the descriptive title of the Source object.

Parameters:
  • title (str) - descriptive title to assign to the Source

get_title(self)

source code 

Return the descriptive title of the Place object.

Returns: str
Returns the descriptive title of the Place

add_repo_reference(self, repo_ref)

source code 

Add a RepoRef instance to the Source's reporef list.

Parameters:
  • repo_ref (RepoRef) - RepoRef instance to be added to the object's reporef list.

get_reporef_list(self)

source code 

Return the list of RepoRef instances associated with the Source.

Returns: list
list of RepoRef instances associated with the Source

set_reporef_list(self, reporef_list)

source code 

Set the list of RepoRef instances associated with the Source. It replaces the previous list.

Parameters:
  • reporef_list (list) - list of RepoRef instances to be assigned to the Source.

has_repo_reference(self, repo_handle)

source code 

Return True if the Source has reference to this Repository handle.

Parameters:
  • repo_handle (str) - The Repository handle to be checked.
Returns: bool
Returns whether the Source has reference to this Repository handle.

remove_repo_references(self, repo_handle_list)

source code 

Remove references to all Repository handles in the list.

Parameters:
  • repo_handle_list (list) - The list of Repository handles to be removed.

replace_repo_references(self, old_handle, new_handle)

source code 

Replace all references to old Repository handle with the new handle.

Parameters:
  • old_handle (str) - The Repository handle to be replaced.
  • new_handle (str) - The Repository handle to replace the old one with.