Package com.hp.hpl.jena.tdb.store

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


        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

        "    ?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

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.