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

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


        // This tests that the dataset is sync'ed when going into transactional mode.
       
        boolean nonTxnData = true ;
       
        StoreConnection sConn = getStoreConnection() ;
        Location loc = sConn.getLocation() ;
        DatasetGraph dsg = sConn.getBaseDataset() ;
        if ( nonTxnData )
        {
            dsg.add(q) ;
            TDB.sync(dsg) ;
View Full Code Here


        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

    @Test public void persistent1()
    {
        String dir = ConfigTest.getTestingDir() ;
        FileOps.clearDirectory(dir) ;
       
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
       
        String x = pmap1.getNsPrefixURI("x") ;
        assertNull(x) ;
        prefixes.close();
View Full Code Here

    @Test public void persistent2()
    {
        String dir = ConfigTest.getTestingDir() ;
        FileOps.clearDirectory(dir) ;
       
        DatasetPrefixesTDB prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        PrefixMapping pmap1 = prefixes.getPrefixMapping() ;
       
        pmap1.setNsPrefix("x", "http://foo/") ;
        prefixes.close() ;
       
        prefixes = DatasetPrefixesTDB.create(new Location(dir), new DatasetControlMRSW()) ;
        assertEquals("http://foo/", pmap1.getNsPrefixURI("x")) ;
        prefixes.close();
    }
View Full Code Here

    public static DatasetGraphTDB _createDatasetGraph(Location loc)
    { return factory.createDatasetGraph(loc) ; }
   
    public static DatasetGraphTDB _createDatasetGraph(String loc)
    { return _createDatasetGraph(new Location(loc)) ; }
View Full Code Here

        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

    @Before public void before()
    {  
      String dirname = nonDeleteableMMapFiles ? ConfigTest.getTestingDirUnique() : ConfigTest.getTestingDir() ;
    FileOps.ensureDir(dirname) ;
    FileOps.clearDirectory(dirname) ;
    graphLocation = new GraphLocation(new Location(dirname)) ;
        graphLocation.createDataset() ;
    }
View Full Code Here

    static int count = 0 ;
   
    @Before public void before()
    {
      String dir = nonDeleteableMMapFiles ? ConfigTest.getTestingDirUnique() : ConfigTest.getTestingDir() ;
      loc = new Location(dir) ;
      FileOps.clearDirectory(loc.getDirectoryPath()) ;
    }
View Full Code Here

    static GraphLocation graphLocation = null ;
   
    @BeforeClass public static void beforeClass()
    {
        StoreConnection.reset() ;
        graphLocation = new GraphLocation(new Location(ConfigTest.getTestingDirDB())) ;
        graphLocation.release() ;
        graphLocation.clearDirectory() ;
        graphLocation.createGraph() ;
        graph = graphLocation.getGraph() ;
    }
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.