Package org.openrdf.repository

Examples of org.openrdf.repository.RepositoryConnection.commit()


                        runners.add(new LdpTestCaseRunner(testCase));
                    }
                } finally {
                    results.close();
                }
                conn.commit();
            } catch (RepositoryException e) {
                log.error("Error loading test cases: {}", e.getMessage(), e);
                return runners;
            } catch (QueryEvaluationException | MalformedQueryException e) {
                log.error("Error performing test cases' query: {}", e.getMessage(), e);
View Full Code Here


        Literal object1 = repository.getValueFactory().createLiteral(value);

        RepositoryConnection connection1 = repository.getConnection();
        try {
            connection1.add(subject,predicate,object1);
            connection1.commit();

            Assert.assertTrue(connection1.hasStatement(subject,predicate,object1,true));

            connection1.commit();
        } finally {
View Full Code Here

            connection1.add(subject,predicate,object1);
            connection1.commit();

            Assert.assertTrue(connection1.hasStatement(subject,predicate,object1,true));

            connection1.commit();
        } finally {
            connection1.close();
        }

        RepositoryConnection connection2 = repository.getConnection();
View Full Code Here

            Assert.assertFalse(connection2.hasStatement(subject, predicate, object1, true));

            connection2.add(subject,predicate,object1);
            Assert.assertTrue(connection2.hasStatement(subject, predicate, object1, true));

            connection2.commit();
        } finally {
            connection2.close();
        }

        RepositoryConnection connection3 = repository.getConnection();
View Full Code Here

        }

        RepositoryConnection connection3 = repository.getConnection();
        try {
            Assert.assertTrue(connection3.hasStatement(subject, predicate, object1, true));
            connection3.commit();
        } finally {
            connection3.close();
        }
    }
View Full Code Here

        Literal object1 = repository.getValueFactory().createLiteral(value);

        RepositoryConnection connection1 = repository.getConnection();
        try {
            connection1.add(subject,predicate,object1);
            connection1.commit();

            Assert.assertTrue(connection1.hasStatement(subject,predicate,object1,true));

            connection1.commit();
        } finally {
View Full Code Here

            connection1.add(subject,predicate,object1);
            connection1.commit();

            Assert.assertTrue(connection1.hasStatement(subject,predicate,object1,true));

            connection1.commit();
        } finally {
            connection1.close();
        }

        RepositoryConnection connection2 = repository.getConnection();
View Full Code Here

            String query = String.format("DELETE { <%s> <%s> ?v } INSERT { <%s> <%s> ?v . } WHERE { <%s> <%s> ?v }", subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue(), subject.stringValue(), predicate.stringValue());

            Update u = connection2.prepareUpdate(QueryLanguage.SPARQL, query);
            u.execute();

            connection2.commit();
        } finally {
            connection2.close();
        }

        RepositoryConnection connection3 = repository.getConnection();
View Full Code Here

        }

        RepositoryConnection connection3 = repository.getConnection();
        try {
            Assert.assertTrue(connection3.hasStatement(subject, predicate, object1, true));
            connection3.commit();
        } finally {
            connection3.close();
        }
    }
View Full Code Here

        try {
            connection2.begin();
            Assert.assertFalse(connection2.hasStatement(subject,predicate,object,true));

            connection2.add(subject,predicate,object);
            connection2.commit();

            Assert.assertTrue(connection2.hasStatement(subject,predicate,object,true));

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