Class RemoteEndpointDriver

java.lang.Object
org.apache.jena.jdbc.JenaDriver
org.apache.jena.jdbc.remote.RemoteEndpointDriver
All Implemented Interfaces:
Driver

public class RemoteEndpointDriver extends JenaDriver

A Jena JDBC driver which creates connections to remote endpoints

Connection URL

This driver expects a URL of the following form:

 jdbc:jena:remote:query=http://example.org/query&update=http://example.org/update
 

The query parameter is used to refer to a SPARQL query endpoint to use, the update parameter is used to refer to a SPARQL update endpoint to use. At least one of these parameters must be present in order to make a connection, you may omit the former to get a write only connection or the latter to get a read only connection.

Note that since the & character is used as a separator for connection URL parameters if you need your endpoint URLs to include these you should set the relevant parameters directly on the Properties object you pass to the JenaDriver.connect(String, Properties) method instead.

Other Supported Parameters

This driver supports a variety of properties that can be used to configure aspects of its behavior, firstly there are a set of properties used to specify the dataset for queries and updates:

  • default-graph-uri - Sets a default graph for queries, may be specified multiple times to specify multiple graphs to form the default graph
  • named-graph-uri - Sets a named graph for queries, may be specified multiple times to specify multiple named graphs for the dataset
  • using-graph-uri - Sets a default graph for updates, may be specified multiple times to specify multiple graphs to form the default graph for updates
  • using-named-graph-uri - Sets a named graph for updates, may be specified multiple times to specify multiple named graphs for the dataset
  • select-results-type - Sets the format to request SELECT results in from the remote endpoint
  • model-results-type - Sets the format to request CONSTRUCT and DESCRIBE results in from the remote endpoint

Authentication Parameters

The driver also supports the standard JDBC user and password parameters which are used to set user credentials for authenticating to the remote HTTP server.

Alternatively you may use the client parameter to set a specific client implementation to use, must be passed an instance of HttpClient so can only be passed via the Properties object and not via the connection URL. If this parameter is used then all other authentication parameters are ignored.

  • Field Details

    • REMOTE_DRIVER_PREFIX

      public static final String REMOTE_DRIVER_PREFIX
      Constant for the remote driver prefix, this is appended to the base JenaDriver.DRIVER_PREFIX to form the URL prefix for JDBC Connection URLs for this driver
      See Also:
    • PARAM_QUERY_ENDPOINT

      public static final String PARAM_QUERY_ENDPOINT
      Constant for the connection URL parameter that sets the remote SPARQL query endpoint to use
      See Also:
    • PARAM_UPDATE_ENDPOINT

      public static final String PARAM_UPDATE_ENDPOINT
      Constant for the connection URL parameter that sets the remote SPARQL update endpoint to use
      See Also:
    • PARAM_DEFAULT_GRAPH_URI

      public static final String PARAM_DEFAULT_GRAPH_URI
      Constant for the connection URL parameter that sets a default graph URI for SPARQL queries, may be specified multiple times to use specify multiple default graphs to use
      See Also:
    • PARAM_NAMED_GRAPH_URI

      public static final String PARAM_NAMED_GRAPH_URI
      Constant for the connection URL parameter that sets a named graph URI for SPARQL queries, may be specified multiple times to use specify multiple named graphs to use
      See Also:
    • PARAM_USING_GRAPH_URI

      public static final String PARAM_USING_GRAPH_URI
      Constant for the connection URL parameter that sets a default graph URI for SPARQL updates, may be specified multiple times to use specify multiple default graphs to use
      See Also:
    • PARAM_USING_NAMED_GRAPH_URI

      public static final String PARAM_USING_NAMED_GRAPH_URI
      Constant for the connection URL parameter that sets a named graph URI for SPARQL updates, may be specified multiple times to use specify multiple named graphs to use
      See Also:
    • PARAM_SELECT_RESULTS_TYPE

      public static final String PARAM_SELECT_RESULTS_TYPE
      Constant for the connection URL parameter that sets the results type to request for SELECT queries against the remote endpoint
      See Also:
    • PARAM_MODEL_RESULTS_TYPE

      public static final String PARAM_MODEL_RESULTS_TYPE
      Constant for the connection URL parameter that sets the results type to request for CONSTRUCT and DESCRIBE queries against the remote endpoint
      See Also:
    • PARAM_CLIENT

      public static final String PARAM_CLIENT
      Constant for the parameter used to specify a client used.

      It is important to be aware that you must pass in an actual instance of a HttpClient for this parameter so you cannot use directly in the Connection URL and must pass in via the Properties object.

      See Also:
  • Constructor Details

    • RemoteEndpointDriver

      public RemoteEndpointDriver()
      Creates a new driver
  • Method Details