Examples of asDatasetGraph()


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

        assertTrue(ds.containsNamedModel(graphName)) ;
        List<String> x = Iter.toList(ds.listNames()) ;
        List<String> y = Arrays.asList(graphName) ;
        assertEquals(x,y) ;
       
        assertEquals(1, ds.asDatasetGraph().size()) ;
    }
}
View Full Code Here

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

        // Assumes a single test dataset description in the assembler file.
        Dataset ds = TextDatasetFactory.create(file) ;
        if (ds == null)
            throw new CmdException("No dataset description found") ;
        // get index.
        dataset = (DatasetGraphText)(ds.asDatasetGraph()) ;
        textIndex = dataset.getTextIndex() ;
        if (textIndex == null)
            throw new CmdException("Dataset has no text index") ;
        entityDefinition = textIndex.getDocDef() ;
    }
View Full Code Here

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

        Store store = SDBFactory.connectStore("Store/sdb-hsqldb-mem.ttl") ;
        store.getTableFormatter().format() ;
        store.getTableFormatter().addIndexes() ;
       
        Dataset ds = SDBFactory.connectDataset(store) ;
        DatasetGraph dsg = ds.asDatasetGraph() ;
        Quad quad = SSE.parseQuad("(<g> <s> <p> <o>)") ;
        dsg.add(quad) ;
        System.out.println("DONE") ;
        System.exit(0) ;
    }
View Full Code Here

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

            System.out.println(displayname+" : "+format) ;
            System.out.println(s) ;
            throw ex ;
        }
       
        boolean b = IsoMatcher.isomorphic(ds.asDatasetGraph(), ds2.asDatasetGraph()) ;
        if ( ! b ) {
            System.out.println("Test: "+format.toString()) ;
            System.out.println("-- Input") ;
            RDFDataMgr.write(System.out, ds.asDatasetGraph(), Lang.NQUADS ) ;
            System.out.println("-- Written") ;
View Full Code Here

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

            RDFDataMgr.write(System.out, ds.asDatasetGraph(), Lang.NQUADS ) ;
            System.out.println("-- Written") ;
            System.out.println(s);
            System.out.println();
            System.out.println("-- Seen as") ;
            RDFDataMgr.write(System.out, ds2.asDatasetGraph(), Lang.NQUADS ) ;
            System.out.println("-------------") ;
        }
       
        assertTrue("Datasets are not isomorphic", b) ;
        //**** Test ds2 iso ds
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()

    private void createTest(String filename, Resource type)
    {
        Object thing = AssemblerUtils.build(filename, type) ;
        assertTrue(thing instanceof Dataset) ;
        Dataset ds = (Dataset)thing ;
        assertTrue(ds.asDatasetGraph() instanceof DatasetGraphTransaction) ;
        assertTrue(ds.supportsTransactions()) ;
        ds.close();
       
    }
View Full Code Here

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

        Triple triple = SSE.parseTriple("(<x> <y> <z>)") ;
        Node gn = com.hp.hpl.jena.graph.NodeFactory.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

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

        Dataset ds = graphLocation.getDataset() ;
        // ?? See TupleLib.
        ds.asDatasetGraph().deleteAny(gn, null, null, null) ;
       
        Graph g2 = ds.asDatasetGraph().getGraph(gn) ;
       
//        if ( true )
//        {
//            PrintStream ps = System.err ;
//            ps.println("Dataset names: ") ;
View Full Code Here

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

        // Graphs only exists if they have a triple in them
        assertFalse(ds.containsNamedModel(graphName)) ;
       
        List<String> names = Iter.toList(ds.listNames()) ;
        assertEquals(0, names.size()) ;
        assertEquals(0, ds.asDatasetGraph().size()) ;
    }
   
    @Test public void dataset5()
    {
        String graphName = "http://example/" ;
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.