Class TDB2Factory

java.lang.Object
org.apache.jena.tdb2.TDB2Factory

public class TDB2Factory extends Object
Public factory for connecting to and creating datasets backed by TDB2 storage.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.jena.query.Dataset
    assembleDataset(String assemblerFile)
    Read the file and assemble a dataset
    static org.apache.jena.query.Dataset
    Create or connect to a TDB2-backed dataset
    static org.apache.jena.query.Dataset
    connectDataset(org.apache.jena.dboe.base.file.Location location)
    Create or connect to a TDB2-backed dataset
    static org.apache.jena.query.Dataset
    Create an in-memory TDB2-backed dataset (for testing).
    static boolean
    isTDB2(org.apache.jena.query.Dataset dataset)
    Test whether a dataset is backed by TDB or not.
    static org.apache.jena.dboe.base.file.Location
    location(org.apache.jena.query.Dataset dataset)
    Return the location of a dataset if it is backed by TDB, else null

    Methods inherited from class java.lang.Object

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

    • connectDataset

      public static org.apache.jena.query.Dataset connectDataset(org.apache.jena.dboe.base.file.Location location)
      Create or connect to a TDB2-backed dataset
    • connectDataset

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

      public static org.apache.jena.query.Dataset createDataset()
      Create an in-memory TDB2-backed dataset (for testing). In-memory TDB2 datasets are use a simple simulation of disk I/O to give exact semantics, which is useful to create tests that run fast where setup and teardown of datasets can be the major cost.

      In-memory TDB2 datasets are not designed to scale, nor provide efficient execution for applications for long-term use.

    • assembleDataset

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

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

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