Package org.openrdf.repository

Examples of org.openrdf.repository.Repository.initialize()


            format = RDFFormat.forMIMEType(mimetype);
        }

        try {
            Repository repository = new SailRepository(new MemoryStore());
            repository.initialize();
            setRepository(repository);


            RepositoryConnection connection = repository.getConnection();
            try {
View Full Code Here


            format = RDFFormat.forMIMEType(mimetype);
        }

        try {
            Repository repository = new SailRepository(new MemoryStore());
            repository.initialize();
            setRepository(repository);


            RepositoryConnection connection = repository.getConnection();
            try {
View Full Code Here

        InputStream atom = this.getClass().getResourceAsStream(fileName + ".atom");
        InputStream sparql = this.getClass().getResourceAsStream(fileName+".sparql");
        assumeThat("Could not load testfiles", asList(atom, sparql), everyItem(notNullValue(InputStream.class)));

        Repository repository = new SailRepository(new MemoryStore());
        repository.initialize();

        RepositoryConnection connection = repository.getConnection();
        try {
            connection.add(atom, "http://localhost/atom/", AtomFormat.FORMAT);
            connection.commit();
View Full Code Here

        } finally {
            con1.close();
        }

        final Repository orig = new SailRepository(new MemoryStore());
        orig.initialize();
        final RepositoryConnection con = orig.getConnection();
        try {
            con.begin();
            con.add(this.getClass().getResourceAsStream("/illustrative.in.ttl"), BASE_URI, RDFFormat.TURTLE);
            con.commit();
View Full Code Here

        Assume.assumeTrue(!StringUtils.isBlank(jdbcUrl));

        try {
            KiWiStore store = new KiWiStore("test",jdbcUrl,jdbcUser,jdbcPass,dialect, "http://localhost/context/default", "http://localhost/context/inferred");
            final Repository repository = new SailRepository(store);
            repository.initialize();

            LDCachingKiWiBackend backend = new LDCachingKiWiBackend(repository, CACHE_CONTEXT) {
                /**
                 * Shutdown the backend and free all runtime resources.
                 */
 
View Full Code Here

            format = Rio.getParserFormatForMIMEType(mimetype);
        }

        try {
            Repository repository = new SailRepository(new MemoryStore());
            repository.initialize();
            setRepository(repository);


            RepositoryConnection connection = repository.getConnection();
            try {
View Full Code Here

            format = Rio.getParserFormatForMIMEType(mimetype);
        }

        try {
            Repository repository = new SailRepository(new MemoryStore());
            repository.initialize();
            setRepository(repository);


            RepositoryConnection connection = repository.getConnection();
            try {
View Full Code Here

        InputStream atom = this.getClass().getResourceAsStream(fileName + ".atom");
        InputStream sparql = this.getClass().getResourceAsStream(fileName+".sparql");
        assumeThat("Could not load testfiles", asList(atom, sparql), everyItem(notNullValue(InputStream.class)));

        Repository repository = new SailRepository(new MemoryStore());
        repository.initialize();

        RepositoryConnection connection = repository.getConnection();
        try {
            connection.add(atom, "http://localhost/atom/", AtomFormat.FORMAT);
            connection.commit();
View Full Code Here

        InputStream rss = this.getClass().getResourceAsStream(fileName + ".rss");
        InputStream sparql = this.getClass().getResourceAsStream(fileName+".sparql");
        assumeThat("Could not load testfiles", asList(rss, sparql), everyItem(notNullValue(InputStream.class)));

        Repository repository = new SailRepository(new MemoryStore());
        repository.initialize();

        RepositoryConnection connection = repository.getConnection();
        try {
            connection.add(rss, "http://localhost/rss/", RSSFormat.FORMAT);
            connection.commit();
View Full Code Here

        if (baseUri == null) throw new IllegalArgumentException("baseUri must not be null");
        if (format == null) throw new IllegalArgumentException("format must not be null");

        try {
            Repository repo = new SailRepository(new MemoryStore());
            repo.initialize();
            try {
                final RepositoryConnection con = repo.getConnection();
                try (final StringReader r = new StringReader(rdfString)) {
                    con.begin();
                    con.add(r, baseUri, format);
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.