Class RemoteEndpointConnection
java.lang.Object
org.apache.jena.jdbc.connections.JenaConnection
org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection
- All Implemented Interfaces:
AutoCloseable
,Connection
,Wrapper
Represents a connection to a remote endpoint
-
Field Summary
Fields inherited from class org.apache.jena.jdbc.connections.JenaConnection
DEFAULT_AUTO_COMMIT, DEFAULT_HOLDABILITY, DEFAULT_ISOLATION_LEVEL
Fields inherited from interface java.sql.Connection
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE
-
Constructor Summary
ConstructorsConstructorDescriptionRemoteEndpointConnection
(String queryEndpoint, String updateEndpoint, int holdability, int compatibilityLevel) Creates a new remote connectionRemoteEndpointConnection
(String queryEndpoint, String updateEndpoint, List<String> defaultGraphUris, List<String> namedGraphUris, List<String> usingGraphUris, List<String> usingNamedGraphUris, java.net.http.HttpClient client, int holdability, int compatibilityLevel, String selectResultsType, String modelResultsType) Creates a new remote connection -
Method Summary
Modifier and TypeMethodDescriptionGets the default graphs for SPARQL queries (may be null if none were set)Gets the results type that will be requested from the remote endpoint forCONSTRUCT
andDESCRIBE
queries.Gets the named graphs for SPARQL queries (may be null if none were set)Gets the SPARQL query endpoint that is in useGets the results type that will be requested from the remote endpoint forSELECT
queriesGets the SPARQL update endpoint that is in useGets the default graphs for SPARQL updates (may be null if none were set)Gets the named graphs for SPARQL updates (may be null if none were set)boolean
isClosed()
boolean
boolean
isValid
(int timeout) void
setReadOnly
(boolean readOnly) Methods inherited from class org.apache.jena.jdbc.connections.JenaConnection
abort, addPostProcessor, addPreProcessor, applyPostProcessors, applyPostProcessors, applyPostProcessors, applyPostProcessors, applyPostProcessors, applyPostProcessors, applyPreProcessors, applyPreProcessors, applyPreProcessors, clearPostProcessors, clearPreProcessors, clearWarnings, close, commit, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStatement, createStatement, createStatement, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getJdbcCompatibilityLevel, getNetworkTimeout, getPostProcessors, getPreProcessors, getSchema, getTransactionIsolation, getTypeMap, getWarnings, insertPostProcessor, insertPreProcessor, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, removePostProcessor, removePostProcessor, removePreProcessor, removePreProcessor, rollback, rollback, setAutoCommit, setCatalog, setClientInfo, setClientInfo, setHoldability, setJdbcCompatibilityLevel, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTransactionIsolation, setTypeMap, unwrap
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.sql.Connection
beginRequest, endRequest, setShardingKey, setShardingKey, setShardingKeyIfValid, setShardingKeyIfValid
-
Constructor Details
-
RemoteEndpointConnection
public RemoteEndpointConnection(String queryEndpoint, String updateEndpoint, int holdability, int compatibilityLevel) throws SQLException Creates a new remote connection- Parameters:
queryEndpoint
- SPARQL Query EndpointupdateEndpoint
- SPARQL Update Endpointholdability
- Result Set holdabilitycompatibilityLevel
- JDBC compatibility level, seeJdbcCompatibility
- Throws:
SQLException
- Thrown if there is a problem creating the connection
-
RemoteEndpointConnection
public RemoteEndpointConnection(String queryEndpoint, String updateEndpoint, List<String> defaultGraphUris, List<String> namedGraphUris, List<String> usingGraphUris, List<String> usingNamedGraphUris, java.net.http.HttpClient client, int holdability, int compatibilityLevel, String selectResultsType, String modelResultsType) throws SQLException Creates a new remote connection- Parameters:
queryEndpoint
- SPARQL Query EndpointupdateEndpoint
- SPARQL Update EndpointdefaultGraphUris
- Default Graph URIs for SPARQL queriesnamedGraphUris
- Named Graph URIs for SPARQL queriesusingGraphUris
- Default Graph URIs for SPARQL updatesusingNamedGraphUris
- Named Graph URIs for SPARQL updatesclient
- HTTP clientholdability
- Result Set holdabilitycompatibilityLevel
- JDBC compatibility level, seeJdbcCompatibility
selectResultsType
- Results Type to request forSELECT
queries against the remote endpointmodelResultsType
- Results Type to request forCONSTRUCT
andDESCRIBE
queries against the remote endpoint- Throws:
SQLException
- Thrown if there is a problem creating the connection
-
-
Method Details
-
getQueryEndpoint
Gets the SPARQL query endpoint that is in use- Returns:
- Endpoint URI or null for write only connections
-
getUpdateEndpoint
Gets the SPARQL update endpoint that is in use- Returns:
- Endpoint URI or null for read-only connections
-
getDefaultGraphURIs
Gets the default graphs for SPARQL queries (may be null if none were set)- Returns:
- Default graphs
-
getNamedGraphURIs
Gets the named graphs for SPARQL queries (may be null if none were set)- Returns:
- Named graphs
-
getUsingGraphURIs
Gets the default graphs for SPARQL updates (may be null if none were set)- Returns:
- Default graphs
-
getUsingNamedGraphURIs
Gets the named graphs for SPARQL updates (may be null if none were set)- Returns:
- Named graphs
-
getSelectResultsType
Gets the results type that will be requested from the remote endpoint forSELECT
queries- Returns:
- Select results type if set, otherwise null which indicates that the ARQ default will be used
-
getModelResultsType
Gets the results type that will be requested from the remote endpoint forCONSTRUCT
andDESCRIBE
queries.- Returns:
- Model results type if set, otherwise null which indicates that the ARQ default will be used
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in interfaceConnection
- Specified by:
isClosed
in classJenaConnection
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceConnection
- Specified by:
isReadOnly
in classJenaConnection
-
isValid
public boolean isValid(int timeout) - Specified by:
isValid
in interfaceConnection
- Specified by:
isValid
in classJenaConnection
-
setReadOnly
- Specified by:
setReadOnly
in interfaceConnection
- Specified by:
setReadOnly
in classJenaConnection
- Throws:
SQLException
-
getMetaData
- Specified by:
getMetaData
in interfaceConnection
- Specified by:
getMetaData
in classJenaConnection
-