Skip to content

Instantly share code, notes, and snippets.

@betehess
Last active December 23, 2015 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betehess/6713876 to your computer and use it in GitHub Desktop.
Save betehess/6713876 to your computer and use it in GitHub Desktop.
Flushing ideas for an LDP PATCH proposal
# TimBL's removes his certificate informations
AT ca:i / cert:key DELETE .
# TimBL removes the certificate exponent from his certificate
AT ca:i / cert:key / cert:exponent DELETE .
# TimBL update his certificate informations
AT ca:i / cert:key UPDATE [
rdf:type cert:RSAPublicKey;
cert:exponent 65537;
cert:modulus "12345"^^xsd:hexBinary ] .
# TimBL udpate the certificate exponent in his certificate
AT ca:i / cert:key / cert:exponent UPDATE 12345 .
# TimBL adds information to his certificate
AT ca:i / cert:foo INSERT ldp:$ cert:bar "bar" .
# TimBL adds new information in his profile
INSERT <s> <p1> <o1>, <p2> "o2" .
# example with path restriction
AT con:office / con:address [ ldp:$ / con:country MATCH "USA" ] / con:country UPDATE "UK"
patch ::= delete | update | insert
delete ::= "DELETE" turtleTriples | "AT" path "DELETE" pointedGraph?.
path ::= turtleSubject (followPredicate | "[" restriction "]" )+
followPredicate ::= "/" turtlePredicate
restriction ::= path "MATCH" pointedGraph
update ::= "AT" path "UPDATE" pointedGraph .
pointedGraph ::= turtleObject | turtleTriples
insert ::= "INSERT" turtleTriples | path INSERT pointedGraph .
ldp:$ is used denote the current captured node in a path. It can be
used to restrict a path, or as the pointer for a pointed graph (insert
and update).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment