Package com.hp.hpl.jena.sparql.core

Examples of com.hp.hpl.jena.sparql.core.DatasetGraph


    {
        Node withGraph = update.getWithIRI() ;
        Query query = elementToQuery(update.getWherePattern()) ;
       
        // USING/USING NAMED
        DatasetGraph dsg = processUsing(update, query) ;
       
        // USING overrides WITH
        if ( dsg == null && withGraph != null )
        {
            //Graph g = graphStore.getGraph(withGraph) ;
View Full Code Here


        return evalBindings(elementToQuery(pattern), dftGraph) ;
    }
   
    protected Iterator<Binding> evalBindings(Query query, Node dftGraph)
    {
        DatasetGraph dsg = graphStore ;
        if ( query != null )
        {
            if ( dftGraph != null )
            {
                Graph g = dsg.getGraph(dftGraph) ;
                dsg = new DatasetGraphAltDefaultGraph(dsg, g) ;
            }
        }
       
        return evalBindings(query, dsg, initialBinding, context) ;
View Full Code Here

    }
   
    @Test public void testTDBFactory1()
    {
        TDBFactory.reset() ;
        DatasetGraph dg1 = TDBFactory.createDatasetGraph(Location.mem("FOO")) ;
        DatasetGraph dg2 = TDBFactory.createDatasetGraph(Location.mem("FOO")) ;
        dg1.add(quad1) ;
        assertTrue(dg2.contains(quad1)) ;
    }
View Full Code Here

   
    @Test public void testTDBFactory2()
    {
        TDBFactory.reset() ;
        // The unnamed location is unique each time.
        DatasetGraph dg1 = TDBFactory.createDatasetGraph(Location.mem()) ;
        DatasetGraph dg2 = TDBFactory.createDatasetGraph(Location.mem()) ;
        dg1.add(quad1) ;
        assertFalse(dg2.contains(quad1)) ;
    }
View Full Code Here

    }

    @Test public void testTDBMakerTxn1()
    {
        TDBMakerTxn.reset() ;
        DatasetGraph dg1 = TDBMakerTxn.createDatasetGraph(DIR) ;
        DatasetGraph dg2 = TDBMakerTxn.createDatasetGraph(DIR) ;
       
        DatasetGraph dgBase1 = ((DatasetGraphTransaction)dg1).getBaseDatasetGraph() ;
        DatasetGraph dgBase2 = ((DatasetGraphTransaction)dg2).getBaseDatasetGraph() ;
       
        assertSame(dgBase1, dgBase2) ;
    }
View Full Code Here

    }
   
    @Test public void testTDBMakerTxn2()
    {
        TDBMakerTxn.reset() ;
        DatasetGraph dg1 = TDBMakerTxn.createDatasetGraph(Location.mem("FOO")) ;
        DatasetGraph dg2 = TDBMakerTxn.createDatasetGraph(Location.mem("FOO")) ;
       
        DatasetGraph dgBase1 = ((DatasetGraphTransaction)dg1).getBaseDatasetGraph() ;
        DatasetGraph dgBase2 = ((DatasetGraphTransaction)dg2).getBaseDatasetGraph() ;
       
        assertSame(dgBase1, dgBase2) ;
    }
View Full Code Here

    }
   
    @Test public void testTDBMaker1()
    {
        TDBMaker.reset() ;
        DatasetGraph dg1 = TDBMaker._createDatasetGraph(Location.mem()) ;
        DatasetGraph dg2 = TDBMaker._createDatasetGraph(Location.mem()) ;
        assertSame(dg1, dg2) ;
    }
View Full Code Here

    }
   
    @Test public void testTDBMaker2()
    {
        TDBMaker.reset() ;
        DatasetGraph dg1 = TDBMaker._createDatasetGraph(DIR) ;
        DatasetGraph dg2 = TDBMaker._createDatasetGraph(DIR) ;
        assertSame(dg1, dg2) ;
    }
View Full Code Here

       
        DatasetGraphTxn dsg2 = sConn.begin(ReadWrite.READ) ;
        assertTrue(dsg2.contains(q)) ;
        dsg2.end() ;
       
        DatasetGraph dsg = sConn.getBaseDataset() ;
        assertTrue(dsg.contains(q)) ;
       
    }
View Full Code Here

       
        DatasetGraphTxn dsg2 = sConn.begin(ReadWrite.READ) ;
        assertFalse(dsg2.contains(q)) ;
        dsg2.end() ;
       
        DatasetGraph dsg = sConn.getBaseDataset() ;
        assertFalse(dsg.contains(q)) ;
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.core.DatasetGraph

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.