Examples of storeNode()


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

            Random rnd = new Random();
            boolean value = rnd.nextBoolean();
            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiBooleanLiteral literal = new KiWiBooleanLiteral(value, uri);
            connection.storeNode(literal);

            // check if it then has a database ID
            Assert.assertTrue(literal.getId() >= 0);

            KiWiNode testLiteral1 = connection.loadNodeById(literal.getId());
View Full Code Here

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


            Date value = new Date();
            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiDateLiteral literal = new KiWiDateLiteral(value, uri);
            connection.storeNode(literal);

            // check if it then has a database ID
            Assert.assertTrue(literal.getId() >= 0);

            KiWiNode testLiteral1 = connection.loadNodeById(literal.getId());
View Full Code Here

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

                KiWiUriResource pred_2   = new KiWiUriResource("http://localhost/predicate/P2");
                KiWiUriResource object_1 = new KiWiUriResource("http://localhost/resource/"+RandomStringUtils.randomAlphanumeric(8));
                KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32),null,stype);
                KiWiUriResource context  = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
View Full Code Here

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

                KiWiUriResource object_1 = new KiWiUriResource("http://localhost/resource/"+RandomStringUtils.randomAlphanumeric(8));
                KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32),null,stype);
                KiWiUriResource context  = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);
View Full Code Here

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

                KiWiStringLiteral object_2 = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(32),null,stype);
                KiWiUriResource context  = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);
View Full Code Here

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

                KiWiUriResource context  = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);

                KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
View Full Code Here

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

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);

                KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
                KiWiTriple triple2 = new KiWiTriple(subject,pred_2,object_2,context);
View Full Code Here

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

                connection.storeNode(stype);
                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);

                KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
                KiWiTriple triple2 = new KiWiTriple(subject,pred_2,object_2,context);
View Full Code Here

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

                connection.storeNode(subject);
                connection.storeNode(pred_1);
                connection.storeNode(pred_2);
                connection.storeNode(object_1);
                connection.storeNode(object_2);
                connection.storeNode(context);

                KiWiTriple triple1 = new KiWiTriple(subject,pred_1,object_1,context);
                KiWiTriple triple2 = new KiWiTriple(subject,pred_2,object_2,context);

                connection.storeTriple(triple1);
View Full Code Here

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

    public void testStoreUriNode() throws SQLException {
        KiWiConnection connection = persistence.getConnection();
        try {
            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiUriResource uri = new KiWiUriResource("http://localhost/"+ RandomStringUtils.randomAlphanumeric(8));
            connection.storeNode(uri);

            // check if it then has a database ID
            Assert.assertTrue(uri.getId() >= 0);

            KiWiNode testUri1 = connection.loadNodeById(uri.getId());
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.