protected Repository createRepository() throws RepositoryException { Repository repository = new SailRepository(new MemoryStore()); repository.initialize(); return repository; }
protected Repository createRepository() throws RepositoryException { Repository dataRep = new DatasetRepository(new SailRepository(new MemoryStore())); dataRep.initialize(); return dataRep; }
private void initUnFlushedStatements() throws RepositoryException { Repository addRepo = new SailRepository(new MemoryStore()); Repository removeRepo = new SailRepository(new MemoryStore()); addRepo.initialize(); removeRepo.initialize(); added = addRepo.getConnection(); removed = removeRepo.getConnection(); }
public static QuerySupport newInstance(QueryTemplate template) { Objects.requireNonNull(template, TEMPLATE_PARAM); try { Repository tmpRepo=new SailRepository(new MemoryStore()); tmpRepo.initialize(); return new QuerySupport(tmpRepo,template); } catch (RepositoryException e) { throw new QueryTemplateSupportFailure("Could not initialize internal Sesame repository",e); } }
private void initializeTripleStore() throws RepositoryException { /** Initialize an in-memory sesame triple store **/ myRepository = new SailRepository(new MemoryStore()); myRepository.initialize(); con = myRepository.getConnection(); f = myRepository.getValueFactory(); }
public static Representation getJsonRepresentationShortOntologies(final Collection<Ontology> ontologies, final MediaType variant, final Reference resourceReference) throws ResourceException, RepositoryException, RDFHandlerException { final Repository myRepository = new SailRepository(new MemoryStore()); myRepository.initialize(); for(final Ontology nextOntology : ontologies) { SesameUtils.toRDFRepository(nextOntology, myRepository); } return RestletUtils.toRDFSerialisation(variant.getName(), myRepository); }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); // try with Bigdata: final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); // try with Bigdata: final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
Model model = ...; // your model // create and initialize a temporary in-memory store Repository rep = new SailRepository(new MemoryStore()); rep.initialize(); try (RepositoryConnection conn = rep.getConnection()) { // load the model into the repository conn.add(model); // execute the query String query = "ASK WHERE { :s (:p1|:p2|:p3)+ :o . }"; boolean pathExists = conn.prepareBooleanQuery(query).evaluate(); }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); final BigdataSail sail = getSail(); try { // fails with UnsupportedOperationException executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeTest(new SailRepository(new MemoryStore())); // try with Bigdata: try { executeTest(new BigdataSailRepository(getSail())); } finally { getSail().__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeTest(new SailRepository(new MemoryStore())); // try with Bigdata: try { executeTest(new BigdataSailRepository(getSail())); } finally { getSail().__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); // try with Bigdata: final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); final BigdataSail sail = getSail(); try { // fails with UnsupportedOperationException executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeQuery(new SailRepository(new MemoryStore())); // try with Bigdata: final BigdataSail sail = getSail(); try { executeQuery(new BigdataSailRepository(sail)); } finally { sail.__tearDownUnitTest(); } }
public void testBug() throws Exception { // try with Sesame MemoryStore: executeTest(new SailRepository(new MemoryStore())); // try with Bigdata: try { executeTest(new BigdataSailRepository(getSail())); } finally { getSail().__tearDownUnitTest(); } }
@Before public final void setUp() throws Exception { super.setUp(); baseSail = new MemoryStore(); baseSail.initialize(); sail = new RippleSail(baseSail); sail.initialize(); addDummyData(baseSail); sc = sail.getConnection(); sc.begin(); }