%META:TOPICPARENT{name="VirtSpongerCartridgeProgrammersGuide"}% ---+Interacting with Sponger Middleware via RESTful Patterns Sponger functionality can be exploited via RESTful interaction via a variety of URL patterns. ---++Prequisites Ensure you have the [[https://virtuoso.openlinksw.com/download/][cartridges_dav.vad]] package installed. Once in place, the following URL pattern becomes functional: '/about/[rdf|html]/'. Thus, if you've installed Virtuoso on the host example.com, with HTTP listener enabled on port 8080 you would use patterns: http://example.com:8080/about/[rdf|html]/. ---++Example The following URLs (using the live Sponger instance behind our URIBurner service) returns a Linked Data resource that describes the musician John Cale, based on data from the MusicBrainz database, optionally rendered as RDF or HTML formats respectively. (The actual description data is exposed in HTML format through value of the foaf:primaryTopic property.) * http://uriburner.com/about/rdf/http://musicbrainz.org/artist/72c090b6-a68e-4cb9-b330-85278681a714.html * http://uriburner.com/about/html/http://musicbrainz.org/artist/72c090b6-a68e-4cb9-b330-85278681a714.html ---++URL Patterns Reference The following table presents a list of the supported URL parameters: |*Parameter*|*Value*|*Description*|*Example*| |refresh|clean |Usage: for overwriting.
The 'clean' usage explicitly clears the graph i.e. will cause the Sponger to drop cache even if it is marked to be in the fly.
Thus, if fetched cache by some reason is left in some inconsistent state like shutdown during Network Resource fetching, then 'clean' is required as it doesn't check cache state.
Note: must be used with caution as other threads may be doing fetching of network resources at same time. | [[http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?@Lookup@=&refresh=clean][Explicitly clear the graph]]| |sponger:get|add |Usage: Add new triples to named graphs, progressively. This is the default value for the parameter sponger:get. May be used together with refresh=<seconds> to overwrite the expiration in the cache. | [[http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=add&refresh=10][Add new triples and refresh on every 10 seconds]]| |sponger:get|soft |Usage: Network Resource Fetch data subject to cache invalidation mode and associated rules of instance. May be used together with refresh=<seconds> to overwrite the expiration in the cache. | [[http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=soft&refresh=10][Network Resource Fetch data with option soft and refresh on every 10 seconds]]| |sponger:get| replace |Usage: Replace subject to cache invalidation mode and rules, but coverage includes non fetched triples if such exist in a given named graph. may be used together with refresh=<seconds> to overwrite the expiration in the cache. | [[http://linkeddata.uriburner.com/about/html/http://linkeddata.uriburner.com/about/id/entity/http/twitter.com/kidehen?sponger:get=replace&refresh=10][Replace data and refresh on every 10 seconds]]| ---++Related * [[VirtSponger][Virtuoso Linked Data Middleware (aka. "Sponger")]] * [[VirtSpongerCartridgeSupportedDataSources][Prebuilt Sponger Cartridges]] * [[SPARQLSponger][Sponger Exploitation via SPARQL]] * [[VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamples][Interacting with Sponger Meta Cartridge via RESTful Patterns]] * [[VirtSpongerCartridgeRDFExtractor][Sponger Cartridges & RDF Transformation]] * [[RDFMappers][ Extending SPARQL IRI Dereferencing via Sponger]] * [[VirtSpongerCartridgeProgrammersGuide][Sponger Programmer's Guide]] * [[VirtProgrammerGuideRDFCartridge][Create RDF Custom Cartridge Tutorial]] * [[VirtSpongerCartridgeSupportedDataSources][OpenLink-supplied Sponger Cartridges]] * [[VirtSpongerACL][Guide for Protecting Your Sponger Instance via Access Control List (ACL)]] * [[http://docs.openlinksw.com/virtuoso/virtuososponger.html][Virtuoso Documentation Chapter re. Sponger]] * [[VirtSpongerCartridgeProgrammersGuide][Sponger Programmer's Guide]] * [[http://virtuoso.openlinksw.com/Whitepapers/html/VirtSpongerWhitePaper.html][Technical White Paper]]