Enabling Dynamic Extended Types (DETs) on a Virtuoso SPARQL Endpoint
Conventional SPARQL endpoints serialize query results into a range of formats, which are immediately sent back to the requesting user agent.
Using SPARQL-Protocol URLs to share result sets is powerful, but this is not always feasible, especially because some data access tools are written to only load data from files.
Virtuoso addresses the obvious need for file-based access to SPARQL query result sets via its built-in "dynamic WebDAV resource generator," a feature that leverages the Virtuoso server's native support of the WebDAV protocol.
Through this feature, it is possible to connect any WebDAV client, which include most desktop operating systems (Windows, Mac OS X, Linux) and many other applications (e.g., Excel), directly to a SPARQL query result set as though it were opening up a local file.
The steps below show how to set up a Virtuoso instance to permit saving query results from its SPARQL endpoint into its built-in WebDAV repository.
Note: SPARQL-SSL is alias of SPARQL-WebID?
- Make sure the steps from the Secure SPARQL Endpoint Guide using WebID Protocol are performed.
- As result should be created new account "SPUIDN", where N is 1, 2, etc.
- Note: for the purposes of this guide, we will use SPUID1 name for the SQL user account under which runs the Web Service endpoint.
- Set the SQL user account to be DAV enabled:
- Via direct table config
- Using the Conductor UI
- The DAV home directory (for e.g., /DAV/home/SPUID1/) should be created and the path to it should be set in the table: DB.DBA.SYS_USERS (using U_HOME field).
Note: do not forget the leading and the trailing slash chars:
- Using Conductor, go to System Admin -> User Accounts
- For the SQL User from above click the "Edit" link from the very right column.
- Set "DAV Home Path" to "/DAV/home/SPUID1/"
- Hatch "Create"
- Click "Save".
- The home directory should contain a subdirectory named "saved-sparql-results"
- Using Conductor, go to Web Application Server -> Content Management and view path "DAV/home/SPUID1":
- Click "New Folder"
- In the shown form enter for "Folder name": saved-sparql-results
- Click "Create"
- Note: the subdirectory should be of "DynaRes?" for DAV Extension Type.
- Make sure sparql-webid virtual folder is defined for the ssl port:
- Go to Conductor -> Web Application Server ->Virtual Domains & Directories
- Locate the sparql-webid virtual folder.
If not found, click "New directory"
- Select "Type": SPARQL access point and click "Next":
- In the presented form enter respectively:
- Path: /sparql-webid
- Hatch "Physical path is a WebDAV repository"
- Hatch "Map the logical path to a single page"
- Physical path: /!sparql/
- VSP User: dba
- Authentication Method: SSL
- Authentication Function: DB.DBA.FOAF_SSL_AUTH
- Note: cname appearances of "." should be replaced with "_", so for ex for host "id.myopenlink.net" the advanced option value should be:
- Once the steps from above have been completed, your SPARQL endpoint will include additional controls for saving query results to dynamically constructed WebDAV resources:
- Go to the SPARQL+WebID? endpoint,
<cname>:<port> are replaced by your local server values.
- Select the user's certificate:
- The SPARQL Query UI will be shown: