Class RemoteEndpointConnection

java.lang.Object
org.apache.jena.jdbc.connections.JenaConnection
org.apache.jena.jdbc.remote.connections.RemoteEndpointConnection
All Implemented Interfaces:
AutoCloseable, Connection, Wrapper

public class RemoteEndpointConnection extends JenaConnection
Represents a connection to a remote endpoint
  • Constructor Details

    • RemoteEndpointConnection

      public RemoteEndpointConnection(String queryEndpoint, String updateEndpoint, int holdability, int compatibilityLevel) throws SQLException
      Creates a new remote connection
      Parameters:
      queryEndpoint - SPARQL Query Endpoint
      updateEndpoint - SPARQL Update Endpoint
      holdability - Result Set holdability
      compatibilityLevel - JDBC compatibility level, see JdbcCompatibility
      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 Endpoint
      updateEndpoint - SPARQL Update Endpoint
      defaultGraphUris - Default Graph URIs for SPARQL queries
      namedGraphUris - Named Graph URIs for SPARQL queries
      usingGraphUris - Default Graph URIs for SPARQL updates
      usingNamedGraphUris - Named Graph URIs for SPARQL updates
      client - HTTP client
      holdability - Result Set holdability
      compatibilityLevel - JDBC compatibility level, see JdbcCompatibility
      selectResultsType - Results Type to request for SELECT queries against the remote endpoint
      modelResultsType - Results Type to request for CONSTRUCT and DESCRIBE queries against the remote endpoint
      Throws:
      SQLException - Thrown if there is a problem creating the connection
  • Method Details

    • getQueryEndpoint

      public String getQueryEndpoint()
      Gets the SPARQL query endpoint that is in use
      Returns:
      Endpoint URI or null for write only connections
    • getUpdateEndpoint

      public String getUpdateEndpoint()
      Gets the SPARQL update endpoint that is in use
      Returns:
      Endpoint URI or null for read-only connections
    • getDefaultGraphURIs

      public List<String> getDefaultGraphURIs()
      Gets the default graphs for SPARQL queries (may be null if none were set)
      Returns:
      Default graphs
    • getNamedGraphURIs

      public List<String> getNamedGraphURIs()
      Gets the named graphs for SPARQL queries (may be null if none were set)
      Returns:
      Named graphs
    • getUsingGraphURIs

      public List<String> getUsingGraphURIs()
      Gets the default graphs for SPARQL updates (may be null if none were set)
      Returns:
      Default graphs
    • getUsingNamedGraphURIs

      public List<String> getUsingNamedGraphURIs()
      Gets the named graphs for SPARQL updates (may be null if none were set)
      Returns:
      Named graphs
    • getSelectResultsType

      public String getSelectResultsType()
      Gets the results type that will be requested from the remote endpoint for SELECT queries
      Returns:
      Select results type if set, otherwise null which indicates that the ARQ default will be used
    • getModelResultsType

      public String getModelResultsType()
      Gets the results type that will be requested from the remote endpoint for CONSTRUCT and DESCRIBE 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 interface Connection
      Specified by:
      isClosed in class JenaConnection
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface Connection
      Specified by:
      isReadOnly in class JenaConnection
    • isValid

      public boolean isValid(int timeout)
      Specified by:
      isValid in interface Connection
      Specified by:
      isValid in class JenaConnection
    • setReadOnly

      public void setReadOnly(boolean readOnly) throws SQLException
      Specified by:
      setReadOnly in interface Connection
      Specified by:
      setReadOnly in class JenaConnection
      Throws:
      SQLException
    • getMetaData

      public DatabaseMetaData getMetaData()
      Specified by:
      getMetaData in interface Connection
      Specified by:
      getMetaData in class JenaConnection