Package org.openrdf.repository.sail

Examples of org.openrdf.repository.sail.SailRepository.initialize()


  public ClientResponse retrieveResource(String resource, LDClientService client, Endpoint endpoint) throws DataRetrievalException {
        String filename = resource.substring("http://remote/".length()) + ".ttl";

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

            RepositoryConnection con = triples.getConnection();
            try {
                con.begin();
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

            format = RDFFormat.forMIMEType(mimetype);
        }

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


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

  public ClientResponse retrieveResource(String resource, LDClientService client, Endpoint endpoint) throws DataRetrievalException {
        String filename = resource.substring("http://localhost/".length()) + ".ttl";

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

            RepositoryConnection con = triples.getConnection();
            try {
                con.begin();
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

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.