Examples of removeStatements()


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

                // update triples in cache
                SailConnection con = store.getConnection();
                try {
                    con.begin();

                    con.removeStatements((Resource) null, null, null, store.getValueFactory().createURI(cacheContext));

                    con.commit();
                } catch(SailException ex) {
                    con.rollback();
                } finally {
View Full Code Here

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

        SailConnection con = getConnection();
        try {
            con.begin();

            for(Statement stmt : version.getAddedTriples()) {
                con.removeStatements(stmt.getSubject(), stmt.getPredicate(), stmt.getObject(), stmt.getContext());
            }

            for(Statement stmt : version.getRemovedTriples()) {
                con.addStatement(stmt.getSubject(), stmt.getPredicate(), stmt.getObject(), stmt.getContext());
            }
View Full Code Here

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

        SailConnection con = getConnection();
        try {
            con.begin();

            for(Statement stmt : version.getAddedTriples()) {
                con.removeStatements(stmt.getSubject(), stmt.getPredicate(), stmt.getObject(), stmt.getContext());
            }

            for(Statement stmt : version.getRemovedTriples()) {
                con.addStatement(stmt.getSubject(), stmt.getPredicate(), stmt.getObject(), stmt.getContext());
            }
View Full Code Here

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

            con.begin();

            assertTrue(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));
           
            con.removeStatements(u1, p1, l1, c1);
            con.removeStatements(u2, p2, l2);
            con.removeStatements(u4, p4, l4, c1);
           
            assertFalse(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));
View Full Code Here

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

            assertTrue(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));
           
            con.removeStatements(u1, p1, l1, c1);
            con.removeStatements(u2, p2, l2);
            con.removeStatements(u4, p4, l4, c1);
           
            assertFalse(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));
View Full Code Here

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

            assertTrue(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));
           
            con.removeStatements(u1, p1, l1, c1);
            con.removeStatements(u2, p2, l2);
            con.removeStatements(u4, p4, l4, c1);
           
            assertFalse(hasStatement(con, u1, p1, l1));
            assertTrue(hasStatement(con, u3, p3, l3));

            con.commit();
View Full Code Here

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

            }
        };

        SailConnection sc = sail.getConnection();
        try {
            sc.removeStatements(RDF.TYPE, null, null, (URI) null);
            sc.commit();
        } finally {
            sc.rollback();
            sc.close();
        }
View Full Code Here

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

            try {
                SailConnection c = storeConnection.getSailConnection();
                try {
                    c.begin();
                    // TODO: remove only from the authoritative graph
                    c.removeStatements(uriOf(p), null, null);

                    Graph g = p.getEmbedsKnowledge();
                    if (null != g) {
                        c.removeStatements(null, null, null, uriOf(g));
                    }
View Full Code Here

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

                    // TODO: remove only from the authoritative graph
                    c.removeStatements(uriOf(p), null, null);

                    Graph g = p.getEmbedsKnowledge();
                    if (null != g) {
                        c.removeStatements(null, null, null, uriOf(g));
                    }

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

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

                List<User> followees = client.getFollowees(user, followeeLimit);

                URI foafKnows = vf.createURI(FOAF.KNOWS);

                // persist self and foaf:knows edges
                sc.removeStatements(personURI, foafKnows, null);
                for (User f : followees) {
                    sc.addStatement(personURI, foafKnows, vf.createURI(PersistenceContext.uriOf(new Person(f))));
                }

                // update timestamp
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.