Package org.apache.marmotta.kiwi.persistence

Examples of org.apache.marmotta.kiwi.persistence.KiWiConnection.loadNodeById()


            connection.storeNode(uri, false);

            // check if it then has a database ID
            Assert.assertNotNull(uri.getId());

            KiWiNode testUri1 = connection.loadNodeById(uri.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(uri,testUri1);
            Assert.assertTrue(uri == testUri1);
View Full Code Here


            Assert.assertEquals(uri,testUri1);
            Assert.assertTrue(uri == testUri1);

            connection.commit();

            KiWiNode testUri2 = connection.loadNodeById(uri.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(uri,testUri2);
            Assert.assertTrue(uri == testUri2);
View Full Code Here

            Assert.assertEquals(1,Iterations.asList(connection.listResources()).size());


            // clear cache and test again
            persistence.clearCache();
            KiWiNode testUri4 = connection.loadNodeById(uri.getId());

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(uri,testUri4);
            Assert.assertTrue(uri != testUri4);
View Full Code Here

            connection.storeNode(bnode, false);

            // check if it then has a database ID
            Assert.assertNotNull(bnode.getId());

            KiWiNode testBNode1 = connection.loadNodeById(bnode.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(bnode,testBNode1);
            Assert.assertTrue(bnode == testBNode1);
View Full Code Here

            Assert.assertEquals(bnode,testBNode1);
            Assert.assertTrue(bnode == testBNode1);

            connection.commit();

            KiWiNode testBNode2 = connection.loadNodeById(bnode.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(bnode,testBNode2);
            Assert.assertTrue(bnode == testBNode2);
View Full Code Here

            Assert.assertEquals(1,Iterations.asList(connection.listResources()).size());

            // clear cache and test again
            persistence.clearCache();
            KiWiNode testBNode4 = connection.loadNodeById(bnode.getId());

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(bnode,testBNode4);
            Assert.assertTrue(bnode != testBNode4);
View Full Code Here

            connection.storeNode(literal, false);

            // check if it then has a database ID
            Assert.assertNotNull(literal.getId());

            KiWiNode testLiteral1 = connection.loadNodeById(literal.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral1);
            Assert.assertTrue(literal == testLiteral1);
View Full Code Here

            Assert.assertEquals(literal,testLiteral1);
            Assert.assertTrue(literal == testLiteral1);

            connection.commit();

            KiWiNode testLiteral2 = connection.loadNodeById(literal.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral2);
            Assert.assertTrue(literal == testLiteral2);
View Full Code Here

            connection.commit();


            // clear cache and test again
            persistence.clearCache();
            KiWiNode testLiteral4 = connection.loadNodeById(literal.getId());

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(literal,testLiteral4);
            Assert.assertTrue(literal != testLiteral4);
View Full Code Here

            connection.storeNode(literal, false);

            // check if it then has a database ID
            Assert.assertNotNull(literal.getId());

            KiWiNode testLiteral1 = connection.loadNodeById(literal.getId());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral1);
            Assert.assertTrue(literal == testLiteral1);
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.