'Convert a value to a text representation suitable for displaying to
the user
>>> p = ToolParameter( None, XML( \'<param name="_name" />\' ) )
>>> print p.to_text( None )
Not available.
>>> print p.to_text( \'\' )
Empty.
>>> print p.to_text( \'text\' )
text
>>> print p.to_text( True )
True
>>> print p.to_text( False )
False
>>> print p.to_text( 0 )
0'

def to_text(self, value):

    if (value is not None):
        str_value = unicodify(value)
        if (not str_value):
            return 'Empty.'
        return str_value
    return 'Not    available.'
