Class StoreFactory


  • public class StoreFactory
    extends Object
    Provides factory methods to instantiate concrete implementations of Store that keep the triplestore information in various ways (RAM, disk, over the network).
    Since:
    0.16.0
    Version:
    $version-stub$
    Author:
    Andrew Berezovskyi (andriib@kth.se)
    • Constructor Detail

      • StoreFactory

        public StoreFactory()
    • Method Detail

      • inMemory

        @Deprecated
        public static Store inMemory()
        Deprecated.
        Initialise an in-memory Store implementation.

        Supports all SPARQL queries and TDB transactions.

        Returns:
        Store implementation that keeps triples in memory.
      • onDisk

        @Deprecated
        public static Store onDisk​(Path path)
                            throws IllegalArgumentException
        Deprecated.
        Initialise an on-disk Store implementation.

        Tries to open a triplestore under a given path and then initialise one if it doesn't exist. Will create the necessary directories.

        Parameters:
        path - Filesystem path where the Jena TDB files can be stored.
        Returns:
        Store implementation that keeps triples on disk.
        Throws:
        IllegalArgumentException - If the TDB cannot be initialised in a given directory.
      • sparql

        public static Store sparql​(String queryUrl,
                                   String updateUrl)
        Initialise a SPARQL-compatible Store implementation that does not require authentication.
        Parameters:
        queryUrl - SPARQL Query endpoint URI
        updateUrl - SPARQL Update endpoint URI
        Returns:
        Store implementation that communicates with the triplestore via SPARQL.
      • sparql

        public static Store sparql​(String queryUrl,
                                   String updateUrl,
                                   String username,
                                   String password)
        Initialise a SPARQL-compatible Store implementation with authentication via username and password combinations. Authentication works with the basic and digest HTTP authentication schemes.
        Parameters:
        queryUrl - SPARQL Query endpoint URI
        updateUrl - SPARQL Update endpoint URI
        username - Username
        password - Password
        Returns:
        Store implementation that communicates with the triplestore via SPARQL.