Package org.apache.marmotta.kiwi.persistence

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


                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

            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

            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

            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

            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

            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

            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

            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

    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.assertNotNull(uri.getId());

            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.