First page Back Continue Last page Image

IHandler API

class IHandler(Interface):

"""Handles connections with the backend converted by socket or CLI"""

def convert(destination_format, page=None, **kw):

"""Convert document to given destination_format"""

def getMetadata(converted_data):

"""Returns a dictionary with all metadata of document. If converted_data is

True, the document is added in dictionary."""

def setMetadata(metadata_dict):

"""Returns a document with the new metadata"""


Notes:

Cloudooo defines an interface for handlers. This interface implements part of the IManager interface and delegates implementation either to command line invocations or to external web services. The interface consists of convert, getMetadata and setMetadata methods.

The notion of metadata here relates to the title, creation date and other metadata properties which are explicitely defined inside certain file formats. ODF for example defines an undefined number of user-defined metadata properties. Exif defines various metadata properties including geolocation.

Setting explicit metadata on files can be useful for file interchange purpose.