Package org.openrdf.sail

Examples of org.openrdf.sail.SailConnection.commit()


            assertEquals(0, before);
            assertEquals(1, after);

            // Add plain literal statement to the default context.
            sc.removeStatements(null, null, plainLitA);
            sc.commit();
            sc.begin();
            before = countStatements(sc, null, uriA, plainLitA, false);
            sc.addStatement(uriA, uriA, plainLitA);
            sc.addStatement(uriA, uriB, plainLitA);
            sc.addStatement(uriB, uriB, plainLitA);
View Full Code Here


            sc.begin();
            before = countStatements(sc, null, uriA, plainLitA, false);
            sc.addStatement(uriA, uriA, plainLitA);
            sc.addStatement(uriA, uriB, plainLitA);
            sc.addStatement(uriB, uriB, plainLitA);
            sc.commit();
            sc.begin();
            after = countStatements(sc, null, uriA, plainLitA, false);
            assertEquals(0, before);
            assertEquals(1, after);
View Full Code Here

            assertEquals(0, before);
            assertEquals(1, after);

            // Add string-typed literal statement to the default context.
            sc.removeStatements(null, null, fooLabel);
            sc.commit();
            sc.begin();
            before = countStatements(sc, null, firstName, fooLabel, false);
            sc.addStatement(foo, firstName, fooLabel);
            sc.commit();
            sc.begin();
View Full Code Here

            sc.removeStatements(null, null, fooLabel);
            sc.commit();
            sc.begin();
            before = countStatements(sc, null, firstName, fooLabel, false);
            sc.addStatement(foo, firstName, fooLabel);
            sc.commit();
            sc.begin();
            after = countStatements(sc, null, firstName, fooLabel, false);
            assertEquals(0, before);
            assertEquals(1, after);
            assertEquals(foo, toSet(sc.getStatements(null, firstName, fooLabel, false)).iterator().next().getSubject());
View Full Code Here

            URI uriD = sail.getValueFactory().createURI("http://example.org/test/S_POG#d");
            int before, after;

            // default context, different S,P,O
            sc.removeStatements(uriA, null, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, uriA, uriB, uriC, false);
            sc.addStatement(uriA, uriB, uriC);
            sc.commit();
            sc.begin();
View Full Code Here

            sc.removeStatements(uriA, null, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, uriA, uriB, uriC, false);
            sc.addStatement(uriA, uriB, uriC);
            sc.commit();
            sc.begin();
            after = countStatements(sc, uriA, uriB, uriC, false);
            assertEquals(0, before);
            assertEquals(1, after);
View Full Code Here

            assertEquals(0, before);
            assertEquals(1, after);

            // default context, same S,P,O
            sc.removeStatements(uriA, null, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, uriA, uriB, uriC, false);
            sc.addStatement(uriA, uriB, uriC);
            sc.commit();
            sc.begin();
View Full Code Here

            sc.removeStatements(uriA, null, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, uriA, uriB, uriC, false);
            sc.addStatement(uriA, uriB, uriC);
            sc.commit();
            sc.begin();
            after = countStatements(sc, uriA, uriB, uriC, false);
            assertEquals(0, before);
            assertEquals(1, after);
View Full Code Here

        try {
            sc.begin();
            edgesBefore = countEdges();
            verticesBefore = countVertices();
        } finally {
            sc.commit();
            sc.close();
        }

        addFile(SailTest.class.getResourceAsStream("graph-example-bnodes.trig"), RDFFormat.TRIG);
View Full Code Here

            assertEquals(14, countStatements(sc, null, null, null, false));
            assertEquals(edgesBefore + 14, countEdges());
            assertEquals(verticesBefore + 10, countVertices());

            sc.removeStatements(ref, null, null);
            sc.commit();
            sc.begin();

            assertEquals(13, countStatements(sc, null, null, null, false));
            assertEquals(edgesBefore + 13, countEdges());
            assertEquals(verticesBefore + 9, countVertices());
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.