Class NeptuneSparqlRepository

  • All Implemented Interfaces:
    org.eclipse.rdf4j.http.client.HttpClientDependent, org.eclipse.rdf4j.http.client.SesameClientDependent, org.eclipse.rdf4j.http.client.SessionManagerDependent, org.eclipse.rdf4j.repository.Repository

    public class NeptuneSparqlRepository
    extends org.eclipse.rdf4j.repository.sparql.SPARQLRepository
    SPARQL repository for connecting to Neptune instances. The repository supports both unauthenticated connections as well as IAM using Signature V4 auth (https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html). There are two constructors, one for unauthenticated and one for authenticated connections.
    Author:
    schmdtm
    • Field Summary

      • Fields inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository

        logger
    • Constructor Summary

      Constructors 
      Constructor Description
      NeptuneSparqlRepository​(String endpointUrl)
      Set up a NeptuneSparqlRepository with V4 signing disabled.
      NeptuneSparqlRepository​(String endpointUrl, com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider, String regionName)
      Set up a NeptuneSparqlRepository with V4 signing enabled.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void initAuthenticatingHttpClient()
      Wrap the HTTP client to do Signature V4 signing using Apache HTTP's interceptor mechanism.
      • Methods inherited from class org.eclipse.rdf4j.repository.sparql.SPARQLRepository

        createHTTPClient, createSPARQLProtocolSession, enableQuadMode, getAdditionalHttpHeaders, getConnection, getDataDir, getHttpClient, getHttpClientSessionManager, getPassThroughEnabled, getValueFactory, initializeInternal, isWritable, setAdditionalHttpHeaders, setDataDir, setHttpClient, setHttpClientSessionManager, setPassThroughEnabled, setUsernameAndPassword, shutDownInternal, toString
      • Methods inherited from class org.eclipse.rdf4j.repository.base.AbstractRepository

        init, initialize, isInitialized, shutDown
      • Methods inherited from interface org.eclipse.rdf4j.http.client.SesameClientDependent

        getSesameClient, setSesameClient
    • Constructor Detail

      • NeptuneSparqlRepository

        public NeptuneSparqlRepository​(String endpointUrl)
        Set up a NeptuneSparqlRepository with V4 signing disabled.
        Parameters:
        endpointUrl - the prefix of the Neptune endpoint (without "/sparql" suffix)
      • NeptuneSparqlRepository

        public NeptuneSparqlRepository​(String endpointUrl,
                                       com.amazonaws.auth.AWSCredentialsProvider awsCredentialsProvider,
                                       String regionName)
                                throws com.amazonaws.neptune.auth.NeptuneSigV4SignerException
        Set up a NeptuneSparqlRepository with V4 signing enabled.
        Parameters:
        awsCredentialsProvider - the credentials provider used for authentication
        endpointUrl - the prefix of the Neptune endpoint (without "/sparql" suffix)
        regionName - name of the region in which Neptune is running
        Throws:
        com.amazonaws.neptune.auth.NeptuneSigV4SignerException - in case something goes wrong with signer initialization
    • Method Detail

      • initAuthenticatingHttpClient

        protected void initAuthenticatingHttpClient()
                                             throws com.amazonaws.neptune.auth.NeptuneSigV4SignerException
        Wrap the HTTP client to do Signature V4 signing using Apache HTTP's interceptor mechanism.
        Throws:
        com.amazonaws.neptune.auth.NeptuneSigV4SignerException - in case something goes wrong with signer initialization