anchor.diff:  %% @doc Handle POST/PUT requests.  This is where the actual Riak-put
   %%      happens, as well as where the bucket's check_write,
   %%      effect_write, and after_write functions are called.
  +handle_incoming(ReqData, Context=#ctx{key=schema, 
  +                                      bucket=Bucket,
  +                                      incoming=Incoming}) ->
  +    {struct, SchemaPL} = Incoming,
  +    SchemaProps = [{list_to_atom(binary_to_list(K)),V} || {K,V} <- SchemaPL],
  +    ok = riak_bucket:set_bucket(Bucket, SchemaProps),
  +    {<<>>, ReqData, Context};
   handle_incoming(ReqData, Context=#ctx{bucket=Bucket,key=Key,
                                         jiak_context=JCTX,jiak_name=JiakName,
                                         jiak_client=JiakClient,
  -                                      incoming=JiakObject0})->
  +                                      incoming=JiakObject0,
  +                                      module=Mod})->
       {PutType, NewRD, ObjId} =
           case Key of
               container -> % POST to bucket has its fresh id in Path
  
positive.code: %%                       read_mask |
  %%                       write_mask
  %% @doc Get the schema for the bucket.
  full_schema(Bucket) ->
      [{allowed_fields, Bucket:allowed_fields()},
       {required_fields, Bucket:required_fields()},
       {read_mask, Bucket:read_mask()},
       {write_mask, Bucket:write_mask()}].
  
  %% @spec make_uri(string(), riak_object:bucket(), string()) -> string()
  %% @doc Get the string-path for the bucket and subpath under jiak.
  
negative.code: %%      resource.  Should be HEAD/GET/POST for buckets and
  %%      HEAD/GET/POST/PUT/DELETE for objects.
  %%      Exception: HEAD/GET is returned for an "unknown" bucket.
  allowed_methods(RD, Ctx0=#ctx{module=Mod}) ->
      Key = case Ctx0#ctx.key of
                container -> container;
                schema -> schema;
                _         -> list_to_binary(wrq:path_info(key, RD))
            end,
      case bucket_from_uri(RD) of
          {ok, Bucket} ->
              {ok, JC} = Mod:init(Key, jiak_context:new(not_diffed_yet, [])),
              Ctx = Ctx0#ctx{bucket=Bucket, key=Key, jiak_context=JC},
              case Key of
                  container ->
                      %% buckets have GET for list_keys, POST for create
                      {['HEAD', 'GET', 'POST'], RD, Ctx};
                  schema ->
                      {['PUT'], RD, Ctx};
                  _ ->
                      %% keys have the "full" doc store set
                      {['HEAD', 'GET', 'POST', 'PUT', 'DELETE'], RD, Ctx}
              end;
          {error, no_such_bucket} ->
              %% no bucket, nothing but GET/HEAD allowed, and POST for 
              %% schema mods
              {['HEAD', 'GET', 'PUT'], RD, Ctx0#ctx{bucket={error, no_such_bucket}}}
      end.
  
  %% @spec bucket_from_uri(webmachine:wrq()) ->
  