java.lang.Object
org.apache.jena.tdb.TDBFactory
Public factory for creating objects datasets backed by TDB storage
-
Method Summary
Modifier and TypeMethodDescriptionstatic Dataset
assembleDataset
(String assemblerFile) Read the file and assembler a datasetstatic Dataset
Create or connect to a TDB dataset backed by an in-memory block manager.static Dataset
createDataset
(String dir) Create or connect to a TDB-backed datasetstatic Dataset
createDataset
(org.apache.jena.tdb.base.file.Location location) Create or connect to a TDB-backed datasetstatic DatasetGraph
Create a TDB-backed dataset (graph-level) in memory (for testing)static DatasetGraph
createDatasetGraph
(String directory) Create or connect to a TDB-backed dataset (graph-level)static DatasetGraph
createDatasetGraph
(org.apache.jena.tdb.base.file.Location location) Create or connect to a TDB-backed dataset (graph-level)static boolean
inUseLocation
(String directory) Test whether a location already has a TDB database or whether a call to TDBFactory will cause a new, fresh TDB database to be created (pragmatic tests).static boolean
inUseLocation
(org.apache.jena.tdb.base.file.Location location) Test whether a location already has a TDB database or whether a call to TDBFactory will cause a new, fresh TDB database to be created (pragmatic tests).static boolean
Test whether a dataset is backed by TDB.static boolean
isTDB1
(DatasetGraph datasetGraph) Test whether a dataset is backed by TDB.static org.apache.jena.tdb.base.file.Location
Return the location of a dataset if it is backed by TDB, else nullstatic org.apache.jena.tdb.base.file.Location
location
(DatasetGraph datasetGraph) Return the location of a DatasetGraph if it is backed by TDB, else nullstatic void
Release from the JVM.static void
release
(DatasetGraph dataset) Release from the JVM.static void
setup
(org.apache.jena.tdb.base.file.Location location, org.apache.jena.tdb.setup.StoreParams params) Set theStoreParams
for specific Location.
-
Method Details
-
assembleDataset
Read the file and assembler a dataset -
createDataset
Create or connect to a TDB-backed dataset -
createDataset
Create or connect to a TDB-backed dataset -
createDataset
Create or connect to a TDB dataset backed by an in-memory block manager. For testing. -
createDatasetGraph
Create or connect to a TDB-backed dataset (graph-level) -
createDatasetGraph
Create or connect to a TDB-backed dataset (graph-level) -
createDatasetGraph
Create a TDB-backed dataset (graph-level) in memory (for testing) -
release
Release from the JVM. All caching is lost. -
release
Release from the JVM. All caching is lost. -
isTDB1
Test whether a dataset is backed by TDB. -
isTDB1
Test whether a dataset is backed by TDB. -
location
Return the location of a dataset if it is backed by TDB, else null -
location
Return the location of a DatasetGraph if it is backed by TDB, else null -
inUseLocation
Test whether a location already has a TDB database or whether a call to TDBFactory will cause a new, fresh TDB database to be created (pragmatic tests). The directory may be empty, or not exist. Existing databases return "true". -
inUseLocation
public static boolean inUseLocation(org.apache.jena.tdb.base.file.Location location) Test whether a location already has a TDB database or whether a call to TDBFactory will cause a new, fresh TDB database to be created (pragmatic tests). The directory may be empty, or not exist. Existing databases return "true". -
setup
public static void setup(org.apache.jena.tdb.base.file.Location location, org.apache.jena.tdb.setup.StoreParams params) Set theStoreParams
for specific Location. This call must only be called before a dataset from Location is created. This operation should be used with care; bad choices ofStoreParams
can reduce performance. See documentation.- Parameters:
location
- The persistent storage locationparams
- StoreParams to use- Throws:
IllegalStateException
- If the dataset has already been setup.
-