java.lang.Object
org.apache.jena.tdb.TDBFactory
Public factory for creating objects datasets backed by TDB storage
-
Method Summary
Modifier and TypeMethodDescriptionstatic DatasetassembleDataset(String assemblerFile) Read the file and assembler a datasetstatic DatasetCreate or connect to a TDB dataset backed by an in-memory block manager.static DatasetcreateDataset(String dir) Create or connect to a TDB-backed datasetstatic DatasetcreateDataset(org.apache.jena.tdb.base.file.Location location) Create or connect to a TDB-backed datasetstatic DatasetGraphCreate a TDB-backed dataset (graph-level) in memory (for testing)static DatasetGraphcreateDatasetGraph(String directory) Create or connect to a TDB-backed dataset (graph-level)static DatasetGraphcreateDatasetGraph(org.apache.jena.tdb.base.file.Location location) Create or connect to a TDB-backed dataset (graph-level)static booleaninUseLocation(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 booleaninUseLocation(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 booleanTest whether a dataset is backed by TDB.static booleanisTDB1(DatasetGraph datasetGraph) Test whether a dataset is backed by TDB.static org.apache.jena.tdb.base.file.LocationReturn the location of a dataset if it is backed by TDB, else nullstatic org.apache.jena.tdb.base.file.Locationlocation(DatasetGraph datasetGraph) Return the location of a DatasetGraph if it is backed by TDB, else nullstatic voidRelease from the JVM.static voidrelease(DatasetGraph dataset) Release from the JVM.static voidsetup(org.apache.jena.tdb.base.file.Location location, org.apache.jena.tdb.setup.StoreParams params) Set theStoreParamsfor 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 theStoreParamsfor specific Location. This call must only be called before a dataset from Location is created. This operation should be used with care; bad choices ofStoreParamscan reduce performance. See documentation.- Parameters:
location- The persistent storage locationparams- StoreParams to use- Throws:
IllegalStateException- If the dataset has already been setup.
-