19.1.5.DAV and RDF Metadata

When a Virtuoso server has a URIQA default host setting, it will make metadata extracted from DAV resources available for querying via SPARQL. All metadata for public readable DAV resources are stored in a system graph. The graph IRI is composed from the DAV path of the resource and the URIQA default host name.

see DefaultHost in the URIQA section of the virtuoso.ini file, described in the URIQA section of the documentation for details on configuration.

The automatic maintenance of the SPARQL queryable metadata can be disabled and enable using the function DB.DBA.DAV_REPLICATE_ALL_TO_RDF_QUAD. An argument of 1 enables this and a 0 disables this. The setting stays in effect until it is changed with the same function. For new database, the feature is on by default. Old databases are by default upgraded to have a SPARQL queryable DAV metadata graph upon startup if the URIQA default host name is defined.

If the URIQA default host name changes, the RDF graph can be updated by simply re-enabling the feature. This will adjust the graph and resource IRI's.

If the URIQA default name of the host is example.com, then, the graph will be http://example.com/DAV .

The IRI's of DAV resources will be like http://example.com/DAV/docsrc/XMLDOM.xml , meaning that these are directly usable from a user agent for accessing the resource.

SQL> sparql select ?s ?o from <http://example.com/DAV> where {?s <http://www.openlinksw.com/schemas/DAV#ownerUser> ?o};
s                                                                                 o
VARCHAR                                                                           VARCHAR
_______________________________________________________________________________

http://example.com/DAV/docsrc/2pc.xml                                          mailto:somebody@example.domain
http://example.com/DAV/docsrc/Virtdocs.spp                                     mailto:somebody@example.domain

SQL> sparql select ?p ?o from <http://example.com/DAV> where {<http://example.com/DAV/docsrc/2pc.xml> ?p ?o};
p                                                                                 o
VARCHAR                                                                           VARCHAR
_______________________________________________________________________________

http://purl.org/dc/terms/created                                                  2006-05-23 15:10:32
http://purl.org/dc/terms/modified                                                 2006-05-23 15:10:32
http://www.openlinksw.com/schemas/DAV#ownerUser                                   mailto:somebody@example.domain
http://purl.org/dc/terms/extent                                                   7850

The examples above show how simple SPARQL queries can be used to retrieve information about DAV resources.

The properties supported for all public readable resources are:

http://purl.org/dc/terms/created - The creation date as SQL datetime.

http://purl.org/dc/terms/modified - Modification time as SQL datetime.

http://www.openlinksw.com/schemas/DAV#ownerUser - The contents of u_e_mail in sys_users for the SQL account owning the resource. This has the protocol prefix mailto:, as in mailto:somebody@example.com.

http://purl.org/dc/terms/extent The size of the resource in bytes as a SQL integer.

http://www.openlinksw.com/schemas/DAV#tag - There is one triple for each public tag of the DAV resource. The value is the string of the tag as a SQL string.

http://www.w3.org/1999/02/22-rdf-syntax-ns#type - The RDF schema for MIME-type of of the DAV resource. If the resource is not recognized as one of the below, this predicate will be omitted.

Table19.2.RDF Schema by MIME-type

MIME- ype RDF Schema
application/bpel+xml http://www.openlinksw.com/schemas/WSDL#
application/doap+rdf http://www.openlinksw.com/schemas/doap#
application/foaf+xml http://xmlns.com/foaf/0.1/
application/google-kinds+xml http://www.openlinksw.com/schemas/google-kinds#
application/license http://www.openlinksw.com/schemas/OplLic#
application/mods+xml http://www.openlinksw.com/schemas/MODS#
application/msexcel http://www.openlinksw.com/schemas/Office#
application/mspowerpoint http://www.openlinksw.com/schemas/Office#
application/msproject http://www.openlinksw.com/schemas/Office#
application/msword http://www.openlinksw.com/schemas/Office#
application/msword+xml http://www.openlinksw.com/schemas/Office#
application/opml+xml http://www.openlinksw.com/schemas/OPML#
application/pdf http://www.openlinksw.com/schemas/Office#
application/rdf+xml http://www.openlinksw.com/schemas/RDF#
application/rss+xml http://purl.org/rss/1.0/
application/wsdl+xml http://www.openlinksw.com/schemas/WSDL#
application/x-openlink-image http://www.openlinksw.com/schemas/Image#
application/x-openlink-photo http://www.openlinksw.com/schemas/Photo#
application/x-openlinksw-vad http://www.openlinksw.com/schemas/VAD#
application/x-openlinksw-vsp http://www.openlinksw.com/schemas/VSPX#
application/x-openlinksw-vspx+xml http://www.openlinksw.com/schemas/VSPX#
application/xbel+xml http://www.python.org/topics/xml/xbel
application/xbrl+xml http://www.openlinksw.com/schemas/xbrl#
application/xddl+xml http://www.openlinksw.com/schemas/XDDL#
application/zip http://www.openlinksw.com/schemas/Archive#
text/directory http://www.w3.org/2001/vcard-rdf/3.0#
text/eml http://www.openlinksw.com/schemas/Email#
text/html http://www.openlinksw.com/schemas/XHTML#
text/wiki http://www.openlinksw.com/schemas/Wiki#

Additional predicates may exist as a result of resource type specific metadata extraction.