Interdiction of a symbol a point In the identifier

5 views
Skip to first unread message

Алексей

unread,
Jan 21, 2011, 4:26:18 AM1/21/11
to lily-discuss
Hi

I try to load filesystem tree in lily repository.

As identifier I try to use filesystem path.
For example:
USER./json/createrecord

All works correctly, but when i try to save file with name, that
contain point
lily inform me, that identifier cannot contain point:

curl -XPOST 195.222.149.147:8888/repository/record/ -H 'Content-Type:
application/json' -d '{
"action":"create",
"record":{
"type":{
"name":"ns1$Container",
"version":8
},
"fields":{
"ns1$name":"/"
},
"id":"home/kaf.new",
"namespaces":
{"dav.nevod.ru":"ns1","org.lilyproject.vtag":"ns2"
}
}
}' -D -
HTTP/1.1 500 Server Error
Content-Type: application/json; charset=UTF-8
Date: Fri, 21 Jan 2011 10:15:20 GMT
Accept-Ranges: bytes
Server: Restlet-Framework/2.1snapshot
Content-Length: 8303

{"status":500,"description":"Reserved record id character (one of: . ;
=) in \"home/kaf.new\".","causes":[...


Qestion:
Why I cannot use symbol . (point) in identifier.
I see, that point is used after USER.
But why point cannot appeared second times in identifier?

Bruno Dumon

unread,
Jan 25, 2011, 4:14:57 AM1/25/11
to lily-d...@googlegroups.com
Hi,

The point symbol does have a special meaning even after "USER.": it is used to separate the base record ID from its 'variant properties'. The full format of the string representation of a record ID is:

{record id type}.{master record id}.varprop1=value1;varprop2=value2

See also the javadoc of RecordId.toString().

Now, it is probably a needless limitation to disallow the point symbol, we could simply provide some escape syntax. I will create a ticket for this.
--
Bruno Dumon
Outerthought
http://outerthought.org/

Алексей

unread,
Jan 26, 2011, 1:10:39 AM1/26/11
to lily-discuss
Hi

>
> Now, it is probably a needless limitation to disallow the point symbol, we
> could simply provide some escape syntax. I will create a ticket for this.
>
OK
Reply all
Reply to author
Forward
0 new messages