Examples of MemoryStore


Examples of org.openrdf.sail.memory.MemoryStore

    throws Exception
  {
    TestSuite suite = new TestSuite();

    // Read manifest and create declared test cases
    Repository manifestRep = new SailRepository(new MemoryStore());
    manifestRep.initialize();

    RepositoryConnection con = manifestRep.getConnection();

    logger.debug("Loading manifest data");
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

    logger.info("Building test suite for {}", manifestFileURL);

    TestSuite suite = new TestSuite(factory.getClass().getName());

    // Read manifest and create declared test cases
    Repository manifestRep = new SailRepository(new MemoryStore());
    manifestRep.initialize();
    RepositoryConnection con = manifestRep.getConnection();

    ManifestTest.addTurtle(con, new URL(manifestFileURL), manifestFileURL);
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

  @Override
  protected Sail createSail()
    throws StoreException
  {
    Sail sail = new AccessControlSail(new MemoryStore());
    sail.initialize();
    return sail;
  }
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

    throws Exception
  {
    TestSuite suite = new TestSuite(factory.getClass().getName());

    // Read manifest and create declared test cases
    Repository manifestRep = new SailRepository(new MemoryStore());
    manifestRep.initialize();

    RepositoryConnection con = manifestRep.getConnection();

    URL manifestURL = SeRQLQueryTestCase.class.getResource(MANIFEST_FILE);
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

      stream.close();
      con.close();
    }

    // Upload output data
    Repository outputRepository = new SailRepository(new MemoryStore());
    outputRepository.initialize();
    con = outputRepository.getConnection();

    stream = getClass().getResourceAsStream(outputData);
    try {
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

    TestSuite negativeTests = new TestSuite();
    negativeTests.setName("Negative Syntax Tests");

    // Read manifest and create declared test cases
    Repository manifestRep = new SailRepository(new MemoryStore());
    manifestRep.initialize();
    RepositoryConnection con = manifestRep.getConnection();

    URL manifestURL = SeRQLParserTestCase.class.getResource(MANIFEST_FILE);
    RDFFormat format = RDFFormat.forFileName(MANIFEST_FILE, RDFFormat.TURTLE);
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

    assertTrue("Repository should contain newly added statement", testCon.hasStatement(statement, false));
    assertTrue("Repository should contain newly added statement", testCon.hasMatch(alice, name, nameAlice,
        false));

    Repository tempRep = new SailRepository(new MemoryStore());
    tempRep.initialize();
    RepositoryConnection con = tempRep.getConnection();

    con.add(testCon.match(null, null, null, false));
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

  {
    if (!SAIL_TYPE.equals(config.getType())) {
      throw new StoreConfigException("Invalid Sail type: " + config.getType());
    }

    MemoryStore memoryStore = new MemoryStore();

    if (config instanceof MemoryStoreConfig) {
      MemoryStoreConfig memConfig = (MemoryStoreConfig)config;

      memoryStore.setPersist(memConfig.getPersist());
      memoryStore.setSyncDelay(memConfig.getSyncDelay());
    }

    return memoryStore;
  }
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

  private RDFWriterFactory rdfWriterFactory = new RDFaWriterFactory();

  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");

    con1.add(rdf, rdf.toExternalForm(), RDFFormat.forFileName(rdf.toExternalForm()));

    StringWriter writer = new StringWriter();
    RDFWriter rdfWriter = rdfWriterFactory.getWriter(writer);
    rdfWriter.setBaseURI(rdf.toExternalForm());
    con1.export(rdfWriter);

    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());
View Full Code Here

Examples of org.openrdf.sail.memory.MemoryStore

      "}";

    public DataStoreModel()
  {
 
    _repository = new SailRepository(new ForwardChainingRDFSInferencer(new MemoryStore()));
   
        try {
            _repository.initialize();
            con = _repository.getConnection();
        } catch (RepositoryException 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.