- From: Henry Story <henry.story@bblfish.net>
- Date: Tue, 10 Apr 2012 15:54:46 +0200
- To: Alexandre Bertails <bertails@w3.org>
- Cc: Read-Write-Web <public-rww@w3.org>
On 9 Apr 2012, at 15:12, Alexandre Bertails wrote:
> Hi Henry,
>
> On 04/08/2012 06:20 PM, Henry Story wrote:
>> Hi,
>>
>> As I understand POSTing a resource to a Collection should create a new resource.
>> We want to allow collections to be POST only so that unknown people can post into
>> a collection without seeing the other resource in it. (whilst perhaps allowing the
>> POSTer to edit the resources he created in that collection). We would like the owner
>> of the collection to be able to know what is in the collection: so that he can for
>> example find the new resources POSTed there.
>>
>> So some user should be able to
>>
>> POST /collection/ HTTP/1.1
>>
>> thereby having the read-write-web server create the resource
>>
>> /collection/r42
>>
>> which he could later edit in case he made a mistake. But he would not be
>> albe to find the elements of the collection by doing a
>>
>> GET /collection/
>
> There is no perfect solution for handling collections. I kind of like
> Sandro's idea [1]. Also, this is a place where using the WebDav verbs
> (eg. MKCOL) should be considered IMO. But this could be a problem in
> the browser.
Thanks. I added file creation to a collection with the last patch
https://dvcs.w3.org/hg/read-write-web/rev/5cf67ba5c0d4
in particular
https://dvcs.w3.org/hg/read-write-web/file/5cf67ba5c0d4/src/main/scala/ReadWriteWeb.scala#l115
I'll try to do directory listings next, and also read up more closely on the
other comments on the list....
> Alexandre.
>
> [1] http://www.w3.org/2001/sw/wiki/REST#Creating_Collections
>
>>
>> as that would be protected. He certainly could not edit what ends up being the
>> equivalent of /collection/index{.rdf} since he does not have access to that
>> file. It must therefore be up to the ReadWriteWeb server to do three things:
>>
>> 1. create a name for the POSTed resource
>> 2. update/display the collection (sioc:Collection?) index retrieved when
>> doing a GET /collection/
>> 3. Only show a subset of those elements of the collection that an agent
>> has read access to
>>
>> I think the scala read-write-web does not have POST on a collection (a directory
>> in unix terminology) create a new file currently. (It has a POST of a SPARQL update
>> on an rdf information resource change it.)
>>
>> Does that sound right?
>>
>> Henry
>>
>>
>> Social Web Architect
>> http://bblfish.net/
>>
>>
>
Social Web Architect
http://bblfish.net/
Received on Tuesday, 10 April 2012 13:56:05 UTC