Examples of removeStatements()


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

            URI uriC = sail.getValueFactory().createURI("http://example.org/test/S_POG#c");
            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();
View Full Code Here

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

            after = countStatements(sc, uriA, uriB, uriC, false);
            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();
View Full Code Here

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

            sc.begin();
            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());
View Full Code Here

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

            after = countStatements(sc, uriA, uriB, uriC, false);
            assertEquals(0, before);
            assertEquals(1, after);

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

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

            after = countStatements(sc, uriA, uriB, uriC, false, uriD);
            assertEquals(0, before);
            assertEquals(1, after);

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

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

            Literal plainLitA = sail.getValueFactory().createLiteral("arbitrary plain literal 238445");
            Literal fooLabel = sail.getValueFactory().createLiteral("foo", XMLSchema.STRING);
            int before, after;

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

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

            after = countStatements(sc, null, uriA, null, false);
            assertEquals(0, before);
            assertEquals(1, after);

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

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

            after = countStatements(sc, null, uriA, null, false);
            assertEquals(0, before);
            assertEquals(1, after);

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

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

            assertEquals(0, before);
            assertEquals(1, after);
            assertEquals(foo, toSet(sc.getStatements(null, firstName, null, false)).iterator().next().getSubject());

            // Add statement to a non-null context.
            sc.removeStatements(null, uriA, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, null, uriA, null, false);
            sc.addStatement(uriB, uriA, uriC, uriA);
            sc.commit();
View Full Code Here

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

            sc.begin();
            after = countStatements(sc, null, uriA, null, false);
            assertEquals(0, before);
            assertEquals(1, after);

            sc.removeStatements(null, uriA, null);
            sc.commit();
            sc.begin();
            before = countStatements(sc, null, uriA, null, false);
            sc.addStatement(uriB, uriA, uriC, uriC);
            sc.addStatement(uriC, uriA, uriA, uriA);
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.