Package pyxmpp2 :: Module xmppstringprep :: Class Profile
[hide private]

Class Profile


Base class for stringprep profiles.
Instance Methods [hide private]
 
__init__(self, unassigned, mapping, normalization, prohibited, bidi=True)
Initialize Profile object.
 
prepare(self, data)
Complete string preparation procedure for 'stored' strings.
 
prepare_query(self, data)
Complete string preparation procedure for 'query' strings.
 
map(self, data)
Mapping part of string preparation.
 
prohibit(self, data)
Checks for prohibited characters.
 
check_unassigned(self, data)
Checks for unassigned character codes.

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

Static Methods [hide private]
 
check_bidi(data)
Checks if sting is valid for bidirectional printing.
Class Variables [hide private]
  cache_items = []
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, unassigned, mapping, normalization, prohibited, bidi=True)
(Constructor)

 
Initialize Profile object.
Parameters:
  • unassigned (tuple of functions) - the lookup table with unassigned codes
  • mapping (tuple of functions) - the lookup table with character mappings
  • normalization (tuple of functions) - the normalization function
  • prohibited (tuple of functions) - the lookup table with prohibited characters
  • bidi (bool) - if True then bidirectional checks should be done
Overrides: object.__init__

prepare(self, data)

 
Complete string preparation procedure for 'stored' strings. (includes checks for unassigned codes)
Parameters:
  • data - Unicode string to prepare.
Returns:
prepared string
Raises:

prepare_query(self, data)

 
Complete string preparation procedure for 'query' strings. (without checks for unassigned codes)
Parameters:
  • data - Unicode string to prepare.
Returns:
prepared string
Raises: