<docbook><section><title>VirtSpongerRESTPatterns</title><para> </para>
<title>Usage of the Sponger Middleware via REST patterns</title>Usage of the Sponger Middleware via REST patterns
<bridgehead class="http://www.w3.org/1999/xhtml:h2">What?</bridgehead>
<para>How to interact with the Sponger via REST patterns.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Why?</bridgehead>
 Delegation and proxies are part of the Internet and Web&#39;s federated architecture.
 Thus, developers of RESTful applications benefit immensely from the ability to leverage Sponger functionality via delegation to it as a proxy.<para>Two proxies are available: /about (deprecated) and /describe.
 /about provides a simple RDF browsing interface, /describe exposes a functionally richer faceted browser.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">How?</bridgehead>
<para>The following table presents list of the supported URL parameters:</para>
<para> </para>

<table><title /><tgroup><thead /><tbody>
<row />
<row><entry><emphasis>sr</emphasis> (/describe)<emphasis>refresh</emphasis>(/about)</entry><entry> clean </entry><entry><emphasis>Use</emphasis>: Clear the target graph before spongingThe &#39;clean&#39; usage explicitly clears the target graph i.e. will cause the Sponger to clear it&#39;s cache even if it is marked to be in use.Thus, if the fetch cache is for some reason left in an inconsistent state, for instance by a shutdown during Network Resource fetching, then &#39;clean&#39; is required as it doesn&#39;t check the cache state beforehand.<emphasis>Note</emphasis>: * must be used with caution as other threads may be doing fetching of network resources at same time. * refresh must be used in tandem with @Lookup@ i.e. &amp;@Lookup@=&amp;refresh=clean </entry><entry>Explicitly clear the graph <ulink url="http://linkeddata.uriburner.com/describe?url=https%3A%2F%2Ftwitter.com%2Fkidehen&amp;sponger:get=add&amp;sr=clean">/describe</ulink> <ulink url="http://linkeddata.uriburner.com/about/html/https://twitter.com/kidehen?@Lookup@=&amp;refresh=clean">/about</ulink></entry></row>
<row><entry><emphasis>sponger:get</emphasis></entry><entry>add </entry><entry> <emphasis>Use</emphasis>: When adding new triples, do not overwrite existing triples with the same subject and predicateAdd new triples to named graphs, progressively. This is the default value for the parameter sponger:get. May be used together with refresh=&lt;seconds&gt; to override the default cache expiration (which is based on a cache expiry date/time calculated from information in the HTTP headers returned from a previous sponge of the target data source). </entry><entry> Add new triples and refresh on every 10 seconds<ulink url="http://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Ftwitter.com%2Fkidehen?sponger:get=add&amp;sr=10">/describe</ulink><ulink url="http://linkeddata.uriburner.com/about/html/https/twitter.com/kidehen?sponger:get=add&amp;@Lookup@=&amp;refresh=10">/about</ulink></entry></row>
<row><entry><emphasis>sponger:get</emphasis></entry><entry>soft </entry><entry><emphasis>Use</emphasis>: Add triples only if the target graph is initially emptyNetwork Resource Fetch data subject to the cache invalidation policies and associated rules of instance. May be used together with refresh=&lt;seconds&gt; to override the default cache expiration. </entry><entry> Network Resource Fetch data with option <emphasis>soft</emphasis> and refresh on every 10 seconds<ulink url="http://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Ftwitter.com%2Fkidehen?sponger:soft=add&amp;sr=10">/describe</ulink><ulink url="http://linkeddata.uriburner.com/about/html/https/twitter.com/kidehen?sponger:get=soft&amp;@Lookup@=&amp;refresh=10">/about</ulink></entry></row>
<row><entry><emphasis>sponger:get</emphasis></entry><entry>replace </entry><entry><emphasis>Use</emphasis>: When adding new triples, overwrite existing triples with the same subject and predicateReplace subject to cache invalidation policy and rules, but coverage includes non fetched triples if such exist in a given named graph. may be used together with refresh=&lt;seconds&gt; to override the default cache expiration. </entry><entry> Replace data and refresh on every 10 seconds<ulink url="http://linkeddata.uriburner.com/describe/?url=https%3A%2F%2Ftwitter.com%2Fkidehen?sponger:get=replace&amp;sr=10">/describe</ulink><ulink url="http://linkeddata.uriburner.com/about/html/https/twitter.com/kidehen?sponger:get=replace&amp;@Lookup@=&amp;refresh=10">/about</ulink></entry></row>
</tbody></tgroup></table>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSpongerCartridgeProgrammersGuide_Part3">Sponger Queue API</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/Whitepapers/html/VirtSpongerWhitePaper.html">Technical White Paper</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSources">Supported Virtuoso Sponger Cartridges</ulink> </listitem>
<listitem><ulink url="SPARQLSponger">SPARQL Sponger</ulink> </listitem>
<listitem><ulink url="http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtSpongerCartridgeProgrammersGuide#RDF%20Proxy%20Service">Virtuoso Linked Data Middleware REST Patterns</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamples">Parametrized Examples of Meta Cartridge Usage via REST Request</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeRDFExtractor">Sponger Cartridge RDF Extractor</ulink> </listitem>
<listitem><ulink url="RDFMappers">Extending SPARQL IRI Dereferencing with RDF Mappers</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeProgrammersGuide">Programmer Guide for Virtuoso Linked Data Middleware (&quot;Sponger&quot;)</ulink> </listitem>
<listitem><ulink url="VirtProgrammerGuideRDFCartridge">Create RDF Custom Cartridge Tutorial</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSources">OpenLink-supplied Virtuoso Sponger Cartridges</ulink> </listitem>
<listitem><ulink url="VirtAuthServerUI">Virtuoso Authentication Server</ulink> </listitem>
<listitem><ulink url="VirtOAuthSPARQL">Virtuoso SPARQL OAuth Tutorial</ulink> </listitem>
<listitem><ulink url="VirtSpongerACL">Virtuoso Sponger Access Control List (ACL) Setup</ulink> </listitem>
<listitem><ulink url="VirtSPARQLSecurityWebID">WebID Protocol &amp; SPARQL Endpoint ACLs Tutorial</ulink> </listitem>
<listitem><ulink url="http://docs.openlinksw.com/virtuoso/virtuososponger.html">Virtuoso Documentation</ulink> </listitem>
</itemizedlist></section></docbook>