anchor.diff:      object/3,
       objects/2,
       filter_subject/2,
  +    ensure_resource/2,
       ensure_resource/3,
  +    ensure_resource_edges/4,
       lookup_triple/2,
       to_triples/2
   ]).
  
positive.code:             {error, eacces}
      end.
  
  
  %% @doc Fetch a RDF resource
  rsc(Uri, Context) ->
  
negative.code:     m_rsc:rid(Uri, Context);
  find_resource(Uri, Context) ->
      m_rsc:uri_lookup(Uri, Context).
  
  %% @doc Ensure RDF resource or URI is a non-authoritative (pointer) resource in
  %%      Zotonic.
  ensure_resource(#rdf_resource{id = Uri} = Rdf, Context) ->
      Props = rdf_to_rsc_props(Rdf),
      ensure_resource(Uri, Props, Context);
  ensure_resource(Uri, Context) when is_binary(Uri) ->
      ensure_resource(Uri, [], Context).
  
  %% @doc Ensure URI or Id is a resource in Zotonic and update an existing resource
  -spec ensure_resource(string(), list(), #context{}) -> integer() | {error, term()}.
  