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

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


    @AfterClass public static void afterClassLoggingOn()    { LogCtl.setInfo(SystemTDB.errlog.getName()) ; }
   
    @Before public void before()
    {
        DIR = ConfigTest.getCleanDir() ;
        StoreConnection.release(new Location(DIR)) ;
    }
View Full Code Here


    @Test
    public void store_5()
    {
        // No transaction.  Make sure StoreConnection.release cleans up OK. 
        StoreConnection sConn = getStoreConnection() ;
        Location loc = sConn.getLocation() ;
        DatasetGraph dsg = sConn.getBaseDataset() ;
        dsg.add(q) ;
        assertTrue(dsg.contains(q)) ;
       
        StoreConnection.release(loc) ;
View Full Code Here

    {
        // Transaction - release - reattach
        // This tests that the dataset is sync'ed when going into transactional mode.
       
        StoreConnection sConn = getStoreConnection() ;
        Location loc = sConn.getLocation() ;

        DatasetGraphTxn dsgTxn = sConn.begin(ReadWrite.WRITE) ;

        dsgTxn.add(q1) ;
        assertTrue(dsgTxn.contains(q1)) ;
View Full Code Here

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

    static GraphLocation graphLocation = null ;
   
    @BeforeClass public static void beforeClass()
    {
        StoreConnection.reset() ;
        graphLocation = new GraphLocation(new Location(ConfigTest.getCleanDir())) ;
        graphLocation.release() ;
        graphLocation.clearDirectory() ;
        graphLocation.createGraph() ;
        graph = graphLocation.getGraph() ;
    }
View Full Code Here

    static int count = 0 ;
   
    @Before public void before()
    {
      String dir = ConfigTest.getCleanDir() ;
      loc = new Location(dir) ;
    }
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

        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 Run2 {

    public static void main(String[] args) {
        String path = "target/tdb";
        FileOps.clearDirectory( path );
        Location location = new Location ( path );
        Dataset dataset = TDBFactory.createDataset ( location );
        dataset.begin ( ReadWrite.WRITE );
        try {
            DatasetGraph dsg = dataset.asDatasetGraph();
            DatasetGraph dsg2 = RiotLoader.datasetFromString("<http://example/org> <http://www.w3.org/2000/01/rdf-schema#label> \"Hello \n World!\" .", Lang.TURTLE, null);
View Full Code Here

            args = new String[] { "--loc", output, input };
        }

        tdbloader3.main(args);

        Location location = new Location(output);
        DatasetGraph dsgDisk = TDBFactory.createDatasetGraph(location);
       
        assertTrue ( dump(dsgtMem, dsgDisk), isomorphic ( dsgtMem, dsgDisk ) );
    }
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.