TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | Private Member Functions | List of all members
indiclient.indiblob Class Reference
Inheritance diagram for indiclient.indiblob:
Inheritance graph
Collaboration diagram for indiclient.indiblob:
Collaboration graph

Public Member Functions

def __init__ (self, attrs, tag)
 
def get_plain_format (self)
 
def get_data (self)
 
def get_text (self)
 
def set_from_file (self, filename)
 
def set_text (self, text)
 
def get_size (self)
 
def set_from_string (self, text, format)
 
def update (self, attrs, tag)
 
def get_xml (self, transfertype)
 
def updateByElement (self, element)
 
- Public Member Functions inherited from indiclient.indielement
def __init__ (self, attrs, tag)
 
def set_float (self, num)
 
def tell (self)
 
def get_text (self)
 
def set_text (self, text)
 
def get_xml (self, transfertype)
 
def updateByElement (self, element)
 
- Public Member Functions inherited from indiclient.indinamedobject
def __init__ (self, attrs, tag)
 
def getName (self)
 
- Public Member Functions inherited from indiclient.indiobject
def __init__ (self, attrs, tag)
 
def is_valid (self)
 
def get_xml (self, transfertype)
 
def update (self, attrs, tag)
 

Public Attributes

 format
 
- Public Attributes inherited from indiclient.indinamedobject
 name
 
 label
 
- Public Attributes inherited from indiclient.indiobject
 tag
 

Private Member Functions

def _get_decoded_value (self)
 
def _encode_and_set_value (self, value, format)
 

Detailed Description

@ivar format : A string describing the file-format/-extension (e.g C{.fits})
@type format : StringType

Constructor & Destructor Documentation

◆ __init__()

def indiclient.indiblob.__init__ (   self,
  attrs,
  tag 
)

Member Function Documentation

◆ _encode_and_set_value()

def indiclient.indiblob._encode_and_set_value (   self,
  value,
  format 
)
private
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 L{format} string ends with C{.z}.
base64 encoding is always done.
@param value:  The value to be set, plain binary version.
@type value: StringType 
@param format:  The format of the value to be set.
@type format: StringType 
@return: B{None}
@rtype: NoneType

◆ _get_decoded_value()

def indiclient.indiblob._get_decoded_value (   self)
private
Decodes the value of the BLOB it does the base64 decoding as well as zlib decompression.
zlib decompression is done only if the current L{format} string ends with C{.z}.
base64 decoding is always done.
@return: the decoded version of value
@rtype: StringType

◆ get_data()

def indiclient.indiblob.get_data (   self)
@return: the plain binary version of its data 
@rtype: StringType

◆ get_plain_format()

def indiclient.indiblob.get_plain_format (   self)
@return: The format of the BLOB, possible extensions due to compression like C{.z} are removed
@rtype: StringType

◆ get_size()

def indiclient.indiblob.get_size (   self)
@return: size of the xml representation of the data. This is usually not equal to the size of the string object returned by L{get_data}. Because blobs are
base64 encoded and can be compressed.
@rtype: StringType 

◆ get_text()

def indiclient.indiblob.get_text (   self)
@return: the plain binary version of its data
@rtype: StringType 

◆ get_xml()

def indiclient.indiblob.get_xml (   self,
  transfertype 
)

◆ set_from_file()

def indiclient.indiblob.set_from_file (   self,
  filename 
)
Loads a BLOB with data from a file. 
The extension of the file is used as C{format} attribute of the BLOB
@param filename:  The name of the file to be loaded.
@type filename: StringType 
@return: B{None}
@rtype: NoneType

◆ set_from_string()

def indiclient.indiblob.set_from_string (   self,
  text,
  format 
)
Loads a BLOB with data from a string.
@param text:  The string to be loaded into the BLOB.
@type text: StringType 
@param format:  A string to be used as the format attribute of the BLOB 
@type format:   StringType
@return: B{None}
@rtype: NoneType

◆ set_text()

def indiclient.indiblob.set_text (   self,
  text 
)

◆ update()

def indiclient.indiblob.update (   self,
  attrs,
  tag 
)

◆ updateByElement()

def indiclient.indiblob.updateByElement (   self,
  element 
)

Member Data Documentation

◆ format

indiclient.indiblob.format

The documentation for this class was generated from the following file: