From: Barnhill,
William [USA] [mailto:barnhill_william@bah.com]
Sent: Thursday, February 19, 2009
12:33 PM
To: Drummond Reed; OASIS - XDI TC
Subject: RE: [xdi] new XDI
operation $set ?
Not going to be able to leave in time to make call, so
won't be able to join.
-----Original Message-----
From: Drummond Reed [mailto:drummond.reed@cordance.net]
Sent: Thu 2/19/2009 3:24 PM
To: 'OASIS - XDI TC'
Subject: RE: [xdi] new XDI operation $set ?
Markus, yes, this all makes sense to me, and it seems like a sensible
optimization. Let's discuss on today's call.
=Drummond
_____
From: markus.sabadello@gmail.com [mailto:markus.sabadello@gmail.com]
On
Behalf Of Markus Sabadello
Sent: Friday, February 13, 2009 11:19 PM
To: OASIS - XDI TC
Subject: [xdi] new XDI operation $set ?
Hi,
Sometimes I find myself in situations in which I want to either add or
update a statement in an XDI graph.
E.g. I want to put the following statement into a graph
=markus
+name
"Markus Sabadello"
Today $add and $mod behave like this:
If I use $add, and the statement exists already in the graph, I get an
error.
If I use $mod, and the statement doesn't exist in the graph, I get an error.
Right?
I'd like to have an operation ($set) that always works, i.e. that behaves
like $add if the statement doesn't exists, and like $mod if the statement
exists.
So I could just do
=markus
$set
/
=markus
+name
"Markus Sabadello"
And I wouldn't have to worry if it exists already or not.
Does that make sense?
Markus