@Override protected Repository createRepository(boolean sesameInference) { if (this.url != null) { org.openrdf.repository.http.HTTPRepository repository = new org.openrdf.repository.http.HTTPRepository(url); if (dataDir != null) { repository.setDataDir(dataDir); } if (username != null || password != null) { repository.setUsernameAndPassword(username, password); } if (dataDir != null) { idSource = new FileIdSequence(new File(dataDir, "lastLocalId")); } else { idSource = new MemoryIdSequence(); } return repository; } else { throw new RepositoryException("URL for remote repository not provided."); } }
@Override protected Repository createRepository(boolean sesameInference) { MemoryStore store; if (dataDir != null){ store = new MemoryStore(dataDir); idSource = new FileIdSequence(new File(dataDir, "lastLocalId")); }else{ store = new MemoryStore(); idSource = new MemoryIdSequence(); } if (syncDelay > 0){ store.setSyncDelay(syncDelay); } if (sesameInference){ return new SailRepository(new ExtendedRDFSInferencer(store)); }else{ return new SailRepository(store); } }
@Override protected Repository createRepository(boolean sesameInference) { MemoryStore store; if (dataDir != null) { store = new MemoryStore(dataDir); idSource = new FileIdSequence(new File(dataDir, "lastLocalId")); } else { store = new MemoryStore(); idSource = new MemoryIdSequence(); } if (syncDelay > 0) { store.setSyncDelay(syncDelay); } if (sesameInference) { return new SailRepository(new ExtendedRDFSInferencer(store)); } else { return new SailRepository(store); } }
@Override protected Repository createRepository(boolean sesameInference) { MemoryStore store; if (dataDir != null) { store = new MemoryStore(dataDir); idSource = new FileIdSequence(new File(dataDir, "lastLocalId")); } else { store = new MemoryStore(); idSource = new MemoryIdSequence(); } if (syncDelay > 0) { store.setSyncDelay(syncDelay); } if (sesameInference) { return new SailRepository(new ExtendedRDFSInferencer(store)); } else { return new SailRepository(store); } }
@Test public void GetNextId() { IdSequence idSequence = new MemoryIdSequence(); assertEquals(1l, idSequence.getNextId()); assertEquals(2l, idSequence.getNextId()); }