Class StorageBuilder
java.lang.Object
fr.inria.rules.integraal.storage.builder.StorageBuilder
This Builder creates storages for atoms according to the configuration
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a storage builder with default factories and strategy. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates and return the FactStorage associated to the current configurationConfigure this builder to clear the database at constructionstatic StorageBuilderReturns a builder configured with the default storage settings.static FactBaseThe default storage is aLightInMemoryGraphStorestatic DefaultInMemoryAtomSetReturns the default in-memory atom set implementation.static LightInMemoryGraphStoreReturns the light in-memory graph store implementation.static SimpleInMemoryGraphStoreReturns a simple in-memory graph store.Directly sets the RDBMS driver for this builder as given by the userDirectly sets the fact storage for this builder as given by the userDirectly sets the factory for predicates for this builder as given by the userDirectly sets the storage strategy for this builder as given by the userDirectly sets the factory for terms for this builder as given by the userConfigure this builder to use a AdHoc storage strategyConfigure this builder to use a AdHoc storage strategy with encodingConfigure this builder to use a HSQLDB driver with the given parametersuseMySQLDB(String params) Configure this builder to use a MySQL driver with the given parametersConfigure this builder to use a Natural SQL storage strategyusePostgreSQLDB(String params) Configure this builder to use a Postgres driver with the given parametersuseSPARQLEndpoint(String params) Configure this builder to use a SPARQL endpoint with the given parametersuseSQLiteDB(String params) Configure this builder to use a SQLite driver with the given parameters
-
Constructor Details
-
StorageBuilder
public StorageBuilder()Creates a storage builder with default factories and strategy.
-
-
Method Details
-
build
-
defaultBuilder
Returns a builder configured with the default storage settings.- Returns:
- a default configuration of the builder
-
defaultStorage
The default storage is aLightInMemoryGraphStore- Returns:
- the default storage used by Graal
-
getSimpleInMemoryGraphStore
Returns a simple in-memory graph store.- Returns:
- a new
SimpleInMemoryGraphStore
-
getLightInMemoryGraphStore
Returns the light in-memory graph store implementation.- Returns:
- a new
LightInMemoryGraphStore
-
getDefaultInMemoryAtomSet
Returns the default in-memory atom set implementation.- Returns:
- a new
DefaultInMemoryAtomSet
-
useHSQLDB
Configure this builder to use a HSQLDB driver with the given parameters- Parameters:
params- jdbc parameters- Returns:
- this object
-
useMySQLDB
Configure this builder to use a MySQL driver with the given parameters- Parameters:
params- jdbc parameters- Returns:
- this object
-
usePostgreSQLDB
Configure this builder to use a Postgres driver with the given parameters- Parameters:
params- jdbc parameters- Returns:
- this object
-
clearDBOnConstruction
Configure this builder to clear the database at construction- Returns:
- this object
-
useSQLiteDB
Configure this builder to use a SQLite driver with the given parameters- Parameters:
params- jdbc parameters- Returns:
- this object
-
useSPARQLEndpoint
Configure this builder to use a SPARQL endpoint with the given parameters- Parameters:
params- rdf4j parameters, null for memory store- Returns:
- this object
-
useAdHocSQLStrategy
Configure this builder to use a AdHoc storage strategy- Returns:
- this object
-
useEncodingAdHocSQLStrategy
Configure this builder to use a AdHoc storage strategy with encoding- Returns:
- this object
-
useNaturalSQLStrategy
Configure this builder to use a Natural SQL storage strategy- Returns:
- this object
-
setTermFactory
Directly sets the factory for terms for this builder as given by the user- Parameters:
f- the term factory- Returns:
- this object
-
setPredicateFactory
Directly sets the factory for predicates for this builder as given by the user- Parameters:
f- the predicate factory- Returns:
- this object
-
setDriver
Directly sets the RDBMS driver for this builder as given by the user- Parameters:
d- the rdbms driver- Returns:
- this object
-
setStorageStrategy
Directly sets the storage strategy for this builder as given by the user- Parameters:
s- the rdbms storage strategy- Returns:
- this object
-
setFactBase
Directly sets the fact storage for this builder as given by the user- Parameters:
f- the factbase- Returns:
- this object
-