Package mobi :: Package mtld :: Package da :: Module property :: Class Property
[hide private]
[frames] | no frames]

Class Property

object --+
         |
        Property

Contains a property value and data type id. The value can be fetched as a generic Object or one of the convenience str(), int(), bool() methods can be used to get the value in a specific type.

Instance Methods [hide private]
 
__init__(self, value, data_type)
Creates a new Property with a value and data type
 
data_type(self)
Get data type name.
 
__iter__(self)
Gets a set of possible values for this property.
 
__bool__(self)
Get the value of the property as a boolean (Python 3.x)
 
__nonzero__(self)
 
__int__(self)
Get the value of the property as an integer.
 
__str__(self)
Gets the value of the property as string.
 
__eq__(self, other)
Opposite to __ne__()
 
__ne__(self, other)
Compare two instances of this class.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
normalize_string(possible_unicode_str)
Return a string representation of the parameter passed, encoding as UTF-8 in case of encoding error and replacing accented by unaccented characters.
 
list_to_normalized_string(lst)
Properties [hide private]
  value
  data_type_id

Inherited from object: __class__

Method Details [hide private]

__init__(self, value, data_type)
(Constructor)

 

Creates a new Property with a value and data type

Parameters:
  • value - is the value to store
  • data_type - is a byte or char that represents the data type of the value to store
Overrides: object.__init__

data_type(self)

 

Get data type name. It returns a String with the data type name

__iter__(self)

 

Gets a set of possible values for this property. This is typically only used when it is known that a given property name can have multiple possible values. All items in the set will have the same data type. It returns the array value of the property

__str__(self)
(Informal representation operator)

 

Gets the value of the property as string. If a property has multiple possible values then the values are concatenated with a comma.

Overrides: object.__str__

__ne__(self, other)

 

Compare two instances of this class. If both have equal values and data type then returns False.

normalize_string(possible_unicode_str)
Static Method

 

Return a string representation of the parameter passed, encoding as UTF-8 in case of encoding error and replacing accented by unaccented characters.

:param possible_unicode_str: :return:


Property Details [hide private]

value

Get Method:
unreachable.value(self)

data_type_id

Get Method:
unreachable.data_type_id(self)