Package org.openrdf.repository.contextaware

Examples of org.openrdf.repository.contextaware.ContextAwareConnection.commit()


            String queryStr = "SELECT ?X ?Z WHERE { ?X ?Y ?Z }";

            TupleQuery query = con.prepareTupleQuery(QueryLanguage.SPARQL, queryStr);
            List<BindingSet> result = Iterations.asList(query.evaluate());
            Assert.assertEquals(2,result.size());
            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here


            String queryStr = "SELECT ?X ?Z WHERE { ?X ?P ?Y . ?Y ?P ?Z }";

            TupleQuery query = con.prepareTupleQuery(QueryLanguage.SPARQL, queryStr);
            List<BindingSet> result = Iterations.asList(query.evaluate());
            Assert.assertEquals(1,result.size());
            con.commit();
        } finally {
            con.close();
        }
    }
View Full Code Here

            TupleQuery query2 = con.prepareTupleQuery(QueryLanguage.SPARQL, queryStr2);
            List<BindingSet> result2 = Iterations.asList(query2.evaluate());
            Assert.assertEquals(0, result2.size());

            con.commit();
        } finally {
            con.close();
        }
    }
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.