Examples of loadLiteral()


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

            // 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);
View Full Code Here

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

            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);
View Full Code Here

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

            // 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.persistence.KiWiConnection.loadLiteral()

            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.persistence.KiWiConnection.loadLiteral()

            // 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);
View Full Code Here

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

            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);
View Full Code Here

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

            // 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.persistence.KiWiConnection.loadLiteral()

            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.persistence.KiWiConnection.loadLiteral()

                    try {
                        // differentiate between the different types of the value
                        if (type == null) {
                            // FIXME: MARMOTTA-39 (this is to avoid a NullPointerException in the following if-clauses)
                            result = connection.loadLiteral(value.toString(), lang, rtype);

                            if(result == null) {
                                result = new KiWiStringLiteral(value.toString(), locale, rtype);
                            }
                        } else if(value instanceof Date || type.equals(Namespaces.NS_XSD+"dateTime")) {
View Full Code Here

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

                                dvalue = (Date)value;
                            } else {
                                dvalue = DateUtils.parseDate(value.toString());
                            }

                            result = connection.loadLiteral(dvalue);

                            if(result == null) {
                                result= new KiWiDateLiteral(dvalue, rtype);
                            }
                        } else if(Integer.class.equals(value.getClass()) || int.class.equals(value.getClass())  ||
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.