Examples of asDatasetGraph()


Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

   
    private static Store create(Model assem)
    {
        // Create a store and format
        Dataset ds = DatasetFactory.assemble(assem) ;
        Store store = ((DatasetStoreGraph)ds.asDatasetGraph()).getStore() ;
        store.getTableFormatter().create() ;
        return store ;
    }
   
    public static void main(String ... argv) throws SQLException
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

   
    private static void runQuery(String queryFile)
    {
        Store store = SDBFactory.connectStore("sdb.ttl") ;
        Dataset ds = SDBFactory.connectDataset(store) ;
        DatasetGraph dsg = ds.asDatasetGraph() ;
        Iterator<?> iter = dsg.listGraphNodes() ;
        for ( ; iter.hasNext() ; )
        {
            Object x = iter.next();
            System.out.println(x) ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

        String f = testDir + "/tdb.ttl" ;
        Object thing = AssemblerUtils.build( f, VocabTDB.tDatasetTDB) ;
        assertTrue(thing instanceof Dataset) ;
        Dataset ds = (Dataset)thing ;
        ds.asDatasetGraph() ;
        assertTrue(((Dataset)thing).asDatasetGraph() instanceof DatasetGraphTransaction) ;
       
        assertNotNull(LARQ.getDefaultIndex()) ;
       
        ds.close() ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

        if ( contains(assemblerDescDecl) )
        {
            log.info("Dataset from assembler") ;
            Dataset ds = modDataset.createDataset() ;
            if ( ds != null )
                dsg = ds.asDatasetGraph() ;
        }
       
        if ( contains(argFusekiConfig) )
        {
            if ( dsg != null )
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

        ResultSet rs = qExec.execSelect() ;
        while(rs.hasNext())
            rs.next();
        qExec.close() ;
       
        DatasetGraph dsg = ds.asDatasetGraph() ;
        Quad quad = SSE.parseQuad("(<g> <y> <p> 99)") ;
        dsg.add(quad) ;
       
        Iterator<Quad> iter = dsg.find() ;
        iter.hasNext() ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

   
    @Test(expected=ConcurrentModificationException.class)
    public void mrswSPARQL2()
    {
        Dataset ds = create();
        DatasetGraph dsg = ds.asDatasetGraph() ;
        Query query = QueryFactory.create("SELECT * { ?s ?p ?o}") ;
        QueryExecution qExec = QueryExecutionFactory.create(query, ds) ;
        ResultSet rs = qExec.execSelect() ;
        rs.hasNext() ;
        rs.next();
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

    @Test public void update3()
    {
        Dataset ds = TDBFactory.createDataset() ;
       
        ds.asDatasetGraph().getDefaultGraph().add(t1) ;
        ds.getNamedModel(graphName).getGraph().add(t1) ;
       
        Model m = ds.getDefaultModel() ;
        m.removeAll() ;
        assertEquals(0, m.size()) ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

    @Test public void update4()
    {
        Dataset ds = TDBFactory.createDataset() ;
       
        ds.asDatasetGraph().getDefaultGraph().add(t1) ;
        ds.getNamedModel(graphName).getGraph().add(t1) ;
       
        Model m = ds.getNamedModel(graphName) ;
        m.removeAll() ;
        assertEquals(0, m.size()) ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

   
    @Test public void dataset_01()
    {
        Dataset ds = createFixed() ;
        assertNotNull(ds.getDefaultModel()) ;
        assertNotNull(ds.asDatasetGraph()) ;
    }
   
    @Test public void dataset_02()
    {
        Dataset ds = createFixed() ;
View Full Code Here

Examples of com.hp.hpl.jena.query.Dataset.asDatasetGraph()

        Triple triple = SSE.parseTriple("(<x> <y> <z>)") ;
        Node gn = Node.createURI(graphName) ;

        Dataset ds = graphLocation.getDataset() ;
        // ?? See TupleLib.
        ds.asDatasetGraph().deleteAny(gn, null, null, null) ;
       
        Graph g2 = ds.asDatasetGraph().getGraph(gn) ;
       
//        if ( true )
//        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.