Class RemoteEndpointDriver
- All Implemented Interfaces:
Driver
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 graphnamed-graph-uri
- Sets a named graph for queries, may be specified multiple times to specify multiple named graphs for the datasetusing-graph-uri
- Sets a default graph for updates, may be specified multiple times to specify multiple graphs to form the default graph for updatesusing-named-graph-uri
- Sets a named graph for updates, may be specified multiple times to specify multiple named graphs for the datasetselect-results-type
- Sets the format to requestSELECT
results in from the remote endpointmodel-results-type
- Sets the format to requestCONSTRUCT
andDESCRIBE
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Constant for the parameter used to specify a client used.static final String
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 usestatic final String
Constant for the connection URL parameter that sets the results type to request forCONSTRUCT
andDESCRIBE
queries against the remote endpointstatic final String
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 usestatic final String
Constant for the connection URL parameter that sets the remote SPARQL query endpoint to usestatic final String
Constant for the connection URL parameter that sets the results type to request forSELECT
queries against the remote endpointstatic final String
Constant for the connection URL parameter that sets the remote SPARQL update endpoint to usestatic final String
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 usestatic final String
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 usestatic final String
Constant for the remote driver prefix, this is appended to the baseJenaDriver.DRIVER_PREFIX
to form the URL prefix for JDBC Connection URLs for this driverFields inherited from class org.apache.jena.jdbc.JenaDriver
DRIVER_PREFIX, NO_AUTO_LOGGING_CONFIGURATION, PARAM_CONFIG, PARAM_JDBC_COMPATIBILITY, PARAM_LOGGING, PARAM_PASSWORD, PARAM_POST_PROCESSOR, PARAM_PRE_PROCESSOR, PARAM_USERNAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
register()
Registers the driver with the JDBCDriverManager
Methods inherited from class org.apache.jena.jdbc.JenaDriver
acceptsURL, connect, getMajorVersion, getMinorVersion, getParentLogger, getPropertyInfo, jdbcCompliant
-
Field Details
-
REMOTE_DRIVER_PREFIX
Constant for the remote driver prefix, this is appended to the baseJenaDriver.DRIVER_PREFIX
to form the URL prefix for JDBC Connection URLs for this driver- See Also:
-
PARAM_QUERY_ENDPOINT
Constant for the connection URL parameter that sets the remote SPARQL query endpoint to use- See Also:
-
PARAM_UPDATE_ENDPOINT
Constant for the connection URL parameter that sets the remote SPARQL update endpoint to use- See Also:
-
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
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
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
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
Constant for the connection URL parameter that sets the results type to request forSELECT
queries against the remote endpoint- See Also:
-
PARAM_MODEL_RESULTS_TYPE
Constant for the connection URL parameter that sets the results type to request forCONSTRUCT
andDESCRIBE
queries against the remote endpoint- See Also:
-
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 theProperties
object.- See Also:
-
-
Constructor Details
-
RemoteEndpointDriver
public RemoteEndpointDriver()Creates a new driver
-
-
Method Details
-
register
Registers the driver with the JDBCDriverManager
- Throws:
SQLException
- Thrown if the driver cannot be registered
-