<docbook><section><title>SPARQLSponger</title><para> </para>
<title> An Introduction to the Virtuoso Sponger</title> An Introduction to the Virtuoso Sponger
 <para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> What is the Virtuoso Sponger?</bridgehead>
<para>The Sponger is a piece of built-in Virtuoso SPARQL Processor middleware, for extracting RDF &quot;on the fly&quot; from non-RDF Web Data Sources.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Why Is It Important?</bridgehead>
<para>A majority of the world&#39;s data naturally resides in non-RDF form at the current time.
 The &quot;Sponger&quot; is middleware that accelerates the bootstrap of the Semantic Data Web by unobtrusively generating RDF from non-RDF data sources.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> How Does It Work?</bridgehead>
<para>When an RDF-aware client requests data from a network-accessible resource via the Sponger, the following events occur: </para>
<orderedlist spacing="compact"><listitem>A request is made for data in RDF form, and if RDF is returned, no further transformation happens -- the RDF Entities are returned to the client </listitem>
<listitem>If RDF isn&#39;t returned, then the Sponger passes the data through a Metadata Extraction Pipeline process (using Metadata Extractors) </listitem>
<listitem>The extracted data is transformed to RDF via a Mapping Pipeline process (RDF is extracted by ontology matching and mapping) that generates RDF Entities (instance data) </listitem>
<listitem>RDF Entities are returned to the client</listitem>
</orderedlist><para>The imported data forms a local cache with invalidation rules conforming to those of traditional HTTP clients (Web Browsers).
 That is to say, expiration time is determined based on subsequent data fetches of the same resource (note: the first data load will record the &#39;expires&#39; header) with current time compared to expiration time stored in the local cache.
 If  HTTP &#39;expires&#39; header data isn&#39;t returned by the source data server, then the Sponger will derive it&#39;s own invalidation time frame by evaluating the &#39;date&#39; header and &#39;last-modified&#39; HTTP headers.
 Irrespective of path taken, local cache invalidation is driven by an assessment of  current time relative to recorded expiration time.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> Sponger Architecture</bridgehead>
<para>Architecturally, the Sponger is comprised of Cartridges which are themselves comprised of RDF Extractors (RDFizers) and Ontology (Schema) Mappers.</para>
<para>The Schema Mappers are typically written with XSLT (e.g., GRDDL and other <ulink url="OpenLink">OpenLink</ulink> Mapping Schemes) or Virtuoso PL.
 The Metadata Extractors may be developed in Virtuoso PL, C/C++, Java, or any other language that can be integrated into Virtuoso via its server extension APIs.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Sponger Components</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSpongerCartridge">Cartridge</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeExtractor">Ontology Mapper</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeOntologyMapper">Target Ontology</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeRDFExtractor">Data Extractor</ulink>, e.g., <ulink url="VirtProgrammerGuideRDFCartridge">RDF Cartridge Programmer Guide</ulink> </listitem>
<listitem><ulink url="VirtSpongerProxyWebServiceRest">Proxy</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSources">OpenLink Cartridge-Supported Data Sources</ulink></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h4"> Web Service Interface</bridgehead>
<para>The Sponger can be used also via a Virtuoso built-in REST style Web Service, through the <ulink url="VirtSpongerProxyWebServiceRest">Proxy</ulink> endpoint of any Virtuoso installation.</para>
<emphasis> <emphasis>Note</emphasis>: The cartridges_filesystem.vad must be installed for the actual extraction and mapping to occur.
 </emphasis><para>The Sponger is very much like an implementation of cURL, exposed as a built-in Virtuoso Web Service (so you can interact with it as you do with Triples).</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h4"> Packaging &amp; Deliverables</bridgehead>
<para>The RDF Cartridges (mappers and extractors) are packaged as Virtuoso VAD packages, easily installed via Virtuoso&#39;s ISQL interface or the browser-based Virtuoso Conductor.</para>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h3"> Simple Usage Examples</bridgehead>
<para>Enter the following URIs into 3rd Party RDF Client Application or Service:</para>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://demo.openlinksw.com/proxy?url=http://fgiasson.com&amp;force=rdf">Virtuoso Demo Server Proxy</ulink> - same as using <ulink url="http://fgiasson.com">http://fgiasson.com</ulink> as a URI in the <ulink url="OpenLink">OpenLink</ulink> Browser (which has built-in support for /proxy) </listitem>
<listitem>A Googlebase Query Service URI for Job vacancies - <ulink url="http://www.google.com/base/feeds/snippets?bq=%20%5Bemployer:%20Hewlett-Packard%5D%20%20%5Bjob%20type:full-time%5D">http://www.google.com/base/feeds/snippets?bq=%20%5Bemployer:%20Hewlett-Packard%5D%20%20%5Bjob%20type:full-time%5D</ulink> </listitem>
<listitem><ulink url="http://flickr.com/search/?w=all&amp;q=semanticweb&amp;m=tags">Non-RDF URI</ulink> to demonstrate the Sponger via: <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://dpedia.openlinksw.com:8890/proxy">http://dpedia.openlinksw.com:8890/proxy</ulink> </listitem>
<listitem><ulink url="http://dbpedia.openlinksw.com:8890/DAV/JS/rdfbrowser/index.html">http://dbpedia.openlinksw.com:8890/DAV/JS/rdfbrowser/index.html</ulink> -- click on the <emphasis>Images</emphasis> tab</listitem>
</itemizedlist></listitem>
</itemizedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="http://www.openlinksw.com/blog/~kidehen/?id=1172">Kingsley Idehen Weblog Post about RDF Middleware</ulink> </listitem>
<listitem><ulink url="http://fgiasson.com/blog/index.php/2007/03/28/making-the-bridge-between-the-web-and-the-semantic-web">Frederick Giasson Weblog Post about RDF Middleware and including examples of &quot;/proxy&quot; usage</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfsparqlprotocolendpoint.html#rdfproxyservice">Sponger Proxy Service Documentation</ulink> </listitem>
<listitem><ulink url="RDFMappers">RDF Mappers Programmers Guide</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/rdfiridereferencing.html">Documentation - Dereferencing URIs &amp; Linked Data</ulink></listitem>
</itemizedlist><para><ulink url="CategoryRDF">CategoryRDF</ulink> <ulink url="CategoryVirtuoso">CategoryVirtuoso</ulink></para>
</section></docbook>