Examples of listVersions()


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

            version1.addTriple(triple1);
            connection.storeVersion(version1);
            connection.commit();

            // check if listVersions now gives exactly one version
            List<Version> list1 = Iterations.asList(connection.listVersions());
            Assert.assertEquals("there should be exactly one version",1,list1.size());
            Assert.assertEquals("contents of version differ", version1, list1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)list1.get(0).getId());

            // check if listVersions with subject1 now gives exactly one version
View Full Code Here

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

            Assert.assertEquals("there should be exactly one version",1,list1.size());
            Assert.assertEquals("contents of version differ", version1, list1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)list1.get(0).getId());

            // check if listVersions with subject1 now gives exactly one version
            List<Version> listr1 = Iterations.asList(connection.listVersions(subject1));
            Assert.assertEquals("there should be exactly one version", 1, listr1.size());
            Assert.assertEquals("contents of version differ", version1, listr1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)listr1.get(0).getId());

View Full Code Here

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

            version2.removeTriple(triple1);
            connection.storeVersion(version2);
            connection.commit();

            // check if listVersions now gives exactly two versions
            List<Version> list2 = Iterations.asList(connection.listVersions());
            Assert.assertEquals("there should be exactly two version",2,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(1));


            // check if listVersions with subject1 still gives exactly one version
View Full Code Here

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

            Assert.assertEquals("there should be exactly two version",2,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(1));


            // check if listVersions with subject1 still gives exactly one version
            List<Version> listr2 = Iterations.asList(connection.listVersions(subject1));
            Assert.assertEquals("there should be exactly one version", 2, listr2.size());
            Assert.assertEquals("contents of version differ", version1, listr2.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)listr2.get(0).getId());

            connection.commit();
View Full Code Here

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

            Date date3 = new Date();


            // now we test different ways of listing versions between dates
            List<Version> list1 = Iterations.asList(connection.listVersions(date1,date2));
            Assert.assertEquals("there should be exactly one version from "+date1+" to "+date2,1,list1.size());
            Assert.assertEquals("contents of version differ", version1, list1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)list1.get(0).getId());

            // check if getLatestVersion at date2 works
View Full Code Here

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

            Version latest2 = connection.getLatestVersion(subject,date2);
            Assert.assertNotNull("latest version for subject was not found",latest2);
            Assert.assertEquals("latest version is not the expected version", version1,latest2);

            // check if listVersions with subject1 now gives exactly one version
            List<Version> listr1 = Iterations.asList(connection.listVersions(subject,date1,date2));
            Assert.assertEquals("there should be exactly one version", 1, listr1.size());
            Assert.assertEquals("contents of version differ", version1, listr1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)listr1.get(0).getId());

View Full Code Here

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

            Assert.assertEquals("there should be exactly one version", 1, listr1.size());
            Assert.assertEquals("contents of version differ", version1, listr1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)listr1.get(0).getId());


            List<Version> list2 = Iterations.asList(connection.listVersions(date2,date3));
            Assert.assertEquals("there should be exactly one version from "+date2+" to "+date3,1,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(0));
            Assert.assertEquals("version id is not 2", 2L, (long)list2.get(0).getId());

            List<Version> list3 = Iterations.asList(connection.listVersions(date3,new Date()));
View Full Code Here

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

            List<Version> list2 = Iterations.asList(connection.listVersions(date2,date3));
            Assert.assertEquals("there should be exactly one version from "+date2+" to "+date3,1,list2.size());
            Assert.assertEquals("contents of version differ", version2, list2.get(0));
            Assert.assertEquals("version id is not 2", 2L, (long)list2.get(0).getId());

            List<Version> list3 = Iterations.asList(connection.listVersions(date3,new Date()));
            Assert.assertEquals("there should be no version from "+date3+" to now",0,list3.size());

            List<Version> list4 = Iterations.asList(connection.listVersions(date1,date3));
            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));
View Full Code Here

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

            Assert.assertEquals("version id is not 2", 2L, (long)list2.get(0).getId());

            List<Version> list3 = Iterations.asList(connection.listVersions(date3,new Date()));
            Assert.assertEquals("there should be no version from "+date3+" to now",0,list3.size());

            List<Version> list4 = Iterations.asList(connection.listVersions(date1,date3));
            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));

View Full Code Here

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

            version1.addTriple(triple1);
            connection.storeVersion(version1);
            connection.commit();

            // check if listVersions now gives exactly one version
            List<Version> list1 = Iterations.asList(connection.listVersions());
            Assert.assertEquals("there should be exactly one version",1,list1.size());
            Assert.assertEquals("contents of version differ", version1, list1.get(0));
            Assert.assertEquals("version id is not 1", 1L, (long)list1.get(0).getId());

            Version version2 = new Version();
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.