Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.ValueFactoryImpl.createLiteral()


      model.add(implNode, RULESET, vf.createLiteral(ruleSet));
    }

    model.add(implNode, USELAZYADD, vf.createLiteral(new Boolean(useLazyAdd).toString()));

    model.add(implNode, ROUNDROBIN, vf.createLiteral(new Boolean(roundRobin).toString()));

    model.add(implNode, FETCHSIZE, vf.createLiteral(Integer.toString(fetchSize,10)));

    return implNode;
  }
View Full Code Here


    model.add(implNode, USELAZYADD, vf.createLiteral(new Boolean(useLazyAdd).toString()));

    model.add(implNode, ROUNDROBIN, vf.createLiteral(new Boolean(roundRobin).toString()));

    model.add(implNode, FETCHSIZE, vf.createLiteral(Integer.toString(fetchSize,10)));

    return implNode;
  }

  @Override
View Full Code Here

        final ValueFactory vf = new ValueFactoryImpl();
        final BNode bnode = vf.createBNode("anon");
        final URI uri1 = vf.createURI(ex, "uri1");
        final URI uri2 = vf.createURI(ex, "uri2");
        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
View Full Code Here

        final ValueFactory vf = new ValueFactoryImpl();
        final BNode bnode = vf.createBNode("anon");
        final URI uri1 = vf.createURI(ex, "uri1");
        final URI uri2 = vf.createURI(ex, "uri2");
        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");
View Full Code Here

        final BNode bnode = vf.createBNode("anon");
        final URI uri1 = vf.createURI(ex, "uri1");
        final URI uri2 = vf.createURI(ex, "uri2");
        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");
View Full Code Here

        final URI uri1 = vf.createURI(ex, "uri1");
        final URI uri2 = vf.createURI(ex, "uri2");
        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
View Full Code Here

        final URI uri2 = vf.createURI(ex, "uri2");
        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
View Full Code Here

        final Literal plainLit = vf.createLiteral("plain");
        final Literal dtLit = vf.createLiteral(1);
        final Literal langLit = vf.createLiteral("test", "en");
        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
View Full Code Here

        rdfParser.parse(in, "foo:bar");

        assertEquals("Unexpected number of statements", 6, model.size());
        final Model bnodeModel = model.filter(null, uri1,
                vf.createLiteral(plainLit.getLabel(), XMLSchema.STRING));
        assertEquals("Blank node was not round-tripped", 1, bnodeModel.size());
        assertTrue("Blank node was not round-tripped as a blank node", bnodeModel.subjects()
                .iterator().next() instanceof BNode);
        if (rdfParser.getRDFFormat().supportsContexts()) {
            assertTrue(model.contains(st2));
View Full Code Here

        }
        assertTrue(model.contains(st3));
        assertTrue(
                "missing statement with literal ending on newline",
                model.contains(vf.createStatement(uri1, uri2,
                        vf.createLiteral(litWithNewline.getLabel(), XMLSchema.STRING))));
        assertTrue(
                "missing statement with single quotes",
                model.contains(vf.createStatement(uri1, uri2,
                        vf.createLiteral(litWithSingleQuotes.getLabel(), XMLSchema.STRING))));
        assertTrue(
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.