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

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


        String locationStr2 = argv[2] ;
        String indexName2 = argv[3] ;
       
        // Argument processing
       
        Location location1 = new Location(locationStr1) ;
        Location location2 = new Location(locationStr2) ;
       
        int keyLength = SystemTDB.SizeOfNodeId * indexName1.length() ;
        int valueLength = 0 ;
       
        // The name is the order.
View Full Code Here


           
        String dataFile = argv[2] ;
       
        // Argument processing
       
        Location location = new Location(locationStr) ;
       
        //InputStream input = System.in ;
        InputStream input = IO.openFile(dataFile) ;
       
        int keyLength = SystemTDB.SizeOfNodeId * indexName.length() ;
View Full Code Here

        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

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

        final Dataset ds ;
       
        if ( locationDir != null )
        {
            Location location = new Location(locationDir) ;
            ds = TDBFactory.createDataset(location) ;
        }
        else
            ds = DatasetAssemblerTDB.make(dataset) ;
View Full Code Here

    static Dataset make(Resource root) {
        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() ;
            NodeValue nv = NodeValue.makeNode(b) ;
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

//                                            int dftKeyLength, int dftValueLength,
//                                            int readCacheSize,int writeCacheSize)
   
    public static void dumpNodeIndex(String dir)
    {
        Location location = new Location(dir) ;
        Index nodeToId = SetupTDB.makeIndex(location,  Names.indexNode2Id, SystemTDB.LenNodeHash, SystemTDB.SizeOfNodeId, -1 ,-1) ;
        Iterator<Record> iter = nodeToId.iterator() ;
        while(iter.hasNext())
        {
            System.out.println(iter.next()) ;
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

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.