%TOC%
---++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
1. Google Vocabulary Ontology
1. 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
1 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):
1. Click the button "New folder"
1. In the shown form:
1. Enter Folder name: schemas
1 Change Owner to dav
1 Change Free Text Indexing to Recursively
1 Click the "Create" button.
1 As result the folder "schemas" will be created.
Go to path /DAV/schemas
1 Click the "Upload" button.
1 In the shown form:
1 Change Destination to RDF Store
1 For File click the Browse button and select the googlevoc.n3 file
1 Enter for RDF IRI for ex.: http://www.openlinksw.com/schemas/external/googlevocab#
1 Click the upload button
As result the file will be uploaded.
Let's check the RDF data:
1 Go to http://<cname>:port/sparql
1 Enter the Graph IRI, for ex. http://www.openlinksw.com/schemas/external/googlevocab#
1 Enter the following query:
select *
where {?s ?p ?o}
1 Click the "Run Query" button.
1 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
1 For defined http host, for ex. www. openlinksw.com expand the Interface blue folder icon:
1 Click New Directory
1. 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
1 leave checked "Physical path is a WebDAV repository"
1 Enter Physical path: /DAV/schemas/googlevoc.n3
1 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
1 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.
1 As result the rule will be created:
Now let's create the second rule:
1. Change "Rule matching" to "Last matching"
1 Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)$
1 Enter for "Accept Header Request pattern": application/rdf.xml
1 Enter for "Destination Path format":
/schemas/external/googlevocab/$U1.xml
1 Change "HTTP Response Code" to: 303
1 Click the "Add" button.
1 As result the rule will be created:
Now let's create the third rule:
1 Change "Rule matching" to "Last matching"
1 Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)$
1 Enter for "Accept Header Request pattern": text/rdf.n3
1 Enter for "Destination Path format":
/schemas/external/googlevocab/$U1.n3
1 Change "HTTP Response Code" to: 303
1 Click the "Add" button.
1 As result the rule will be created:
Now let's create the forth rule:
1 Change "Rule matching" to "Last matching"
1 Enter for "Request Path pattern":
/schemas/external/googlevocab/([^\.]*)\.(rdf|xml|n3)$
1 Enter for "Accept Header Request pattern": (text/rdf.n3)|(application/rdf.xml)
1 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.
1 As result the rule will be created
---+++Examples
* [[VirtGoogleVocabExamples][View Sample Curl Examples]].
---+++References
* [[http://rdf.data-vocabulary.org/][Google Vocabulary]]