Package org.openrdf.sail

Examples of org.openrdf.sail.Sail.initialize()


    private static void runDemo() throws Exception {
        Sail storage = new MemoryStore();
        storage.initialize();
        Sail linkedData = new LinkedDataSail(storage);
        linkedData.initialize();

        RippleSail ripple = new RippleSail(linkedData);
        ripple.initialize();

        Repository repo = new SailRepository(ripple);
View Full Code Here


        return count;
    }

    public void testRecoverFromParseError() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();

        String bad = "bad";

        String good = "@prefix foo:  <http://example.org/foo#>.\n"
                + "foo:a foo:b foo:c.";
View Full Code Here

        }
    }

    public void testAddFromInputStream() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();
        SailConnection sc = sail.getConnection();
        try {
            sc.begin();

            URI ctxA = sail.getValueFactory().createURI("urn:test.AddFromInputStreamTest.ctxA#");
View Full Code Here

    // Verifies that Sesame does not unescape literal labels (not that one would
    // reasonably suspect it of doing so).
    public void testEscapeCharactersInLiterals() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();
        ValueFactory vf = sail.getValueFactory();
        Literal l;

        l = vf.createLiteral("\"");
        assertEquals(1, l.getLabel().length());
View Full Code Here

*/
public class LinkedDataCacheTest {
    @Test
    public void testMediaTypes() throws Exception {
        Sail sail = new MemoryStore();
        sail.initialize();

        LinkedDataCache cache = LinkedDataCache.createDefault(sail);
        String header = cache.getAcceptHeader();
        assertTrue(header.contains("application/rdf+xml"));
        assertTrue(header.contains("text/plain;q=0.5"));
View Full Code Here

    // For debugging/experimentation
    public static void main(final String[] args) throws Exception {
        Ripple.initialize();

        Sail baseSail = new MemoryStore();
        baseSail.initialize();

        try {
            Repository repo = new SailRepository(baseSail);

            LinkedDataSail sail = new LinkedDataSail(baseSail);
View Full Code Here

        Sail sail = (null == indexes)
                ? new NativeStore(dir)
                : new NativeStore(dir, indexes.trim());
        try {
            sail.initialize();
        } catch (SailException e) {
            throw new RippleException(e);
        }

        return sail;
View Full Code Here

        LinkedDataCache cache = LinkedDataCache.createDefault(base);
        cache.setURIMap(uriMap);
        Sail sail = new LinkedDataSail(base, cache);
        try {
            // Note: base Sail is already initialized.
            sail.initialize();
        } catch (SailException e) {
            throw new RippleException(e);
        }

        return sail;
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.