Class DifsFactory

java.lang.Object
org.aksw.difs.builder.DifsFactory

public class DifsFactory extends Object
Builder for a dataset-in-filesystem.
Author:
raven
  • Field Details

    • symbolicLinkStrategy

      protected org.aksw.commons.io.util.symlink.SymbolicLinkStrategy symbolicLinkStrategy
    • repoRootPath

      protected Path repoRootPath
    • configFileRelPath

      protected Path configFileRelPath
    • storeRelPath

      protected Path storeRelPath
    • indexRelPath

      protected Path indexRelPath
    • createIfNotExists

      protected boolean createIfNotExists
    • isParallel

      protected boolean isParallel
      Disable parallel streams for debugging purposes
    • storeDefinition

      protected StoreDefinition storeDefinition
    • maximumNamedGraphCacheSize

      protected long maximumNamedGraphCacheSize
    • useJournal

      protected boolean useJournal
    • random

      protected Random random
  • Constructor Details

    • DifsFactory

      public DifsFactory()
  • Method Details

    • newInstance

      public static DifsFactory newInstance()
    • isCreateIfNotExists

      public boolean isCreateIfNotExists()
    • setParallel

      public DifsFactory setParallel(boolean isParallel)
      Whether to use parallel streams. True by default.
    • setCreateIfNotExists

      public DifsFactory setCreateIfNotExists(boolean createIfNotExists)
    • setMaximumNamedGraphCacheSize

      public DifsFactory setMaximumNamedGraphCacheSize(long size)
    • listResources

      public static Stream<org.apache.jena.rdf.model.Resource> listResources(org.apache.jena.rdf.model.Model model, Collection<org.apache.jena.rdf.model.Property> properties)
    • loadStoreDefinition

      public StoreDefinition loadStoreDefinition(Path confFilePath) throws IOException
      Throws:
      IOException
    • loadIndexDefinition

      public DatasetGraphIndexerFromFileSystem loadIndexDefinition(IndexDefinition idxDef)
    • setUseJournal

      public DifsFactory setUseJournal(boolean useJournal)
    • isUseJournal

      public boolean isUseJournal()
    • setRepoRootPath

      public DifsFactory setRepoRootPath(Path repoRootPath)
    • getRepoRootPath

      public Path getRepoRootPath()
    • setConfigFile

      public DifsFactory setConfigFile(Path configFile)
    • getConfigFile

      public Path getConfigFile()
    • getStoreDefinition

      public StoreDefinition getStoreDefinition()
    • setStoreDefinition

      public DifsFactory setStoreDefinition(StoreDefinition storeDefinition)
    • setStoreDefinition

      public DifsFactory setStoreDefinition(Consumer<StoreDefinition> mutator)
      Create a fresh store definition resource (blank node) and pass it to the mutator
      Parameters:
      mutator -
      Returns:
    • addIndex

      public DatasetGraphIndexerFromFileSystem addIndex(org.apache.jena.graph.Node predicate, String name, Function<org.apache.jena.graph.Node,String[]> objectToPath) throws IOException
      Throws:
      IOException
    • getSymbolicLinkStrategy

      public org.aksw.commons.io.util.symlink.SymbolicLinkStrategy getSymbolicLinkStrategy()
    • setSymbolicLinkStrategy

      public DifsFactory setSymbolicLinkStrategy(org.aksw.commons.io.util.symlink.SymbolicLinkStrategy symlinkStrategy)
    • getConfigFilePath

      protected Path getConfigFilePath()
    • createEffectiveStoreDefinition

      public StoreDefinition createEffectiveStoreDefinition() throws IOException
      Throws:
      IOException
    • createTxnMgr

      public org.aksw.commons.txn.api.TxnMgr createTxnMgr() throws IOException
      Throws:
      IOException
    • createTxnMgr

      public org.aksw.commons.txn.api.TxnMgr createTxnMgr(StoreDefinition effStoreDef) throws IOException
      Throws:
      IOException
    • connectAsDataset

      public org.apache.jena.query.Dataset connectAsDataset() throws IOException
      Throws:
      IOException
    • connect

      public org.apache.jena.sparql.core.DatasetGraph connect() throws IOException
      Throws:
      IOException