Package com.hp.hpl.jena.tdb.base.file

Examples of com.hp.hpl.jena.tdb.base.file.Location


        LOCATIONS.add(createLocation()) ;
    }

    private static int count_datasets = 0 ;
    static Location createLocation() {
      return MEM ? Location.mem() : new Location(ConfigTest.getTestingDirDB() + File.separator + "DB-" + ++count_datasets) ;
    }
View Full Code Here


    static public void run(String location)
    {
        if ( false )
        {
            Journal journal = Journal.create(new Location(location)) ;
            JournalControl.print(journal) ;
            journal.close() ;
        }
        //String location = args[0]; // + "/" + UUID.randomUUID().toString();
View Full Code Here

            if(!modelLocation.mkdirs()){
                throw new IllegalArgumentException("Unable to create the configured RDF model directory "+
                    modelLocation+"!");
            }
        }
        Location location = new Location(modelLocation.getAbsolutePath());
        //TODO: change this to support transactions
        //    TDBMaker.createDatasetGraphTransaction(location);
        //  if we need transaction support!
        return TDBMaker.createDatasetGraphTDB(location);
    }
View Full Code Here

    // ---- statics managing the cache.
    /** Obtain a StoreConenction for a particular location */
    public static StoreConnection make(String location)
    {
        return make(new Location(location)) ;
    }
View Full Code Here

        return cache.get(location) ;
    }

    private static StoreConnection _makeAndCache(DatasetGraphTDB dsg)
    {
        Location location = dsg.getLocation() ;
        StoreConnection sConn = cache.get(location) ;
        if (sConn == null)
        {
            sConn = new StoreConnection(dsg) ;
            boolean actionTaken = JournalControl.recoverFromJournal(dsg.getConfig(), sConn.transactionManager.getJournal()) ;
           
            if ( false && actionTaken )
            {
                // This should be unnecessary because we wrote the journal replay
                // via the DSG storage configuration. 
                sConn.transactionManager.closedown() ;
                sConn.baseDSG.close() ;
                dsg = DatasetBuilderStd.build(location) ;
                sConn = new StoreConnection(dsg) ;
            }
           
            if (!location.isMemUnique())
                // Don't cache use-once in-memory datasets.
                cache.put(location, sConn) ;
            String NS = TDB.PATH ;
            TransactionInfo txInfo = new TransactionInfo(sConn.transactionManager) ;
            ARQMgt.register(NS + ".system:type=Transactions", txInfo) ;
View Full Code Here

        return (Dataset)AssemblerUtils.build(assemblerFile, VocabTDB.tDatasetTDB) ;
    }
   
    /** Create or connect to a TDB-backed dataset */
    public static Dataset createDataset(String dir)
    { return createDataset(new Location(dir)) ; }
View Full Code Here

    //    public static Graph createNamedGraph(String name)
    //    { return createDataset().getNamedModel(name) ; }

    /** Create or connect to a TDB-backed dataset (graph-level) */
    public static DatasetGraph createDatasetGraph(String directory)
    { return createDatasetGraph(new Location(directory)) ; }
View Full Code Here

     * @deprecated Create a DatasetGraph and use the default graph.
     */
    @Deprecated
    public static Graph createGraph(String dir)
    {
        Location loc = new Location(dir) ;
        return createGraph(loc) ;
    }
View Full Code Here

    return _InternalInstance;
  }
 
  public void createRepository() {
   
    Location location = new Location(ServletContextParameterMap.getParameterValue(ContextParameter.USER_DIRECTORY_PATH) + this.TRIPLE_DATASET_REL_DIR);
    this.dataset = TDBFactory.createDataset(location);
//    TDB.getContext().set(TDB.symUnionDefaultGraph, true);
  }
View Full Code Here

    /**
     * Cleans up resources used to avoid process memory leaks
     */
    @After
    public void cleanupTest() {
        StoreConnection.expel(new Location(tempDir.getRoot().getAbsolutePath()), true);
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.tdb.base.file.Location

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.