Class TDB2Factory


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Dataset assembleDataset​(java.lang.String assemblerFile)
      Read the file and assemble a dataset
      static Dataset connectDataset​(java.lang.String location)
      Create or connect to a TDB2-backed dataset
      static Dataset connectDataset​(org.apache.jena.dboe.base.file.Location location)
      Create or connect to a TDB2-backed dataset
      static Dataset createDataset()
      Create an in-memory TDB2-backed dataset (for testing).
      static boolean isTDB2​(Dataset dataset)
      Test whether a dataset is backed by TDB or not.
      static org.apache.jena.dboe.base.file.Location location​(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 Detail

      • connectDataset

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

        public static Dataset connectDataset​(java.lang.String location)
        Create or connect to a TDB2-backed dataset
      • createDataset

        public static 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 Dataset assembleDataset​(java.lang.String assemblerFile)
        Read the file and assemble a dataset
      • isTDB2

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

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