Package gen :: Package lib :: Module attribute :: Class Attribute
[frames] | no frames]

Class Attribute

source code


Provide a simple key/value pair for describing properties.

Used by the Person and Family objects to store descriptive information.

Instance Methods
 
__init__(self, source=None)
Create a new Attribute object, copying from the source if provided.
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_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
 
set_type(self, val)
Set the type (or key) of the Attribute instance.
source code
 
get_type(self)
Return the type (or key) or the Attribute instance.
source code
 
set_value(self, val)
Set the value of the Attribute instance.
source code
 
get_value(self)
Return the value of the Attribute instance.
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 srcbase.SourceBase: add_source_reference, get_source_references, get_sourcref_child_list, has_source_reference, remove_source_references, replace_source_references, set_source_reference_list

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

Method Details

__init__(self, source=None)
(Constructor)

source code 

Create a new Attribute object, copying from the source if provided.

Parameters:
  • source - Object used to initialize the new object
Overrides: notebase.NoteBase.__init__

serialize(self)

source code 

Convert the object to a serialized tuple of data.

Overrides: notebase.NoteBase.serialize

unserialize(self, data)

source code 

Convert a serialized tuple of data to an object.

Overrides: notebase.NoteBase.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_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