Skip to content

Remote Stores and Endpoints

semsol edited this page Mar 11, 2011 · 3 revisions

ARC provides a RemoteStore component (starting with revision 2008-07-04 and based on Morten Frederiksen's excellent RemoteEndpointPlugin) which makes it possible to work with SPARQL (and SPARQL+) endpoints (almost) as if they were local stores (please see "Using ARC's RDF Store" for general methods and options).


A remote store is instantiated like a local store, but with a remote_store_endpoint configuration parameter instead of database settings:

/* ARC2 static class inclusion */ 

/* configuration */ 
$config = array(
  /* remote endpoint */
  'remote_store_endpoint' => '',

/* instantiation */
$store = ARC2::getRemoteStore($config);

Running Queries

$q = 'SELECT ...';
$rows = $store->query($q, 'rows');

Unsupported methods

A couple of the usual store methods are not available while working with remote endpoints:

  • hasSetting(), getSetting(), setSetting()
  • reset()
  • drop()
  • dump() (you can use DUMP as non-standard SPARQL query, if supported)
  • createBackup()
  • renameTo()
  • replicateTo()
  • consolidation methods
You can’t perform that action at this time.