Linked Data Deployment DOAP Tutorial

The following tutorial demonstrates deployment of DOAP files as Linked Data.

Prerequisites

In order to be able to produce the steps below, you need to have at least the following packages installed:

Tutorial

  1. Go to ODS, i.e., http://host:port/ods and register user, for ex. john.
  2. Login as user john and go to ODS->Briefcase
  3. Create new instance with checked box "Visible to Public".
  4. Browse path DAV/home/john.
  5. As result there will be shown a new created by the system folder "Public". Place in this folder your DOAP files. For ex. place the attached to this article doap_iODBC.rdf, doap_OAT.rdf, doap_odbc-bench.rdf, doap_odbc-rails.rdf, doap_ODS.rdf, doap_VOS.rdf files.
  6. Upload to the DAV/home/john/Public folder also .ttl, .nt and .rdf files for ex. such as: open source_projects.nt, open_source_projects.ttl, open_source_projects.rdf
  7. Now go to path /DAV/home/john/rdf_sink and click the "Upload" button.
  8. In the shown form perform the following:
    1. Select for "Destination" the "RDF Store" check-box
    2. Enter for "RDF graph name" your graph name, for ex. http://myhost.com/doap.
    3. For "Source": "File" click the "Browse" button and upload either a DOAP file (if you do this, you need to perform the same upload steps for every DOAP file), or upload one rdf file, which contain information for all your DOAP files. In our tutorial such file is the open source_projects.rdf one.
  9. As result there will be created a graph with inserted triples the information retrieved from the uploaded rdf file(s).
  10. Let's check the data in the graph <http://myhost.com/doap>:
    1. Go to the Virtuoso sparql endpoint, i.e. to http://host:port/sparql.
    2. Enter for Default Graph URI your graph, for ex.http://myhost.com/doap
    3. Enter for Query:

      SELECT * WHERE {?s ?p ?o}

    4. Click the "Run Query" button.
    5. As result should be shown the saved triples, for ex.:

      s p o http://myhost.com/DOAP/odbc-rails.rdf#this http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://usefulinc.com/ns/doap#Project http://myhost.com/DOAP/odbc-rails.rdf#this http://www.w3.org/2000/01/rdf-schema#seeAlso http://data.openlinksw.com/oplweb/product_family/uda#this http://myhost.com/DOAP/odbc-rails.rdf#this http://xmlns.com/foaf/0.1/maker http://myhost.com/dataspace/organization/john#this http://myhost.com/DOAP/odbc-rails.rdf#this http://usefulinc.com/ns/doap#created 2006-08-23 http://myhost.com/DOAP/odbc-rails.rdf#this http://usefulinc.com/ns/doap#license http://usefulinc.com/doap/licenses/mit http://myhost.com/DOAP/odbc-rails.rdf#this http://usefulinc.com/ns/doap#name ODBC Data Adapter for Ruby on Rails http://myhost.com/DOAP/odbc-rails.rdf#this http://usefulinc.com/ns/doap#homepage http://rubyforge.org/projects/odbc-rails/ ...

  11. You can also execute from ISQL DESCRIBE over the Project rdf:about values, in order to check that all the data in the graph is correct:

    SQL> SPARQL DESCRIBE <http://myhost.com/DOAP/iodbc.rdf#this> FROM <http://myhost.com/doap>; callret-0 LONG VARCHAR _______________________________________________________________________________ <http://myhost.com/DOAP/iodbc.rdf#this> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://usefulinc.com/ns/doap#Project> ; <http://www.w3.org/2000/01/rdf-schema#seeAlso> <http://data.openlinksw.com/oplweb/product_family/uda#this> ; <http://xmlns.com/foaf/0.1/maker> <http://myhost.com/dataspace/organization/john#this> ; <http://usefulinc.com/ns/doap#created> "1998-12-27" ; <http://usefulinc.com/ns/doap#license> <http://usefulinc.com/doap/licenses/lgpl> ; <http://usefulinc.com/ns/doap#name> "iODBC" ; <http://usefulinc.com/ns/doap#homepage> <http://www.iodbc.org/> ; <http://usefulinc.com/ns/doap#shortdesc> "iODBC is the acronym for Independent Open DataBase Connectivity, an Open-Source platform-independent implementation of both the ODBC and X/Open specifications." ; <http://usefulinc.com/ns/doap#description> "The ability to develop applications independent of back-end database engine, operating system, and for the most part programming language. Although ODBC and iODBC are both C-based Application Programming Interfaces (APIs) there are numerous cross language hooks and bridges from languages such as: C++, Java, Perl, PHP, Python, Ruby, TCL, and others." ; <http://usefulinc.com/ns/doap#mailing-list> <http://www.iodbc.org/index.php?page=maillists> ; <http://usefulinc.com/ns/doap#download-page> <http://www.iodbc.org/index.php?page=downloads/index> ; <http://usefulinc.com/ns/doap#programming-language> "C" ; <http://usefulinc.com/ns/doap#category> <http://projects.apache.org/category/database> ; <http://usefulinc.com/ns/doap#release> _:b1000057228 ; <http://usefulinc.com/ns/doap#maintainer> _:b1000057229 .

  12. Now go to Virtuoso Conductor, i.e. http://host:port/conductor and login as dba.
  13. Go to WebDAV&HTTP->HTTP Hosts&Directories
  14. Define a new Host in the form shown at the bottom, i.e.:
    1. Enter the Interface address in the first field where is shown the value 0.0.0.0
    2. Enter the port in the second field
    3. Enter the HTTP host name, for ex. myhost.com
    4. Click the button "Add".



  15. Click the blue folder icon infront of the created host.
  16. As result will be shown for "Logical Path": /. Click its "Edit" link



  17. In the shown form:
    1. Check the check-box "Default directory"
    2. Check the check-box "Physical path is a WebDAV repository".
    3. Enter for field "Physical path" an existing location of your default host, for ex. /DAV/mysite/
      • if there is no such folder mysite:
        1. Go WebDAV Content Management and create under dav folder with name "mysite".
        2. Go to folder "mysite"
        3. Upload a default index file which contain rel links to the DOAP files, for ex, the following index.htm file:

          <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title>My Site</title> <link rel="meta" title="DOAP" href="projects/doap_OAT.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/doap_ODS.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/doap_VOS.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/doap_iODBC.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/doap_odbc-bench.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/doap_odbc-rails.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/open_source_projects.rdf" type="application/rdf+xml" /> <link rel="meta" title="DOAP" href="projects/open_source_projects.nt" type="text/rdf+n3" /> <link rel="meta" title="DOAP" href="projects/open_source_projects.ttl" type="text/rdf+ttl" /> </head> <body> Some text here... </body> </html>

    4. Enter for "Default page": index.htm
    5. Check the check-box "Override exec permission flag in WebDAV"
    6. Change "VSP User" to: dba
    7. Click the button "Save changes".



  18. Now let's create a new virtual directory:
    1. Click the "New Directory" link for the host with name "myhost.com".
    2. In the shown form select type "WebDAV domain" and click "Next".



    3. In the shown form:
      1. Enter for "Path": /DOAP
      2. Enter for "Physical path" the location of the DOAP files, i.e. /DAV/home/john/Public/DOAP/
      3. Check the check-box "Allow Directory Browsing".
      4. Click the "Save Changes" button.



  19. Let's add a URL rewrite rule to the created virtual directory:
    1. For the virtual directory "/DOAP" click the link "URL-rewrite".
    2. In the shown form:
      1. Change "Rule matching" to: Last matching
      2. Enter for "Request Path pattern":

        /DOAP/([^#]*)

      3. Enter for "Accept Header Request pattern":

        (application/rdf.xml)|(text/rdf.n3)|(text/rdf.turtle)|(text/rdf.ttl)

      4. Leave "Destination format Conversion function" and "HTTP Response Headers" empty.
      5. Change "HTTP Response Code" to: Internal Redirect.



      6. For "Destination Path format" click the "SPARQL" button.
      7. Enter in the "SPARQL Query" text-area the following:

        DESCRIBE <http://myhost.com/DOAP/$s1#this> FROM <http://myhost.com/doap>





      8. Click the button "Format".



      9. Click the button "Add".



  20. Now let's check with the Virtuoso RDF Browser the data retrieved from the DOAP files:
    1. Go to http://demo.openlinksw.com/DAV/JS/rdfbrowser/index.html
    2. Checking the OAT DOAP file:
      1. Enter for Data Source URI: http://myhost.com/projects/doap_OAT.rdf
      2. Click the "Query" button".
      3. As result should be retrieved 23 triples. Click the "Project" OAT link in order to expand the rest of the triples.
    3. Checking the ODS DOAP file:
      1. Enter for Data Source URI: http://myhost.com/projects/doap_ODS.rdf
      2. Click the "Query" button".
      3. As result should be retrieved 31 triples. Click the "Project" "OpenLink Data Spaces (ODS - Open Source Edition)" link in order to expand the rest of the triples.
    4. Check the rest of the DOAP files from http://myhost.com/projects/
    5. You can also retrieve information for all the files querying the open_source_projects.rdf for ex.

References

CategoryVirtuoso CategoryDOAP