Examples of storeNode()


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

    public void testStoreBNode() 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
            KiWiAnonResource bnode = new KiWiAnonResource(RandomStringUtils.randomAlphanumeric(8));
            connection.storeNode(bnode, false);

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

            KiWiNode testBNode1 = connection.loadNodeById(bnode.getId());
View Full Code Here

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

    @Test
    public void testStoreStringLiteralNoType() throws SQLException {
        KiWiConnection connection = persistence.getConnection();
        try {
            KiWiUriResource   stype   = new KiWiUriResource(Namespaces.NS_XSD+"string");
            connection.storeNode(stype, false);

            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8),null,stype);
            connection.storeNode(literal, false);
View Full Code Here

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

            KiWiUriResource   stype   = new KiWiUriResource(Namespaces.NS_XSD+"string");
            connection.storeNode(stype, false);

            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8),null,stype);
            connection.storeNode(literal, false);

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

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

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

    @Test
    public void testStoreStringLiteralLanguage() throws SQLException {
        KiWiConnection connection = persistence.getConnection();
        try {
            KiWiUriResource   stype   = new KiWiUriResource(getRDFLangStringType());
            connection.storeNode(stype, false);

            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8), Locale.ENGLISH, stype);
            connection.storeNode(literal, false);
View Full Code Here

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

            KiWiUriResource   stype   = new KiWiUriResource(getRDFLangStringType());
            connection.storeNode(stype, false);

            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8), Locale.ENGLISH, stype);
            connection.storeNode(literal, false);

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

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

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

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

            // add a new URI to the triple store and check if it exists afterwards, before and after commit
            KiWiStringLiteral literal = new KiWiStringLiteral(RandomStringUtils.randomAlphanumeric(8), null, uri);
            connection.storeNode(literal, false);

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

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

Examples of org.apache.marmotta.kiwi.versioning.persistence.KiWiVersioningConnection.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));
            KiWiUriResource context  = new KiWiUriResource("http://localhost/context/"+RandomStringUtils.randomAlphanumeric(8));

            connection.storeNode(subject1, false);
            connection.storeNode(subject2, false);
            connection.storeNode(pred_1, false);
            connection.storeNode(pred_2, false);
            connection.storeNode(object_1, false);
            connection.storeNode(object_2, false);
View Full Code Here

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

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

            connection.storeNode(subject1, false);
            connection.storeNode(subject2, false);
            connection.storeNode(pred_1, false);
            connection.storeNode(pred_2, false);
            connection.storeNode(object_1, false);
            connection.storeNode(object_2, false);
            connection.storeNode(context, false);
View Full Code Here

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

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

            connection.storeNode(subject1, false);
            connection.storeNode(subject2, false);
            connection.storeNode(pred_1, false);
            connection.storeNode(pred_2, false);
            connection.storeNode(object_1, false);
            connection.storeNode(object_2, false);
            connection.storeNode(context, false);
View Full Code Here

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

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

            connection.storeNode(subject1, false);
            connection.storeNode(subject2, false);
            connection.storeNode(pred_1, false);
            connection.storeNode(pred_2, false);
            connection.storeNode(object_1, false);
            connection.storeNode(object_2, false);
            connection.storeNode(context, false);

            KiWiTriple triple1 = new KiWiTriple(subject1,pred_1,object_1,context);
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.