Package org.apache.jena.tdb
Class TDBFactory
- java.lang.Object
-
- org.apache.jena.tdb.TDBFactory
-
public class TDBFactory extends java.lang.ObjectPublic factory for creating objects datasets backed by TDB storage
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DatasetassembleDataset(java.lang.String assemblerFile)Read the file and assembler a datasetstatic DatasetcreateDataset()Create or connect to a TDB dataset backed by an in-memory block manager.static DatasetcreateDataset(java.lang.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 DatasetGraphcreateDatasetGraph()Create a TDB-backed dataset (graph-level) in memory (for testing)static DatasetGraphcreateDatasetGraph(java.lang.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(java.lang.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 booleanisTDB1(Dataset dataset)Test 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.Locationlocation(Dataset dataset)Return 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(Dataset dataset)Release 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 Detail
-
assembleDataset
public static Dataset assembleDataset(java.lang.String assemblerFile)
Read the file and assembler a dataset
-
createDataset
public static Dataset createDataset(java.lang.String dir)
Create or connect to a TDB-backed dataset
-
createDataset
public static Dataset createDataset(org.apache.jena.tdb.base.file.Location location)
Create or connect to a TDB-backed dataset
-
createDataset
public static Dataset createDataset()
Create or connect to a TDB dataset backed by an in-memory block manager. For testing.
-
createDatasetGraph
public static DatasetGraph createDatasetGraph(java.lang.String directory)
Create or connect to a TDB-backed dataset (graph-level)
-
createDatasetGraph
public static DatasetGraph createDatasetGraph(org.apache.jena.tdb.base.file.Location location)
Create or connect to a TDB-backed dataset (graph-level)
-
createDatasetGraph
public static DatasetGraph createDatasetGraph()
Create a TDB-backed dataset (graph-level) in memory (for testing)
-
release
public static void release(Dataset dataset)
Release from the JVM. All caching is lost.
-
release
public static void release(DatasetGraph dataset)
Release from the JVM. All caching is lost.
-
isTDB1
public static boolean isTDB1(Dataset dataset)
Test whether a dataset is backed by TDB.
-
isTDB1
public static boolean isTDB1(DatasetGraph datasetGraph)
Test whether a dataset is backed by TDB.
-
location
public static org.apache.jena.tdb.base.file.Location location(Dataset dataset)
Return the location of a dataset if it is backed by TDB, else null
-
location
public static org.apache.jena.tdb.base.file.Location location(DatasetGraph datasetGraph)
Return the location of a DatasetGraph if it is backed by TDB, else null
-
inUseLocation
public static boolean inUseLocation(java.lang.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). 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:
java.lang.IllegalStateException- If the dataset has already been setup.
-
-