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

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


        if ( !super.contains(argLocation) ) throw new CmdException("Required: --loc DIR") ;
//        if ( !super.contains(argTriplesOut) ) throw new CmdException("Required: --triples FILE") ;
//        if ( !super.contains(argQuadsOut) ) throw new CmdException("Required: --quads FILE") ;
       
        locationString   = super.getValue(argLocation) ;
        location = new Location(locationString) ;

        dataFileTriples  = super.getValue(argTriplesOut) ;
        if ( dataFileTriples == null )
            dataFileTriples = location.getPath("triples", "tmp") ;
       
View Full Code Here


public class TDBMakerTxn
{
    /** Create a DatasetGraph that supports transactions */ 
    public static DatasetGraphTransaction createDatasetGraph(String location)
    {
        return createDatasetGraph(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

   
    // ---- 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

        if ( dsg instanceof DatasetGraphTxn )
        {
            //((DatasetGraphTxn)dsg).getTransaction().getBaseDataset() ;
            throw new TDBTransactionException("Can't make a StoreConnection from a transaction instance - need the base storage DatasetGraphTDB") ;
        }
        Location location = dsg.getLocation() ;
       
        StoreConnection sConn = cache.get(location) ;
        if ( sConn == null )
            sConn = _makeAndCache(dsg) ;
        return sConn ;
View Full Code Here

        return cache.get(location) ;
    }
   
    private static StoreConnection _makeAndCache(DatasetGraphTDB dsg)
    {
        Location location = dsg.getLocation() ;
        TDBMaker.releaseLocation(dsg.getLocation()) ;
        StoreConnection sConn = cache.get(location) ;
        if ( sConn == null )
        {
            sConn = new StoreConnection(dsg) ;
            JournalControl.recoverFromJournal(dsg, sConn.transactionManager.getJournal()) ;
            if ( ! location.isMemUnique() )
                // Don't cache use-once in-memory datasets.
                cache.put(location, sConn) ;
            String NS = TDB.PATH ;
            TransactionInfo txInfo = new TransactionInfo(sConn.getTransMgr()) ;
            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

        }
    }
   
    private static Journal findJournal(DatasetGraphTDB dsg)
    {
        Location loc = dsg.getLocation() ;
        String journalFilename = loc.absolute(Names.journalFile) ;
        File f = new File(journalFilename) ;
        //if ( FileOps.exists(journalFilename)
       
        if ( f.exists() && f.isFile() && f.length() > 0 )
            return Journal.create(loc) ;
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.