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

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


        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) ;
            sConn.forceRecoverFromJournal() ;
//            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

        }

        @Override
        protected void exec()
        {
            Location location = getLocation() ;
            DatasetPrefixStorage prefixes = SetupTDB.makePrefixes(location, new DatasetControlNone()) ;
            for ( String gn : prefixes.graphNames() )
            {
                System.out.println("Graph: "+gn) ;
                PrefixMapping pmap = prefixes.getPrefixMapping(gn) ;
View Full Code Here

        {
            System.err.println("Usage: "+Utils.classShortName(CmdRewriteIndex.class)+" SrcLocation DstLocation IndexName") ;
            System.exit(1) ;
        }
       
        Location srcLoc = new Location(argv[0]) ;
        Location dstLoc = new Location(argv[1]) ;
        String indexName = argv[2] ;
       
        if ( ! FileOps.exists(argv[1]) )
        {
            System.err.println("Destination directory does not exist") ;
            System.exit(1) ;
        }
       
        if ( FileOps.exists(dstLoc.getPath(indexName, Names.bptExtTree)) )
        {
            System.err.println("Destination contains an index of that name") ;
            System.exit(1) ;
        }
       
View Full Code Here

    {
        if ( ! exactlyOneProperty(root, pLocation) )
            throw new AssemblerException(root, "No location given") ;

        String dir = getStringValue(root, pLocation) ;
        Location loc = new Location(dir) ;
        DatasetGraph dsg = TDBFactory.createDatasetGraph(loc) ;
       
        if ( root.hasProperty(pUnionDefaultGraph) )
        {
            Node b = root.getProperty(pUnionDefaultGraph).getObject().asNode() ;
View Full Code Here

    // This hides details from the top level TDB Factory
   
    /** Create a DatasetGraph that supports transactions */ 
    public static DatasetGraphTransaction createDatasetGraphTransaction(String location)
    {
        return createDatasetGraphTransaction(new Location(location)) ;
    }
View Full Code Here

    @Override
    protected void exec()
    {
        List<String> tripleIndexes = Arrays.asList(Names.tripleIndexes) ;
        List<String> quadIndexes = Arrays.asList(Names.quadIndexes) ;
        Location loc = modLocation.getLocation() ;
       
        // The name is the order.
        for ( String indexName : super.getPositional() )
        {
            String primary ;
View Full Code Here

        {
            System.err.println("Usage: "+Utils.classShortName(tdbgenindex.class)+" srcLocation srcIndex dstLocation dstIndex") ;
            System.exit(1) ;
        }
       
        Location srcLoc = new Location(argv[0]) ;
        String srcIndexName = argv[1] ;
       
        Location dstLoc = new Location(argv[2]) ;
        String dstIndexName = argv[3] ;
       
        int readCacheSize = 0 ;
        int writeCacheSize = -1 ;
       
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.