WebDAV supports a special folder type for RDF uploads, called rdf_sink
.
This folder can be used to uploads RDF files from any WebDAV client.
When a new user is created, a new WebDAV folder with name rdf_sink
is automatically created in the user's home directory.
The rdf_sink
folder has two special properties - virt:rdf_graph
and virt:rdf_sponger
.
WebDAV property names are prefixed with virt:
, and these are not shown as resource/collection properties in the ODS Briefcase; they can only be seen in the Conductor.
The properties of other DET folders are prefixed in the same way.
virt:rdf_graph
contains the name of the graph into which triples parsed from the uploaded files will be loaded.
virt:rdf_sponger
holds the upload method.
Setting | Effect |
---|---|
on | The content of every file uploaded to that folder will be added to the RDF store using the Sponger method. |
off | The content of only files with special MIME types will be added to RDF store. |
After the first upload into the folder, a new file is created with a name based on the RDF graph name. This file is dynamic, and contains all uploaded triples.
Resources stored to the rdf_sink
folder don't have any special properties.
A user may see the properties of this folder through the Conductor UI, using the Properties button found to the right of the folder name. That page will include two WebDAV properties, for instance --
virt:rdf_graph
: http://demo.openlinksw.com/DAV/home/demo/rdf_sink
virt:rdf_sponger
: on
Users may change these values as other WebDAV properties.
When a Virtuoso DB is upgraded from a version which lacked the RDF Sink feature, to a version which includes it --
rdf_sink
folder in the home directory of existing users.
rdf_sink
folder is created too.How does it work?
rdf_sink
folder, it is parsed for RDF data, which is then stored in 2 graphs: rdf_sink
folder, containing RDF data from all files stored there; rdf_sink
folder.
Accept:
header, then the parsed content of the file is returned from the private graph in accepted type.
application/rdf+xml
application/foaf+xml
text/rdf+n3
text/rdf+ttl
application/rdf+n3
application/rdf+turtle
application/turtle
application/x-turtle
User demo
uploads an RDF file to the rdf_sink
folder at http://demo.openlinksw.com/ods
:
demo
user's Briefcase instance home page.
TimBLcard.rdf
") to the rdf_sink
folder.
http___demo.openlinksw.com_DAV_home_demo_rdf_sink_.RDF
" DET file is created.
virt:rdf_graph
property for the rdf_sink
folder, i.e., http://demo.openlinksw.com/DAV/home/demo/rdf_sink
.
Suppose there is myfoaf.rdf file with the following content:
<rdf:RDF xmlns="http://www.example/jose/foaf.rdf#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:log="http://www.w3.org/2000/10/swap/log#" xmlns:myfoaf="http://www.example/jose/foaf.rdf#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <foaf:Person rdf:about="http://www.example/jose/foaf.rdf#jose"> <foaf:homepage rdf:resource="http://www.example/jose/"/> <foaf:knows rdf:resource="http://www.example/jose/foaf.rdf#juan"/> <foaf:name>Jose Jimen~ez</foaf:name> <foaf:nick>Jo</foaf:nick> <foaf:workplaceHomepage rdf:resource="http://www.corp.example/"/> </foaf:Person> <foaf:Person rdf:about="http://www.example/jose/foaf.rdf#juan"> <foaf:mbox rdf:resource="mailto:juan@mail.example"/> </foaf:Person> <foaf:Person rdf:about="http://www.example/jose/foaf.rdf#julia"> <foaf:mbox rdf:resource="mailto:julia@mail.example"/> </foaf:Person> <rdf:Description rdf:about="http://www.example/jose/foaf.rdf#kendall"> <foaf:knows rdf:resource="http://www.example/jose/foaf.rdf#edd"/> </rdf:Description> </rdf:RDF>
Now let's upload the myfoaf.rdf
file to destination server demo.openlinksw.com
, for user demo
:
File: myfoaf.rdf Destination Server: demo.openlinksw.com curl -T myfoaf.rdf http://demo.openlinksw.com/DAV/home/demo/rdf_sink/myfoaf.rdf -u demo:demo <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <HTML> <HEAD> <TITLE>201 Created</TITLE> </HEAD> <BODY> <H1>Created</H1> Resource /DAV/home/demo/rdf_sink/ myfoaf.rdf has been created. </BODY> </HTML>