On 2.11.11 16:07, Felix Meschberger wrote:
Hi,
Thanks Thomas and Michael for documenting your JSOP use.
I have one comment:
+ DIFFS ::= (ADD | SET | REMOVE | MOVE)*
+ ADD ::= "+" STRING ":" (OBJECT | ATOM)
+ SET ::= "^" STRING ":" ATOM
+ REMOVE ::= "-" STRING
I see there is ADD support for properties but no REMOVE support. I think ADD
support is not needed, because SET does it all. This not only makes the syntax
cleaner but also its use.
If we keep ADD support for properties, we would -- for symmetry reasons -- have
to add REMOVE support for properties. But this is not possible (since
properties and nodes can have the same name). But then REMOVE support for
properties would not help anything, since setting a property to null is the
same.
I look at this from the perspective of converting a JSOP document (or string or
text or file or HTTP request) into a series of JCR API calls. In such a
scenario, I would have easy support for SET and REMOVE but would have two
issues for supporting ADD:
(1) I would have to inspect the argument to ADD to find out whether it is an
addNode or setProperty call
(2) I would have to handle SET and ADD-for-property with the same setProperty
call
The intended use is not only for HTTP calls but rather also for HTTP
replies. In the case of a HTTP reply carrying a change log, how would
you distinguish setProperty from adProperty? I.e. generate the correct
JCR observation events from that change log?
Michael