VOS.VirtGoogleVocab

  • Topic
  • Discussion
  • VOS.VirtGoogleVocab(Last) -- DAVWikiAdmin? , 2017-06-29 07:37:26 Edit WebDAV System Administrator 2017-06-29 07:37:26

    Virtuoso Mapping Ontology for Google

    What

    Virtuoso offers mapping ontology for Google. The Virtuoso hosted version: http://www.openlinksw.com/schemas/external/googlevocab#

    It receives redirects from http://purl.org/NET/googlevocab# .

    Why

    How

    The mapping can be initialize executing the sql file and uploading the ontology file as shown in the list below:

    1. Re-write rules creation
    2. Google Vocabulary Ontology
    3. Google Vocabulary rdf

    Deploying Google Mapping Vocabulary using Conductor UI:

    The following step-by-step guide will lead you trough the process of Deploying Google Mapping Vocabulary using Conductor UI:

    1. Go to http://<cname>:port/conductor
    2. Log in as dba user

    Upload the ontology file:

    Go to Web Application Server -> Content Management

    1. Create folder schemas ( if does not exist already):
    2. Click the button "New folder"
    3. In the shown form:
      1. Enter Folder name: schemas
      2. Change Owner to dav
      3. Change Free Text Indexing to Recursively
      4. Click the "Create" button.
      5. As result the folder "schemas" will be created.

    Go to path /DAV/schemas

    1. Click the "Upload" button.
    2. In the shown form:
      1. Change Destination to RDF Store
      2. For File click the Browse button and select the googlevoc.n3 file
      3. Enter for RDF IRI for ex.: http://www.openlinksw.com/schemas/external/googlevocab#
      4. Click the upload button

    As result the file will be uploaded.

    Let's check the RDF data:

    1. Go to http://<cname>:port/sparql
    2. Enter the Graph IRI, for ex. http://www.openlinksw.com/schemas/external/googlevocab#
    3. Enter the following query:

      select * where {?s ?p ?o}

    4. Click the "Run Query" button.
    5. As result the RDF data for the given graph will be shown:

    Create the virtual folder:

    1. Go to Web Application Server -> Virtual Domains & Directories
    2. For defined http host, for ex. www. openlinksw.com expand the Interface blue folder icon:
    1. Click New Directory
    2. In the shown form select type: WebDAV doman and click the "Next" button.
    1. In the Virtual Directory creation form:
      1. Enter Path: /schemas/external/googlevocab
      2. leave checked "Physical path is a WebDAV repository"
      3. Enter Physical path: /DAV/schemas/googlevoc.n3
      4. Click the "Save Changes" button

    As result the Virtual Directory will be created and shown in the list of virtual directories for the selected host.

    Create re-write rules for the created virtual folder from above:

    1. Click the URL-rewrite link for the created "/schemas/external/googlevocab" virtual directory
    2. As result will be shown the URL rewriting rules form:

    Add first rule:

    1. Change "Destination Path format" to:

      /rdfdesc/description.vsp?g=http%3A%2F%2Fwww.openlinksw.com%2Fschemas%2Fexternal%2Fgooglevocab%2F$U1&p=googlevoc

    1. Click the "Add" button.
    2. As result the rule will be created:

    Now let's create the second rule:

    1. Change "Rule matching" to "Last matching"
    2. Enter for "Request Path pattern":

      /schemas/external/googlevocab/([^\.]*)$

    3. Enter for "Accept Header Request pattern": application/rdf.xml
    4. Enter for "Destination Path format":

      /schemas/external/googlevocab/$U1.xml

    5. Change "HTTP Response Code" to: 303
    1. Click the "Add" button.
    2. As result the rule will be created:

    Now let's create the third rule:

    1. Change "Rule matching" to "Last matching"
    2. Enter for "Request Path pattern":

      /schemas/external/googlevocab/([^\.]*)$

    3. Enter for "Accept Header Request pattern": text/rdf.n3
    4. Enter for "Destination Path format":

      /schemas/external/googlevocab/$U1.n3

    5. Change "HTTP Response Code" to: 303
    1. Click the "Add" button.
    2. As result the rule will be created:

    Now let's create the forth rule:

    1. Change "Rule matching" to "Last matching"
    2. Enter for "Request Path pattern":

      /schemas/external/googlevocab/([^\.]*)\.(rdf|xml|n3)$

    3. Enter for "Accept Header Request pattern": (text/rdf.n3)|(application/rdf.xml)
    4. Enter for "Destination Path format":

      /sparql?query=describe%20%3Chttp%3A%2F%2Fwww.openlinksw.com%2Fschemas%2Fexternal%2Fgooglevocab%2F$U1%3E&format=$accept

    1. Click the "Add" button.
    2. As result the rule will be created

    Examples

    References