Examples of asDatasetGraph()


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

        RiotLoader.read("data2.trig", dsg) ;
       
        // Create a daatset,
        Dataset ds = DatasetFactory.create() ;
        // read in data.
        RiotLoader.read("data2.trig", ds.asDatasetGraph()) ;

    }
}

/*
 
View Full Code Here

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

   
    /** Example setup - in-memory dataset with two graphs, one triple in each */
    private static Dataset setup()
    {
        Dataset ds = TDBFactory.createDataset() ;
        DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
        Quad q1 = SSE.parseQuad("(<http://example/g1> <http://example/s> <http://example/p> <http://example/o1>)") ;
        Quad q2 = SSE.parseQuad("(<http://example/g2> <http://example/s> <http://example/p> <http://example/o2>)") ;
        dsg.add(q1) ;
        dsg.add(q2) ;
        return 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()

        // Check if it is in the model.
        if ( ! datasetDesc.hasProperty(RDF.type) )
            throw new FusekiConfigException("No rdf:type for dataset "+nodeLabel(datasetDesc)) ;
       
        Dataset ds = (Dataset)Assembler.general.open(datasetDesc;
        sDesc.dataset = ds.asDatasetGraph() ;
        return sDesc ;
       
    }
   
    private static RDFNode getOne(Resource svc, String property)
View Full Code Here

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

        // Check there is a dataset.
        if ( dataset == null )
            dataset = DatasetFactory.createMem() ;

        modTime.startTimer() ;
        DatasetGraph dsg = dataset.asDatasetGraph() ;

        if ( printOp || printPlan )
        {
            if ( printOp )
            {
View Full Code Here

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

   
    /** Example setup - in-memory dataset with two graphs, one triple in each */
    private static Dataset setup()
    {
        Dataset ds = TDBFactory.createDataset() ;
        DatasetGraphTDB dsg = (DatasetGraphTDB)(ds.asDatasetGraph()) ;
        Quad q1 = SSE.parseQuad("(<http://example/g1> <http://example/s> <http://example/p> <http://example/o1>)") ;
        Quad q2 = SSE.parseQuad("(<http://example/g2> <http://example/s> <http://example/p> <http://example/o2>)") ;
        dsg.add(q1) ;
        dsg.add(q2) ;
        return 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()

    @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()

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