@frontend.route('/objects/')
@flask_login.login_required
def objects():
    object_ids = flask.request.args.get('ids', '')
    objects = []
    display_properties = []
    display_property_titles = {}
    user_language_id = logic.languages.get_user_language(flask_login.current_user).id
    if ('display_properties' in flask.request.args):
        for property_info in flask.request.args.get('display_properties', '').split(','):
            if (':' in property_info):
                (property_name, property_title) = property_info.split(':', 1)
            else:
                (property_name, property_title) = (property_info, property_info)
            if (property_name not in display_properties):
                display_properties.append(property_name)
            display_property_titles[property_name] = property_title
    name_only = True
    if object_ids:
        object_ids = object_ids.split(',')
        try:
            object_ids = [int(object_id) for object_id in object_ids]
        except ValueError:
            object_ids = []
        readable_object_ids = []
        for object_id in object_ids:
            if (Permissions.READ in get_user_object_permissions(object_id, user_id=flask_login.current_user.id)):
                readable_object_ids.append(object_id)
        object_ids = readable_object_ids
        for object_id in object_ids:
            try:
                objects.append(get_object(object_id))
            except logic.errors.ObjectDoesNotExistError:
                pass
        action_id = None
        action = None
        action_type = None
        project_id = None
        location_id = None
        location = None
        user = None
        user_id = None
        doi = None
        object_ids_at_location = None
        project = None
        group = None
        group_id = None
        query_string = ''
        use_advanced_search = False
        must_use_advanced_search = False
        advanced_search_had_error = False
        search_notes = []
        search_tree = None
        limit = None
        offset = None
        pagination_enabled = True
        num_objects_found = len(objects)
        sorting_property_name = None
        sorting_order_name = None
    else:
        pagination_enabled = True
        try:
            user_id = int(flask.request.args.get('user', ''))
            user = get_user(user_id)
        except ValueError:
            user_id = None
            user = None
        except UserDoesNotExistError:
            user_id = None
            user = None
        if (user_id is not None):
            user_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('user_permissions', '').lower())
        else:
            user_permissions = None
        try:
            doi = logic.publications.simplify_doi(flask.request.args.get('doi', ''))
        except logic.errors.InvalidDOIError:
            doi = None
        try:
            location_id = int(flask.request.args.get('location', ''))
            location = get_location(location_id)
            object_ids_at_location = get_object_ids_at_location(location_id)
        except ValueError:
            location_id = None
            location = None
            object_ids_at_location = None
        except LocationDoesNotExistError:
            location_id = None
            location = None
            object_ids_at_location = None
        try:
            action_id = int(flask.request.args.get('action', ''))
        except ValueError:
            action_id = None
        if (action_id is not None):
            action = get_action_with_translation_in_language(action_id, user_language_id, use_fallback=True)
            action_type = get_action_type_with_translation_in_language(action.type_id, user_language_id)
            action_schema = action.schema
            if (not display_properties):
                display_properties = action_schema.get('displayProperties', [])
                for property_name in display_properties:
                    display_property_titles[property_name] = action_schema['properties'][property_name]['title']
        else:
            action = None
            action_type_id = flask.request.args.get('t', '')
            if (action_type_id is not None):
                try:
                    action_type_id = int(action_type_id)
                except ValueError:
                    action_type_id = {'samples': models.ActionType.SAMPLE_CREATION, 'measurements': models.ActionType.MEASUREMENT, 'simulations': models.ActionType.SIMULATION}.get(action_type_id, None)
            if (action_type_id is not None):
                try:
                    action_type = get_action_type_with_translation_in_language(action_type_id=action_type_id, language_id=user_language_id)
                except ActionTypeDoesNotExistError:
                    action_type = None
            else:
                action_type = None
        project_permissions = None
        if display_properties:
            name_only = False
        try:
            project_id = int(flask.request.args.get('project', ''))
        except ValueError:
            project_id = None
        if (project_id is not None):
            if (Permissions.READ not in get_user_project_permissions(project_id=project_id, user_id=flask_login.current_user.id, include_groups=True)):
                return flask.abort(403)
            project = get_project(project_id)
            project_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('project_permissions', '').lower())
        else:
            project = None
        group_permissions = None
        try:
            group_id = int(flask.request.args.get('group', ''))
        except ValueError:
            group_id = None
        if (group_id is not None):
            try:
                group = logic.groups.get_group(group_id)
                group_member_ids = logic.groups.get_group_member_ids(group_id)
            except logic.errors.GroupDoesNotExistError:
                group = None
            else:
                if (flask_login.current_user.id not in group_member_ids):
                    return flask.abort(403)
        else:
            group = None
        if (group is not None):
            group_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('group_permissions', '').lower())
        else:
            group_permissions = None
        if (flask.request.args.get('limit', '') == 'all'):
            limit = None
        else:
            try:
                limit = int(flask.request.args.get('limit', ''))
            except ValueError:
                limit = None
            else:
                if (limit <= 0):
                    limit = None
                elif (limit >= 1000):
                    limit = 1000
            if (limit is None):
                limit = get_user_settings(flask_login.current_user.id)['OBJECTS_PER_PAGE']
            else:
                set_user_settings(flask_login.current_user.id, {'OBJECTS_PER_PAGE': limit})
        try:
            offset = int(flask.request.args.get('offset', ''))
        except ValueError:
            offset = None
        else:
            if (offset < 0):
                offset = None
            elif (offset > 100000000):
                offset = 100000000
        if ((limit is not None) and (offset is None)):
            offset = 0
        sorting_order_name = flask.request.args.get('order', None)
        if (sorting_order_name == 'asc'):
            sorting_order = object_sorting.ascending
        elif (sorting_order_name == 'desc'):
            sorting_order = object_sorting.descending
        else:
            sorting_order = None
        sorting_property_name = flask.request.args.get('sortby', None)
        if (sorting_order is None):
            if (sorting_property_name is None):
                sorting_order_name = 'desc'
                sorting_order = object_sorting.descending
            else:
                sorting_order_name = 'asc'
                sorting_order = object_sorting.ascending
        if (sorting_property_name is None):
            sorting_property_name = '_object_id'
        else:
            name_only = False
        if (sorting_property_name == '_object_id'):
            sorting_property = object_sorting.object_id()
        elif (sorting_property_name == '_creation_date'):
            sorting_property = object_sorting.creation_date()
        elif (sorting_property_name == '_last_modification_date'):
            sorting_property = object_sorting.last_modification_date()
        else:
            sorting_property = object_sorting.property_value(sorting_property_name)
        sorting_function = sorting_order(sorting_property)
        query_string = flask.request.args.get('q', '')
        if query_string:
            name_only = False
        search_tree = None
        use_advanced_search = (flask.request.args.get('advanced', None) is not None)
        must_use_advanced_search = use_advanced_search
        advanced_search_had_error = False
        additional_search_notes = []
        if ((not use_advanced_search) and query_string):
            if (user_id is None):
                users = get_users_by_name(query_string)
                if (len(users) == 1):
                    user = users[0]
                    user_id = user.id
                    query_string = ''
                elif (len(users) > 1):
                    additional_search_notes.append(('error', 'There are multiple users with this name.', 0, 0))
            if ((doi is None) and query_string.startswith('doi:')):
                try:
                    doi = logic.publications.simplify_doi(query_string)
                    query_string = ''
                except logic.errors.InvalidDOIError:
                    pass
        try:
            (filter_func, search_tree, use_advanced_search) = generate_filter_func(query_string, use_advanced_search)
        except Exception:
            if use_advanced_search:
                advanced_search_had_error = True

                def filter_func(data, search_notes):
                    ' Return all objects'
                    search_notes.append(('error', 'Unable to parse search expression', 0, len(query_string)))
                    return False
            else:
                raise
        (filter_func, search_notes) = wrap_filter_func(filter_func)
        search_notes.extend(additional_search_notes)
        if ((user_id is None) or (user_permissions is not None)):
            object_ids_for_user = None
        else:
            object_ids_for_user = user_log.get_user_related_object_ids(user_id)
        if (doi is None):
            object_ids_for_doi = None
        else:
            object_ids_for_doi = logic.publications.get_object_ids_linked_to_doi(doi)
        if (use_advanced_search and (not must_use_advanced_search)):
            search_notes.append(('info', _('The advanced search was used automatically. Search for "%(query_string)s" to use the simple search.', query_string=query_string), 0, 0))
        try:
            object_ids = None
            if (object_ids_at_location is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_at_location)
            if (object_ids_for_user is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_for_user)
            if (object_ids_for_doi is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_for_doi)
            if (object_ids is not None):
                pagination_enabled = False
                limit = None
                offset = None
            if ((object_ids is not None) and (not object_ids)):
                objects = []
                num_objects_found = 0
            else:
                num_objects_found_list = []
                objects = get_objects_with_permissions(user_id=flask_login.current_user.id, permissions=Permissions.READ, filter_func=filter_func, sorting_func=sorting_function, limit=limit, offset=offset, action_id=action_id, action_type_id=(action_type.id if (action_type is not None) else None), other_user_id=user_id, other_user_permissions=user_permissions, project_id=project_id, project_permissions=project_permissions, group_id=group_id, group_permissions=group_permissions, object_ids=object_ids, num_objects_found=num_objects_found_list, name_only=name_only)
                num_objects_found = num_objects_found_list[0]
        except Exception as e:
            search_notes.append(('error', 'Error during search: {}'.format(e), 0, 0))
            objects = []
            num_objects_found = 0
        if any(((note[0] == 'error') for note in search_notes)):
            objects = []
            advanced_search_had_error = True
    cached_actions = {}
    cached_users = {}
    for (i, obj) in enumerate(objects):
        if (obj.version_id == 0):
            original_object = obj
        else:
            original_object = get_object(object_id=obj.object_id, version_id=0)
        if (obj.action_id not in cached_actions):
            cached_actions[obj.action_id] = get_action(obj.action_id)
        if (obj.user_id not in cached_users):
            cached_users[obj.user_id] = get_user(obj.user_id)
        if (original_object.user_id not in cached_users):
            cached_users[original_object.user_id] = get_user(original_object.user_id)
        objects[i] = {'object_id': obj.object_id, 'created_by': cached_users[original_object.user_id], 'created_at': original_object.utc_datetime, 'modified_by': cached_users[obj.user_id], 'last_modified_at': obj.utc_datetime, 'data': obj.data, 'schema': obj.schema, 'action': cached_actions[obj.action_id], 'display_properties': {}}
        for property_name in display_properties:
            if ((property_name not in objects[i]['data']) or ('_type' not in objects[i]['data'][property_name]) or (property_name not in objects[i]['schema']['properties'])):
                objects[i]['display_properties'][property_name] = None
                continue
            objects[i]['display_properties'][property_name] = (objects[i]['data'][property_name], objects[i]['schema']['properties'][property_name])
    if (action_id is None):
        show_action = True
    else:
        show_action = False

    def build_modified_url(**kwargs):
        return flask.url_for('.objects', **{k: v for (k, v) in flask.request.args.items() if (k not in kwargs)}, **kwargs)
    action_ids = {object['action'].id for object in objects}
    action_translations = {}
    for id in action_ids:
        action_translations[id] = logic.action_translations.get_action_translation_for_action_in_language(action_id=id, language_id=user_language_id, use_fallback=True)
    return flask.render_template('objects/objects.html', objects=objects, display_properties=display_properties, display_property_titles=display_property_titles, search_query=query_string, action=action, action_translations=action_translations, action_id=action_id, action_type=action_type, project=project, project_id=project_id, group=group, group_id=group_id, location_id=location_id, location=location, user_id=user_id, user=user, doi=doi, get_object_if_current_user_has_read_permissions=get_object_if_current_user_has_read_permissions, get_instrument_translation_for_instrument_in_language=logic.instrument_translations.get_instrument_translation_for_instrument_in_language, build_modified_url=build_modified_url, sorting_property=sorting_property_name, sorting_order=sorting_order_name, limit=limit, offset=offset, pagination_enabled=pagination_enabled, num_objects_found=num_objects_found, show_action=show_action, use_advanced_search=use_advanced_search, must_use_advanced_search=must_use_advanced_search, advanced_search_had_error=advanced_search_had_error, search_notes=search_notes, search_tree=search_tree)
@frontend.route('/objects/')
@flask_login.login_required
def objects():
    object_ids = flask.request.args.get('ids', )
    objects = []
    display_properties = []
    display_property_titles = {}
    user_language_id = logic.languages.get_user_language(flask_login.current_user).id
    if ('display_properties' in flask.request.args):
        for property_info in flask.request.args.get('display_properties', ).split(','):
            if (':' in property_info):
                (property_name, property_title) = property_info.split(':', 1)
            else:
                (property_name, property_title) = (property_info, property_info)
            if (property_name not in display_properties):
                display_properties.append(property_name)
            display_property_titles[property_name] = property_title
    name_only = True
    if object_ids:
        object_ids = object_ids.split(',')
        try:
            object_ids = [int(object_id) for object_id in object_ids]
        except ValueError:
            object_ids = []
        readable_object_ids = []
        for object_id in object_ids:
            if (Permissions.READ in get_user_object_permissions(object_id, user_id=flask_login.current_user.id)):
                readable_object_ids.append(object_id)
        object_ids = readable_object_ids
        for object_id in object_ids:
            try:
                objects.append(get_object(object_id))
            except logic.errors.ObjectDoesNotExistError:
                pass
        action_id = None
        action = None
        action_type = None
        project_id = None
        location_id = None
        location = None
        user = None
        user_id = None
        doi = None
        object_ids_at_location = None
        project = None
        group = None
        group_id = None
        query_string = 
        use_advanced_search = False
        must_use_advanced_search = False
        advanced_search_had_error = False
        search_notes = []
        search_tree = None
        limit = None
        offset = None
        pagination_enabled = True
        num_objects_found = len(objects)
        sorting_property_name = None
        sorting_order_name = None
    else:
        pagination_enabled = True
        try:
            user_id = int(flask.request.args.get('user', ))
            user = get_user(user_id)
        except ValueError:
            user_id = None
            user = None
        except UserDoesNotExistError:
            user_id = None
            user = None
        if (user_id is not None):
            user_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('user_permissions', ).lower())
        else:
            user_permissions = None
        try:
            doi = logic.publications.simplify_doi(flask.request.args.get('doi', ))
        except logic.errors.InvalidDOIError:
            doi = None
        try:
            location_id = int(flask.request.args.get('location', ))
            location = get_location(location_id)
            object_ids_at_location = get_object_ids_at_location(location_id)
        except ValueError:
            location_id = None
            location = None
            object_ids_at_location = None
        except LocationDoesNotExistError:
            location_id = None
            location = None
            object_ids_at_location = None
        try:
            action_id = int(flask.request.args.get('action', ))
        except ValueError:
            action_id = None
        if (action_id is not None):
            action = get_action_with_translation_in_language(action_id, user_language_id, use_fallback=True)
            action_type = get_action_type_with_translation_in_language(action.type_id, user_language_id)
            action_schema = action.schema
            if (not display_properties):
                display_properties = action_schema.get('displayProperties', [])
                for property_name in display_properties:
                    display_property_titles[property_name] = action_schema['properties'][property_name]['title']
        else:
            action = None
            action_type_id = flask.request.args.get('t', )
            if (action_type_id is not None):
                try:
                    action_type_id = int(action_type_id)
                except ValueError:
                    action_type_id = {'samples': models.ActionType.SAMPLE_CREATION, 'measurements': models.ActionType.MEASUREMENT, 'simulations': models.ActionType.SIMULATION}.get(action_type_id, None)
            if (action_type_id is not None):
                try:
                    action_type = get_action_type_with_translation_in_language(action_type_id=action_type_id, language_id=user_language_id)
                except ActionTypeDoesNotExistError:
                    action_type = None
            else:
                action_type = None
        project_permissions = None
        if display_properties:
            name_only = False
        try:
            project_id = int(flask.request.args.get('project', ))
        except ValueError:
            project_id = None
        if (project_id is not None):
            if (Permissions.READ not in get_user_project_permissions(project_id=project_id, user_id=flask_login.current_user.id, include_groups=True)):
                return flask.abort(403)
            project = get_project(project_id)
            project_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('project_permissions', ).lower())
        else:
            project = None
        group_permissions = None
        try:
            group_id = int(flask.request.args.get('group', ))
        except ValueError:
            group_id = None
        if (group_id is not None):
            try:
                group = logic.groups.get_group(group_id)
                group_member_ids = logic.groups.get_group_member_ids(group_id)
            except logic.errors.GroupDoesNotExistError:
                group = None
            else:
                if (flask_login.current_user.id not in group_member_ids):
                    return flask.abort(403)
        else:
            group = None
        if (group is not None):
            group_permissions = {'read': Permissions.READ, 'write': Permissions.WRITE, 'grant': Permissions.GRANT}.get(flask.request.args.get('group_permissions', ).lower())
        else:
            group_permissions = None
        if (flask.request.args.get('limit', ) == 'all'):
            limit = None
        else:
            try:
                limit = int(flask.request.args.get('limit', ))
            except ValueError:
                limit = None
            else:
                if (limit <= 0):
                    limit = None
                elif (limit >= 1000):
                    limit = 1000
            if (limit is None):
                limit = get_user_settings(flask_login.current_user.id)['OBJECTS_PER_PAGE']
            else:
                set_user_settings(flask_login.current_user.id, {'OBJECTS_PER_PAGE': limit})
        try:
            offset = int(flask.request.args.get('offset', ))
        except ValueError:
            offset = None
        else:
            if (offset < 0):
                offset = None
            elif (offset > 100000000):
                offset = 100000000
        if ((limit is not None) and (offset is None)):
            offset = 0
        sorting_order_name = flask.request.args.get('order', None)
        if (sorting_order_name == 'asc'):
            sorting_order = object_sorting.ascending
        elif (sorting_order_name == 'desc'):
            sorting_order = object_sorting.descending
        else:
            sorting_order = None
        sorting_property_name = flask.request.args.get('sortby', None)
        if (sorting_order is None):
            if (sorting_property_name is None):
                sorting_order_name = 'desc'
                sorting_order = object_sorting.descending
            else:
                sorting_order_name = 'asc'
                sorting_order = object_sorting.ascending
        if (sorting_property_name is None):
            sorting_property_name = '_object_id'
        else:
            name_only = False
        if (sorting_property_name == '_object_id'):
            sorting_property = object_sorting.object_id()
        elif (sorting_property_name == '_creation_date'):
            sorting_property = object_sorting.creation_date()
        elif (sorting_property_name == '_last_modification_date'):
            sorting_property = object_sorting.last_modification_date()
        else:
            sorting_property = object_sorting.property_value(sorting_property_name)
        sorting_function = sorting_order(sorting_property)
        query_string = flask.request.args.get('q', )
        if query_string:
            name_only = False
        search_tree = None
        use_advanced_search = (flask.request.args.get('advanced', None) is not None)
        must_use_advanced_search = use_advanced_search
        advanced_search_had_error = False
        additional_search_notes = []
        if ((not use_advanced_search) and query_string):
            if (user_id is None):
                users = get_users_by_name(query_string)
                if (len(users) == 1):
                    user = users[0]
                    user_id = user.id
                    query_string = 
                elif (len(users) > 1):
                    additional_search_notes.append(('error', 'There are multiple users with this name.', 0, 0))
            if ((doi is None) and query_string.startswith('doi:')):
                try:
                    doi = logic.publications.simplify_doi(query_string)
                    query_string = 
                except logic.errors.InvalidDOIError:
                    pass
        try:
            (filter_func, search_tree, use_advanced_search) = generate_filter_func(query_string, use_advanced_search)
        except Exception:
            if use_advanced_search:
                advanced_search_had_error = True

                def filter_func(data, search_notes):
                    ' Return all objects'
                    search_notes.append(('error', 'Unable to parse search expression', 0, len(query_string)))
                    return False
            else:
                raise
        (filter_func, search_notes) = wrap_filter_func(filter_func)
        search_notes.extend(additional_search_notes)
        if ((user_id is None) or (user_permissions is not None)):
            object_ids_for_user = None
        else:
            object_ids_for_user = user_log.get_user_related_object_ids(user_id)
        if (doi is None):
            object_ids_for_doi = None
        else:
            object_ids_for_doi = logic.publications.get_object_ids_linked_to_doi(doi)
        if (use_advanced_search and (not must_use_advanced_search)):
            search_notes.append(('info', _('The advanced search was used automatically. Search for "%(query_string)s" to use the simple search.', query_string=query_string), 0, 0))
        try:
            object_ids = None
            if (object_ids_at_location is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_at_location)
            if (object_ids_for_user is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_for_user)
            if (object_ids_for_doi is not None):
                if (object_ids is None):
                    object_ids = set()
                object_ids = object_ids.union(object_ids_for_doi)
            if (object_ids is not None):
                pagination_enabled = False
                limit = None
                offset = None
            if ((object_ids is not None) and (not object_ids)):
                objects = []
                num_objects_found = 0
            else:
                num_objects_found_list = []
                objects = get_objects_with_permissions(user_id=flask_login.current_user.id, permissions=Permissions.READ, filter_func=filter_func, sorting_func=sorting_function, limit=limit, offset=offset, action_id=action_id, action_type_id=(action_type.id if (action_type is not None) else None), other_user_id=user_id, other_user_permissions=user_permissions, project_id=project_id, project_permissions=project_permissions, group_id=group_id, group_permissions=group_permissions, object_ids=object_ids, num_objects_found=num_objects_found_list, name_only=name_only)
                num_objects_found = num_objects_found_list[0]
        except Exception as e:
            search_notes.append(('error', 'Error during search: {}'.format(e), 0, 0))
            objects = []
            num_objects_found = 0
        if any(((note[0] == 'error') for note in search_notes)):
            objects = []
            advanced_search_had_error = True
    cached_actions = {}
    cached_users = {}
    for (i, obj) in enumerate(objects):
        if (obj.version_id == 0):
            original_object = obj
        else:
            original_object = get_object(object_id=obj.object_id, version_id=0)
        if (obj.action_id not in cached_actions):
            cached_actions[obj.action_id] = get_action(obj.action_id)
        if (obj.user_id not in cached_users):
            cached_users[obj.user_id] = get_user(obj.user_id)
        if (original_object.user_id not in cached_users):
            cached_users[original_object.user_id] = get_user(original_object.user_id)
        objects[i] = {'object_id': obj.object_id, 'created_by': cached_users[original_object.user_id], 'created_at': original_object.utc_datetime, 'modified_by': cached_users[obj.user_id], 'last_modified_at': obj.utc_datetime, 'data': obj.data, 'schema': obj.schema, 'action': cached_actions[obj.action_id], 'display_properties': {}}
        for property_name in display_properties:
            if ((property_name not in objects[i]['data']) or ('_type' not in objects[i]['data'][property_name]) or (property_name not in objects[i]['schema']['properties'])):
                objects[i]['display_properties'][property_name] = None
                continue
            objects[i]['display_properties'][property_name] = (objects[i]['data'][property_name], objects[i]['schema']['properties'][property_name])
    if (action_id is None):
        show_action = True
    else:
        show_action = False

    def build_modified_url(**kwargs):
        return flask.url_for('.objects', **{k: v for (k, v) in flask.request.args.items() if (k not in kwargs)}, **kwargs)
    action_ids = {object['action'].id for object in objects}
    action_translations = {}
    for id in action_ids:
        action_translations[id] = logic.action_translations.get_action_translation_for_action_in_language(action_id=id, language_id=user_language_id, use_fallback=True)
    return flask.render_template('objects/objects.html', objects=objects, display_properties=display_properties, display_property_titles=display_property_titles, search_query=query_string, action=action, action_translations=action_translations, action_id=action_id, action_type=action_type, project=project, project_id=project_id, group=group, group_id=group_id, location_id=location_id, location=location, user_id=user_id, user=user, doi=doi, get_object_if_current_user_has_read_permissions=get_object_if_current_user_has_read_permissions, get_instrument_translation_for_instrument_in_language=logic.instrument_translations.get_instrument_translation_for_instrument_in_language, build_modified_url=build_modified_url, sorting_property=sorting_property_name, sorting_order=sorting_order_name, limit=limit, offset=offset, pagination_enabled=pagination_enabled, num_objects_found=num_objects_found, show_action=show_action, use_advanced_search=use_advanced_search, must_use_advanced_search=must_use_advanced_search, advanced_search_had_error=advanced_search_had_error, search_notes=search_notes, search_tree=search_tree)