EditingData
Editing Linked Data in The Web
(This article needs elaboration, and external links)
The ability to edit RDF graphs in the web is very important. It allows individual participation, and allows "crowd-sourcing" of data collection and data review.
Therefore it is good to build interfaces which allow users who can correct or add to a a collection of data the ability to do so intuitively.
* Read-Write Linked Data Design Issues article defining the protocol
Clients: Editors
Tabulator
The Tabulator Firefox extension allows the user to directly edit data in the web. This is under development (as of 2008). It operates using either SPARQL/Update (SPARUL) or WebDAV protocols.
(Watch this space for more editors)
Servers supporting SPARQL Update
In this protocol, when the client changes a triple then a SPARQL/Update message is sent to the server by HTTP POST to the URI of the document being edited.
A server indicates that it accepts this form of editing for a resource by including a
MS-Author-via: SPARQL
header in the response to any GET or HEAD request for the document.
(SPARQL Update is still being standardised so implementations vary. However, the subset used by this form of editing may be a common subset of the languages, and so fairly stable.)
Algae
It is also supported by a system constructed from the EricP's Algae platform connected to Apache using php glue
ARC2
This is supported by ARC2 from Semsol, I understand. ARC2 is a PHP-based semantic web toolkit.
OpenLink Virtuoso
Virtuoso from OpenLink Software includes SPARQL/Update support.
Currently (Nov 2008), a rewrite rule for GET patterns is necessary to make Virtuoso offer the
MS-Author-via: SPARQL
header, to aid user agents that seek to deductively determine ability to read-write
against target information resources, but editing through SPARUL is possible with or without this rule.
(see below for an illustration of the rewrite rule control interface)
SWOBJECTS
This is an open source project on sourceforge, a C++ program ported to various environments. Eric Pru d'hommeaux is the lead developer.
See the Sourceforge Wiki page for source.
On a Mac, to edit a file in place:
$ /Applications/Sparql.app/Contents/MacOS/sparql -i db.trig --serve http://localhost:8073/SPARQL $ open http://localhost:8073/
Coming soon: running SWOBJECTS as an Apache module.
wiki.ontologi.es
Supports authoring via SPARQL and DAV. Written in Perl; source code to be released at some point soon under GPL2+/Artistic.
Servers based on WebDAV
The Web Distributed Authoring and Versioning protocol extends HTTP, allowing web documents to be updated, deleted, etc. It works then by a client, when it changes data in a page, writing back the whole page. This obviously can be slower for large pages.
MS-Author-via: DAV
WebDAV is implemented in many web servers.
Apache
In Apache, typically the configuration for the page must be adjusted by making a .htaccess file, in the same directory as the file to be edited
<Files ~ ".*\.rdf"> Header set MS-Author-Via DAV ForceType application/rdf+xml <Limit GET HEAD OPTIONS> Allow from all </Limit> <LimitExcept GET HEAD OPTIONS> Require user alice </LimitExcept> </Files>
Which means, "For files which end in .rdf, send the MS-Author-Via DAV header and
a content-type header application/rdf+xml.
Allow anyone to read them but only alice to write them."
Salt to taste.
You may need your Apache administrator to do things like
- Add in the Webdav module support in Apache
- Allow users to set up their own .htaccess files
but if they are cool they will have already. If not, they might want to set these things up for you themselves.
OpenLink Virtuoso
Virtuoso from OpenLink Software also includes WebDAV support.
Again currently (Nov 2008), a rewrite rule for GET patterns is necessary to make Virtuoso offer the
MS-Author-via: DAV
header, to aid user agents that seek to deductively determine ability to read-write
against target information resources, but editing through WebDAV is possible with or without this rule.
(an updated MoinMoin may be needed, as the complex markup in [1] doesn't work -- I couldn't spec alt text nor image size.)
wiki.ontologi.es
Supports authoring via SPARQL and DAV. Written in Perl; source code to be released at some point soon under GPL2+/Artistic.
Notes
- Obviously in either of these cases, the file is rewritten, so its comments are lost, and any special ordering a human author was used to will be lost.
- It is of course wise for a server, in either case, to keep a complete history of all changes, ideally with a source code management system which allows a regression to a previous version in the event of a major mistake or spam attack.
- The privacy policy of the logs should be decided and made clear.
- In some cases, data is left open for anyone to write, such as a data wiki. However, in many cases these techniques should have some access control system. This is outside the scope of this page.
- The protocols above do not support it, but extension to allow pub/sub notification of changes would allow user interfaces to change the moment. The work demonstrated by Lee Feigenbaum et al. does this.
An infrastructure with access-controlled editable data is a powerful platform on which to develop collaborative applications.