1. Bookmarks
1.1. Inserting a bookmark
This adds a tag as well as inserting a bookmark. If you don't want to add a tag, just omit the lines which begin with nao:hasTag:
INSERT { <urn:uuid:2094738855> a nfo:Bookmark ; nie:title 'Git for GNOME developers - Gnome Live!' ; nie:contentCreated '2008-04-12T14:17:54' ; nao:hasTag [a nao:Tag; nao:prefLabel 'tutorial'] ; nao:hasTag [a nao:Tag; nao:prefLabel 'git'] ; nfo:bookmarks <http://live.gnome.org/GitForGnomeDevelopers> . }
This example uses a blank node. That means the <urn:uuid:2094738855> is created automatically for you. This can be done if you don't want to refer to the URN again later.
INSERT { [ a nfo:Bookmark; nie:title 'Blank node insert bookmark!' ; nie:contentCreated '2008-04-12T14:17:54'; nao:hasTag [a nao:Tag; nao:prefLabel 'tutorial'] ; nao:hasTag [a nao:Tag; nao:prefLabel 'git'] ; nfo:bookmarks <http://live.gnome.org/GitForGnomeDevelopers> ] . }
To list those blank nodes by title, date and uri:
SELECT ?title ?date ?entry WHERE { ?entry a nfo:Bookmark ; nie:title ?title ; nie:contentCreated ?date . } ORDER BY ?date
1.2. Edit a bookmark
To change a bookmark title, you can use:
INSERT { <urn:uuid:2094738855> a nfo:Bookmark; nie:title 'BZR for GNOME developers - Gnome Live!'. }
You can then check the other properties of the bookmark are still intact using:
SELECT ?title ?date ?linkurl ?entry WHERE { ?entry a nfo:Bookmark ; nie:title ?title ; nfo:bookmarks ?linkurl ; nie:contentCreated ?date . } ORDER BY ?date