Package org.openrdf.sail

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


                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
                GregorianCalendar cal = new GregorianCalendar();
                cal.setTime(new Date(now));
View Full Code Here


                GregorianCalendar cal = new GregorianCalendar();
                cal.setTime(new Date(now));
                Literal obj = sail.getValueFactory().createLiteral(
                        DATATYPE_FACTORY.newXMLGregorianCalendar(cal));
                sc.removeStatements(personURI, TwitlogicVocabulary.lastUpdatedAt, null);
                sc.addStatement(personURI, TwitlogicVocabulary.lastUpdatedAt, obj);

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

            assertEquals(0, countStatements(sc, ctxA));
            for (int i = 0; i < 3; i++) {
                for (int j = 0; j < 3; j++) {
                    for (int k = 0; k < 3; k++) {
                        sc.addStatement(
                                uris[i], uris[j], uris[k], ctxA);
                    }
                }
            }
            sc.commit();
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.