Examples of listVersions()


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));

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

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

     */
    @Override
    public RepositoryResult<Version> listVersions()  throws SailException {
        try {
            final KiWiVersioningConnection connection = persistence.getConnection();
            return new RepositoryResult<Version>(connection.listVersions()) {
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();

                    try {
View Full Code Here

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

     */
    @Override
    public RepositoryResult<Version> listVersions(Date from, Date to) throws SailException {
        try {
            final KiWiVersioningConnection connection = persistence.getConnection();
            return new RepositoryResult<Version>(connection.listVersions(from,to)) {
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();

                    try {
View Full Code Here

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

        try {
            final KiWiVersioningConnection connection = persistence.getConnection();

            KiWiResource kr = (KiWiResource) ((r instanceof URI) ? getValueFactory().createURI(r.stringValue()) : getValueFactory().createBNode(r.stringValue()));

            return new RepositoryResult<Version>(connection.listVersions(kr)) {
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();

                    try {
View Full Code Here

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

        try {
            final KiWiVersioningConnection connection = persistence.getConnection();

            KiWiResource kr = (KiWiResource) ((r instanceof URI) ? getValueFactory().createURI(r.stringValue()) : getValueFactory().createBNode(r.stringValue()));

            return new RepositoryResult<Version>(connection.listVersions(kr,from,to)) {
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();

                    try {
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 = connection.listVersions().asList();
            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 = connection.listVersions(subject1).asList();
            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 = connection.listVersions().asList();
            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 = connection.listVersions(subject1).asList();
            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
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.