def _generate_readme_text(self, object_tree_path):
        """Generate a human readable description of the folder in text format."""

        wdef_folder = self._object_tree.get_source_tree_folder(object_tree_path)
        res = StringIO()
        if len(object_tree_path):
            folder_name = object_tree_path[-1]
        else:
            folder_name = 'root'
        header = 'ObjectTree Folder "{}"'.format(folder_name)
        res.write(header + '\n')
        res.write('{}\n\n'.format('=' * len(header)))
        res.write(
            'The content present in object_tree folders is determined by a list\n'
        )
        res.write(
            'of specific identifiers and by queries applied against the DataONE\n'
        )
        res.write('search index.\n\n')
        res.write('Queries:\n\n')
        if len(wdef_folder['queries']):
            for query in wdef_folder['queries']:
                res.write('- {}\n'.format(query))
        else:
            res.write('No queries specified at this level.\n')
        res.write('\n\n')
        res.write('Identifiers:\n\n')
        if len(wdef_folder['identifiers']):
            for pid in wdef_folder['identifiers']:
                res.write('- {}\n'.format(pid))
        else:
            res.write('No individual identifiers selected at this level.\n')
        res.write('\n\n')
        res.write('Sub-folders:\n\n')
        if len(wdef_folder['collections']):
            for f in wdef_folder['collections']:
                res.write('- {}\n'.format(f))
        else:
            res.write('No object_tree sub-folders are specified at this level.\n')
        return res.getvalue().encode('utf-8')
Generate a human readable description of the folder in text format.