Examples of toDataset()


Examples of com.hp.hpl.jena.tdb.store.DatasetGraphTDB.toDataset()

        // build the Lucene index when pointed to a non existing directory
        DatasetGraphTDB dsg = (DatasetGraphTDB)TDBFactory.createDatasetGraph(location);

        TDBLoader.load(dsg, in, false);
       
        IndexLARQ index = AssemblerLARQ.make(dsg.toDataset(), "tmp/lucene");
        NodeIterator iter = index.searchModelByIndex("A*"); // use Lucene syntax here
        while ( iter.hasNext() ) {
          System.out.println(iter.next());
        }
  }
View Full Code Here

Examples of com.hp.hpl.jena.tdb.store.DatasetGraphTDB.toDataset()

        Location location = new Location ("tmp/TDB");
        DatasetGraphTDB dsg = (DatasetGraphTDB)TDBFactory.createDatasetGraph(location);

        TDBLoader.load(dsg, in, false); // load data into TDB
        // build the Lucene index when pointed to a non existing directory
        AssemblerLARQ.make(dsg.toDataset(), "tmp/lucene");

        String queryString =
            "PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#>" +
            "PREFIX foaf: <http://xmlns.com/foaf/0.1/> " +
        "SELECT ?name ?email WHERE { " +
View Full Code Here

Examples of com.hp.hpl.jena.tdb.store.DatasetGraphTDB.toDataset()

        "    ?person foaf:name ?name . " +
        "    ?name pf:textMatch '*:*' . " + // use the Lucene syntax here
        "    OPTIONAL { ?person foaf:mbox ?email . }" +
        "}";
        Query query = QueryFactory.create(queryString);
        QueryExecution qexec = QueryExecutionFactory.create(query, dsg.toDataset());
        try {
          ResultSet results = qexec.execSelect();
          while ( results.hasNext() ) {
            QuerySolution soln = results.nextSolution();
            System.out.println(soln);
View Full Code Here

Examples of com.hp.hpl.jena.update.GraphStore.toDataset()

            for ( Node n : iter)
                System.out.println(n);
            System.out.println("<<<");
           
            // Does not see new graph.
            SSE.write(gs.toDataset()) ;
//           
//           
//            SSE.write(gs.getDefaultGraph()) ;
//            IndentedWriter.stdout.println();
            System.out.println("-- Get named graph");
View Full Code Here

Examples of com.hp.hpl.jena.update.GraphStore.toDataset()

        if (g == null || g.isEmpty())
        {
            return null;
        }
        GraphStore gs = GraphStoreFactory.create(g);
        Dataset ds = gs.toDataset();
        Model m = ds.getDefaultModel();
        return m;
    }
   
    protected DatasetGraphAccessor getAccessor()
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.