Package org.apache.marmotta.kiwi.versioning.persistence

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.commit()


            Version version1 = new Version();
            version1.setCommitTime(new Date());
            version1.addTriple(triple1);
            connection.storeVersion(version1);
            connection.commit();

            // wait for one second to be sure to capture MySQL cutting milliseconds
            mysqlSleep();

            Date date2 = new Date();
View Full Code Here


            version2.setCommitTime(new Date());
            version2.addTriple(triple2);
            version2.removeTriple(triple1);
            connection.deleteTriple(triple1);
            connection.storeVersion(version2);
            connection.commit();

            // wait for one second to be sure to capture MySQL cutting milliseconds
            mysqlSleep();

            Date date3 = new Date();
View Full Code Here

            Assert.assertEquals("there should be exactly two versions from "+date1+" to "+date3,2,list4.size());
            Assert.assertEquals("contents of version1 differ", version1, list4.get(0));
            Assert.assertEquals("contents of version2 differ", version2, list4.get(1));


            connection.commit();

            // test garbage collector (should not throw an error and should not remove any triples, since they are
            // referenced by the versioning table)
            // test database contents
            PreparedStatement stmt = connection.getJDBCConnection().prepareStatement("SELECT * FROM triples WHERE deleted = true");
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.