Examples of KiWiNode


Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

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

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


            KiWiNode testUri3 = connection.loadUriResource(uri.stringValue());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(uri,testUri3);
            Assert.assertTrue(uri == testUri3);


            connection.commit();

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

            KiWiNode testUri5 = connection.loadUriResource(uri.stringValue());

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

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

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


            KiWiNode testBNode3 = connection.loadAnonResource(bnode.stringValue());

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(bnode,testBNode3);
            Assert.assertTrue(bnode == testBNode3);


            connection.commit();

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

            KiWiNode testBNode5 = connection.loadAnonResource(bnode.stringValue());

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

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

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

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(), null, stype);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertTrue(literal == testLiteral3);

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

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,stype);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

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

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

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),Locale.ENGLISH.getLanguage(),null);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertTrue(literal == testLiteral3);

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

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),Locale.ENGLISH.getLanguage(),null);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);

            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);

            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);


            // load by integer value
            KiWiNode testLiteral6 = connection.loadLiteral(value);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral6);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral6).getType());
            Assert.assertTrue(literal == testLiteral6);


            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(literal,testLiteral5);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral5).getType());
            Assert.assertTrue(literal != testLiteral5);


            // load by integer value
            KiWiNode testLiteral7 = connection.loadLiteral(value);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);


            // load by integer value
            KiWiNode testLiteral6 = connection.loadLiteral(value);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral6);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral6).getType());
            Assert.assertTrue(literal == testLiteral6);


            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(literal,testLiteral5);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral5).getType());
            Assert.assertTrue(literal != testLiteral5);


            // load by integer value
            KiWiNode testLiteral7 = connection.loadLiteral(value);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);


            // load by integer value
            KiWiNode testLiteral6 = connection.loadLiteral(value);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral6);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral6).getType());
            Assert.assertTrue(literal == testLiteral6);


            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(literal,testLiteral5);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral5).getType());
            Assert.assertTrue(literal != testLiteral5);


            // load by integer value
            KiWiNode testLiteral7 = connection.loadLiteral(value);

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

Examples of org.apache.marmotta.kiwi.model.rdf.KiWiNode

            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.assertEquals(uri,((KiWiLiteral)testLiteral1).getType());
            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.assertEquals(uri,((KiWiLiteral)testLiteral2).getType());
            Assert.assertTrue(literal == testLiteral2);

            KiWiNode testLiteral3 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral3);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral3).getType());
            Assert.assertTrue(literal == testLiteral3);


            // load by integer value
            KiWiNode testLiteral6 = connection.loadLiteral(value);

            // needs to be equal, and should also be the identical object!
            Assert.assertEquals(literal,testLiteral6);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral6).getType());
            Assert.assertTrue(literal == testLiteral6);


            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.assertEquals(uri,((KiWiLiteral)testLiteral4).getType());
            Assert.assertTrue(literal != testLiteral4);

            KiWiNode testLiteral5 = connection.loadLiteral(literal.stringValue(),null,uri);

            // needs to be equal, but now it should not be the same object!
            Assert.assertEquals(literal,testLiteral5);
            Assert.assertEquals(uri,((KiWiLiteral)testLiteral5).getType());
            Assert.assertTrue(literal != testLiteral5);


            // load by integer value
            KiWiNode testLiteral7 = connection.loadLiteral(value);

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