Package org.openrdf.repository

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


  public void test()
    throws Exception
  {
    Repository rep1 = new SailRepository(new MemoryStore());
    rep1.initialize();

    RepositoryConnection con1 = rep1.getConnection();

    URL rdf = this.getClass().getResource("/testcases/rdfa-test.rdf");
View Full Code Here


    long before = con1.size();
    con1.close();

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

    RepositoryConnection con2 = rep2.getConnection();

    con2.add(new StringReader(writer.toString()), rdf.toExternalForm(), rdfWriterFactory.getRDFFormat());
    long after = con2.size();
View Full Code Here

  @Override
  @Test
  public void testRemoveAll() throws Exception {
    Repository repo = new SailRepository(new MemoryStore());
    repo.initialize();
    RepositoryModelSet modelSet = new RepositoryModelSet(repo);
    modelSet.open();
    URI context1 = new URIImpl("uri:context1");
    URI context2 = new URIImpl("uri:context2");
    modelSet.addStatement(context1, new URIImpl("uri:r1"), new URIImpl(
View Full Code Here

    // create a Sail stack
    Sail sail = new MemoryStore();
    sail = new ForwardChainingRDFSInferencer(sail);
    // create a Repository
    Repository repository = new SailRepository(sail);
    repository.initialize();

    RepositoryConnection con = repository.getConnection();

    con.add(a, RDFS.SUBPROPERTYOF, b, defaultContext);
    con.add(b, RDFS.SUBPROPERTYOF, c, defaultContext);
View Full Code Here

    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }

    URI a = new URIImpl("urn:test:a");
View Full Code Here

    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }

    org.openrdf.model.URI a = new org.openrdf.model.impl.URIImpl(
View Full Code Here

    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }
   
    URI p = new URIImpl("urn:rel:p");
View Full Code Here

    sail = new ForwardChainingRDFSPlusInverseInferencer(sail);

    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }
   
    URI a1 = new URIImpl("urn:name:a1");
View Full Code Here

    }
   
    // create a Repository
    Repository repository = new SailRepository(sail);
    try {
      repository.initialize();
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
   
    return repository;
View Full Code Here

        cacheEntries = new HashMap<String,CacheEntry>();

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

        } catch (RepositoryException e) {
            log.error("error initialising connection to Sesame in-memory repository",e);
        }
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.