anchor.diff:  %% @doc Determine whether or not the resource exists.
   %%      This resource exists if the bucket is known or the object
   %%      was successfully fetched from Riak.
  +resource_exists(ReqData, Context=#ctx{key=schema}) ->
  +    %% schema-creation request, always exists.
  +    {true, ReqData, Context};
   resource_exists(ReqData, Context=#ctx{key=container}) ->
       %% bucket existence was tested in is_authorized
       {true, ReqData, Context};
  
positive.code: %%      whether the write request violates the write mask of the
  %%      bucket.  For a bucket GET, check to see whether the keys of
  %%      the bucket are listable.
  forbidden(ReqData, Context=#ctx{bucket=Bucket,key=container}) ->
      case wrq:method(ReqData) of
          'POST' -> object_forbidden(ReqData, Context);
          _      -> {not Bucket:bucket_listable(), ReqData, Context}
      end;
  forbidden(ReqData, Context) ->
      case lists:member(wrq:method(ReqData), ['POST', 'PUT']) of
  
negative.code: %%         {boolean(), webmachine:wrq(), context()}
  %% @doc Determine whether an object write violates the write mask of
  %%      the bucket.
  object_forbidden(ReqData, Context=#ctx{jiak_context=JC,module=Mod}) ->
      {Diffs, NewContext0} = diff_objects(ReqData, Context),
      NewContext = NewContext0#ctx{jiak_context=JC:set_diff(Diffs)},
      Permitted = check_write_mask(Mod, Diffs),    
      case Permitted of
          false ->
              {true,
  