VOS.VirtGoogleVocab
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:
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:
- Go to http://<cname>:port/conductor
- Log in as dba user
Upload the ontology file:
Go to Web Application Server -> Content Management
- Create folder schemas ( if does not exist already):
- Click the button "New folder"
- In the shown form:
- Enter Folder name: schemas
- Change Owner to dav
- Change Free Text Indexing to Recursively
- Click the "Create" button.
- As result the folder "schemas" will be created.
Go to path /DAV/schemas

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

As result the file will be uploaded.
Let's check the RDF data:
- Go to http://<cname>:port/sparql
- Enter the Graph IRI, for ex. http://www.openlinksw.com/schemas/external/googlevocab#
- Enter the following query:
select * where {?s ?p ?o}
- Click the "Run Query" button.
- As result the RDF data for the given graph will be shown:

Create the virtual folder:
- Go to Web Application Server -> Virtual Domains & Directories
- For defined http host, for ex. www. openlinksw.com expand the Interface blue folder icon:

- Click New Directory
- In the shown form select type: WebDAV doman and click the "Next" button.

- In the Virtual Directory creation form:
- Enter Path: /schemas/external/googlevocab
- leave checked "Physical path is a WebDAV repository"
- Enter Physical path: /DAV/schemas/googlevoc.n3
- 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:
- Click the URL-rewrite link for the created "/schemas/external/googlevocab" virtual directory
- As result will be shown the URL rewriting rules form:

Add first rule:
- Change "Destination Path format" to:
/rdfdesc/description.vsp?g=http%3A%2F%2Fwww.openlinksw.com%2Fschemas%2Fexternal%2Fgooglevocab%2F$U1&p=googlevoc
- Click the "Add" button.
- As result the rule will be created:

Now let's create the second rule:
- Change "Rule matching" to "Last matching"
- Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)$
- Enter for "Accept Header Request pattern": application/rdf.xml
- Enter for "Destination Path format":
/schemas/external/googlevocab/$U1.xml
- Change "HTTP Response Code" to: 303

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

Now let's create the third rule:
- Change "Rule matching" to "Last matching"
- Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)$
- Enter for "Accept Header Request pattern": text/rdf.n3
- Enter for "Destination Path format":
/schemas/external/googlevocab/$U1.n3
- Change "HTTP Response Code" to: 303

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

Now let's create the forth rule:
- Change "Rule matching" to "Last matching"
- Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)\.(rdf|xml|n3)$
- Enter for "Accept Header Request pattern": (text/rdf.n3)|(application/rdf.xml)
- Enter for "Destination Path format":
/sparql?query=describe%20%3Chttp%3A%2F%2Fwww.openlinksw.com%2Fschemas%2Fexternal%2Fgooglevocab%2F$U1%3E&format=$accept
- Click the "Add" button.
- As result the rule will be created
