Package gen :: Package lib :: Module eventref :: Class EventRef
[frames] | no frames]

Class EventRef

source code


Event reference class.

This class is for keeping information about how the person relates to the refereneced event.

Instance Methods
 
__init__(self, source=None)
Create a new EventRef instance, copying from the source if present.
source code
 
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
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_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
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_role(self)
Return the tuple corresponding to the preset role.
source code
 
set_role(self, role)
Set the role according to the given argument.
source code

Inherited from secondaryobj.SecondaryObject: is_equal

Inherited from baseobj.BaseObject: get_referenced_handles_recursively, matches_regexp, matches_string

Inherited from privacybase.PrivacyBase: get_privacy, set_privacy

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

Inherited from attrbase.AttributeBase: add_attribute, get_attribute_list, remove_attribute, set_attribute_list

Inherited from refbase.RefBase: get_reference_handle, set_reference_handle

Method Details

__init__(self, source=None)
(Constructor)

source code 

Create a new EventRef instance, copying from the source if present.

Parameters:
  • source - Object used to initialize the new object
Overrides: refbase.RefBase.__init__

serialize(self)

source code 

Convert the object to a serialized tuple of data.

Overrides: refbase.RefBase.serialize

unserialize(self, data)

source code 

Convert a serialized tuple of data to an object.

Overrides: refbase.RefBase.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_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.
Overrides: refbase.RefBase.get_referenced_handles

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

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.

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.

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.