'Returns modified file contents for a particular display type'

def as_display_type(self, dataset, type, **kwd):

    try:
        if (type in self.get_display_types()):
            return getattr(self, self.supported_display_apps[type]['file_function'])(dataset, **kwd)
    except:
        log.exception('Function    %s    is    referred    to    in    datatype    %s    for    displaying    as    type    %s,    but    is    not    accessible', self.supported_display_apps[type]['file_function'], self.__class__.__name__, type)
    return ('This    display    type    (%s)    is    not    implemented    for    this    datatype    (%s).' % (type, dataset.ext))
