'Documented as an old display method, but still gets called via tests etc
This allows us to format the data shown in the central pane via the "eye" icon.'

def display_data(self, trans, data, preview=False, filename=None, to_ext=None, size=None, offset=None, **kwd):

    if (not preview):
        trans.response.set_content_type(data.get_mime())
        trans.log_event(('Display    dataset    id:    %s' % str(data.id)))
        neo4j_dir_name = '/dataset_{}_files/neo4jdb'.format(data.dataset.id)
        dir_name = (str(os.path.dirname(trans.app.object_store.get_filename(data.dataset))) + neo4j_dir_name)
        fname = ''.join(((((c in FILENAME_VALID_CHARS) and c) or '_') for c in data.name))[0:150]
        shutil.make_archive(fname, 'zip', dir_name)
        download_zip = (fname + '.zip')
        trans.response.headers['Content-Length'] = int(os.stat(download_zip).st_size)
        trans.response.set_content_type('application/octet-stream')
        trans.response.headers['Content-Disposition'] = ('attachment;    filename="Galaxy%s-[%s].%s"' % (data.hid, download_zip, 'zip'))
        return open(download_zip)
