anchor.diff:          {ok, RDF} -> RDF
       end,
       {ok, [
  -        {<<"id">>, FileId},
  -        {<<"filePublic">>, FileId},
  +        {<<"id">>, AssocId},
  +        {<<"file">>, AssocId},
           {<<"basic">>, BasicVal},
           {<<"json">>, JSONVal},
           {<<"rdf">>, RDFVal}
  -    ]}.+    ]}.
  +
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% {@link data_backend_behaviour} callback find_all/1.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec find_all(ResourceType :: binary()) ->
  +    {ok, [proplists:proplist()]} | gui_error:error_result().
  +find_all(_) ->
  +    gui_error:report_error(<<"Not iplemented">>).
  +
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% {@link data_backend_behaviour} callback find_query/2.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec find_query(ResourceType :: binary(), Data :: proplists:proplist()) ->
  +    {ok, proplists:proplist()} | gui_error:error_result().
  +find_query(_, _Data) ->
  +    gui_error:report_error(<<"Not implemented">>).
  +
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% {@link data_backend_behaviour} callback create_record/2.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec create_record(RsrcType :: binary(), Data :: proplists:proplist()) ->
  +    {ok, proplists:proplist()} | gui_error:error_result().
  +create_record(_, _Data) ->
  +    gui_error:report_error(<<"Not implemented">>).
  +
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% {@link data_backend_behaviour} callback update_record/3.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec update_record(RsrcType :: binary(), Id :: binary(),
  +    Data :: proplists:proplist()) ->
  +    ok | gui_error:error_result().
  +update_record(_, _Id, _Data) ->
  +    gui_error:report_error(<<"Not implemented">>).
  +
  +
  +%%--------------------------------------------------------------------
  +%% @doc
  +%% {@link data_backend_behaviour} callback delete_record/2.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec delete_record(RsrcType :: binary(), Id :: binary()) ->
  +    ok | gui_error:error_result().
  +delete_record(_, _Id) ->
  +    gui_error:report_error(<<"Not implemented">>).
  +
  +
  +%%%===================================================================
  +%%% Internal functions
  +%%%===================================================================
  +
  +%%--------------------------------------------------------------------
  +%% @private
  +%% @doc
  +%% Returns the UUID of parent of given file. This is needed because
  +%% spaces dir has two different UUIDs, should be removed when this is fixed.
  +%% @end
  +%%--------------------------------------------------------------------
  +-spec get_parent(SessionId :: binary(), FileGUID :: binary()) -> binary().
  +get_parent(SessionId, FileGUID) ->
  +    {ok, ParentGUID} = logical_file_manager:get_parent(SessionId, {guid, FileGUID}),
  +    ParentGUID.
positive.code:                 size = SizeAttr,
                  mtime = ModificationTime,
                  mode = PermissionsAttr,
                  provider_id = ProviderId
              } = FileAttr,
  
              % Resolve parent guid of this file
              {ok, ParentGUID} = logical_file_manager:get_parent(
                  SessionId, {guid, FileId}
              ),
              % If the parent guid is the same as file id, it means that it is
              % the root file of the share -> tell ember there is no parent.
              Parent = case ParentGUID of
                  FileId -> null;
                  GUID -> GUID
              end,
              {Type, Size} = case TypeAttr of
                  ?DIRECTORY_TYPE -> {<<"dir">>, null};
                  _ -> {<<"file">>, SizeAttr}
  
negative.code: -export([init/0, terminate/0]).
  -export([find/2, find_all/1, find_query/2]).
  -export([create_record/2, update_record/3, delete_record/2]).
  
  %%%===================================================================
  %%% API functions
  