Module indiclient :: Class indiblob
[show private | hide private]
[frames | no frames]

Class indiblob

 indiobject --+        
              |        
indinamedobject --+    
                  |    
        indielement --+
                      |
                     indiblob



Method Summary
  __init__(self, attrs, tag)
StringType get_data(self)
Return the plain binary version of its data
StringType get_plain_format(self)
Return the format of the BLOB, possible extensions due to compression like .z are removed
StringType get_size(self)
Return size of the xml representation of the data.
StringType get_text(self)
Return the plain binary version of its data
StringType get_xml(self, transfertype)
Returns an XML representation of the object
NoneType set_from_file(self, filename)
Loads a BLOB with data from a file.
NoneType set_from_string(self, text, format)
Loads a BLOB with data from a string.
NoneType set_text(self, text)
Return None
NoneType update(self, attrs, tag)
Update this element with data received form the XML Parser.
NoneType _encode_and_set_value(self, value, format)
Encodes the value to be written into the BLOB it does the base64 encoding as well as zlib compression.
StringType _get_decoded_value(self)
Decodes the value of the BLOB it does the base64 decoding as well as zlib decompression.
    Inherited from indielement
NoneType set_float(self, num)
Return None
NoneType tell(self)
Prints all parameters of the object
BooleanType _get_changed(self)
Return True if the objects XML data was changed since the last _get_changed was called, False otherwise.
NoneType _set_value(self, value)
Sets the value variable of this object.
    Inherited from indiobject
BooleanType is_valid(self)
Checks whether the object is valid.
NoneType _check_writeable(self)
Raises an exception if the object is not writable

Instance Variable Summary
StringType format: A string describing the file-format/-extension (e.g .fits)
    Inherited from indielement
StringType _old_value: The old value of the object, the value it had when _get_changed was called last time.
StringType _value: The value of the INDI object.
    Inherited from indinamedobject
StringType label: label of the INDI object as given in the "label" XML attribute
StringType name: name of the INDI object as given in the "name" XML attribute
    Inherited from indiobject
indixmltag tag: The XML tag of the INDI object (see indixmltag).

Method Details

__init__(self, attrs, tag)
(Constructor)

Parameters:
attrs - The attributes of the XML version of the INDI object.
           (type=DictType)
tag - The XML tag of the object (see indixmltag).
           (type=indixmltag)
Overrides:
indiclient.indielement.__init__ (inherited documentation)

get_data(self)

Returns:
the plain binary version of its data
           (type=StringType)

get_plain_format(self)

Returns:
The format of the BLOB, possible extensions due to compression like .z are removed
           (type=StringType)

get_size(self)

Returns:
size of the xml representation of the data. This is usually not equal to the size of the string object returned by get_data. Because blobs are base64 encoded and can be compressed.
           (type=StringType)

get_text(self)

Returns:
the plain binary version of its data
           (type=StringType)
Overrides:
indiclient.indielement.get_text

get_xml(self, transfertype)

Returns an XML representation of the object
Parameters:
transfertype - The inditransfertype for which the XML code shall be generated
           (type={inditransfertype})
Returns:
an XML representation of the object
           (type=StringType)
Overrides:
indiclient.indielement.get_xml (inherited documentation)

set_from_file(self, filename)

Loads a BLOB with data from a file. The extension of the file is used as format attribute of the BLOB
Parameters:
filename - The name of the file to be loaded.
           (type=StringType)
Returns:
None
           (type=NoneType)

set_from_string(self, text, format)

Loads a BLOB with data from a string.
Parameters:
text - The string to be loaded into the BLOB.
           (type=StringType)
format - A string to be used as the format attribute of the BLOB
           (type=StringType)
Returns:
None
           (type=NoneType)

set_text(self, text)

Parameters:
text - A string representation of the data to be written into the object.
           (type=StringType)
Returns:
None
           (type=NoneType)
Overrides:
indiclient.indielement.set_text (inherited documentation)

update(self, attrs, tag)

Update this element with data received form the XML Parser.
Parameters:
attrs - The attributes of the XML version of the INDI object.
           (type=DictType)
tag - The XML tag of the object (see indixmltag).
           (type=indixmltag)
Returns:
None
           (type=NoneType)
Overrides:
indiclient.indiobject.update (inherited documentation)

_encode_and_set_value(self, value, format)

Encodes the value to be written into the BLOB it does the base64 encoding as well as zlib compression. Zlib compression is done only if the current format string ends with .z. base64 encoding is always done.
Parameters:
value - The value to be set, plain binary version.
           (type=StringType)
format - The format of the value to be set.
           (type=StringType)
Returns:
None
           (type=NoneType)

_get_decoded_value(self)

Decodes the value of the BLOB it does the base64 decoding as well as zlib decompression. zlib decompression is done only if the current format string ends with .z. base64 decoding is always done.
Returns:
the decoded version of value
           (type=StringType)

Instance Variable Details

format

A string describing the file-format/-extension (e.g .fits)
Type:
StringType

Generated by Epydoc 2.1 on Sat Sep 10 10:26:03 2005 http://epydoc.sf.net