Class TDB1Factory

java.lang.Object
org.apache.jena.tdb1.TDB1Factory

public class TDB1Factory extends Object
Public factory for creating objects datasets backed by TDB storage
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.query.Dataset
    assembleDataset(String assemblerFile)
    Read the file and assembler a dataset
    static org.apache.jena.query.Dataset
    Create or connect to a TDB dataset backed by an in-memory block manager.
    static org.apache.jena.query.Dataset
    Create or connect to a TDB-backed dataset
    static org.apache.jena.query.Dataset
    Create or connect to a TDB-backed dataset
    static org.apache.jena.sparql.core.DatasetGraph
    Create a TDB-backed dataset (graph-level) in memory (for testing)
    static org.apache.jena.sparql.core.DatasetGraph
    Create or connect to a TDB-backed dataset (graph-level)
    static org.apache.jena.sparql.core.DatasetGraph
    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
    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
    isTDB1(org.apache.jena.query.Dataset dataset)
    Test whether a dataset is backed by TDB.
    static boolean
    isTDB1(org.apache.jena.sparql.core.DatasetGraph datasetGraph)
    Test whether a dataset is backed by TDB.
    static Location
    location(org.apache.jena.query.Dataset dataset)
    Return the location of a dataset if it is backed by TDB, else null
    static Location
    location(org.apache.jena.sparql.core.DatasetGraph datasetGraph)
    Return the location of a DatasetGraph if it is backed by TDB, else null
    static void
    release(org.apache.jena.query.Dataset dataset)
    Release from the JVM.
    static void
    release(org.apache.jena.sparql.core.DatasetGraph dataset)
    Release from the JVM.
    static void
    setup(Location location, StoreParams params)
    Set the StoreParams for specific Location.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • assembleDataset

      public static org.apache.jena.query.Dataset assembleDataset(String assemblerFile)
      Read the file and assembler a dataset
    • createDataset

      public static org.apache.jena.query.Dataset createDataset(String dir)
      Create or connect to a TDB-backed dataset
    • createDataset

      public static org.apache.jena.query.Dataset createDataset(Location location)
      Create or connect to a TDB-backed dataset
    • createDataset

      public static org.apache.jena.query.Dataset createDataset()
      Create or connect to a TDB dataset backed by an in-memory block manager. For testing.
    • createDatasetGraph

      public static org.apache.jena.sparql.core.DatasetGraph createDatasetGraph(String directory)
      Create or connect to a TDB-backed dataset (graph-level)
    • createDatasetGraph

      public static org.apache.jena.sparql.core.DatasetGraph createDatasetGraph(Location location)
      Create or connect to a TDB-backed dataset (graph-level)
    • createDatasetGraph

      public static org.apache.jena.sparql.core.DatasetGraph createDatasetGraph()
      Create a TDB-backed dataset (graph-level) in memory (for testing)
    • release

      public static void release(org.apache.jena.query.Dataset dataset)
      Release from the JVM. All caching is lost.
    • release

      public static void release(org.apache.jena.sparql.core.DatasetGraph dataset)
      Release from the JVM. All caching is lost.
    • isTDB1

      public static boolean isTDB1(org.apache.jena.query.Dataset dataset)
      Test whether a dataset is backed by TDB.
    • isTDB1

      public static boolean isTDB1(org.apache.jena.sparql.core.DatasetGraph datasetGraph)
      Test whether a dataset is backed by TDB.
    • location

      public static Location location(org.apache.jena.query.Dataset dataset)
      Return the location of a dataset if it is backed by TDB, else null
    • location

      public static Location location(org.apache.jena.sparql.core.DatasetGraph datasetGraph)
      Return the location of a DatasetGraph if it is backed by TDB, else null
    • inUseLocation

      public 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). The directory may be empty, or not exist. Existing databases return "true".
    • inUseLocation

      public static boolean inUseLocation(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(Location location, StoreParams params)
      Set the StoreParams 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 of StoreParams can reduce performance. See documentation.
      Parameters:
      location - The persistent storage location
      params - StoreParams to use
      Throws:
      IllegalStateException - If the dataset has already been setup.