Package org.openrdf.sail.memory

Examples of org.openrdf.sail.memory.MemoryStore


    }
  }

  @Override
  protected void setUp() throws Exception {
    repository = new SailRepository(new MemoryStore());
    repository.initialize();
    conn = repository.getConnection();
    conn.add(RDF.NIL, RDF.TYPE, RDF.LIST);
  }
View Full Code Here


  {
    // Create test suite
    TestSuite suite = new TestSuite();

    // Add the manifest for positive test cases to a repository and query it
    Repository repository = new SailRepository(new MemoryStore());
    repository.initialize();
    RepositoryConnection con = repository.getConnection();

    URL url = TriGParserTest.class.getResource(MANIFEST_GOOD_URL);
    con.add(url, url.toExternalForm(), RDFFormat.TURTLE);
View Full Code Here

        "James Leigh Hunt", "Megan Leigh"));
  }

  @Override
  protected void setUp() throws Exception {
    repository = new SailRepository(new MemoryStore());
    repository.initialize();
    createEmployee("james", "James Leigh", 123);
    createEmployee("jim", "James Leigh", 244);
    createEmployee("megan", "Megan Leigh", 1234);
    createEmployee("hunt", "James Leigh Hunt", 243);
View Full Code Here

  public static Test suite()
    throws Exception
  {
    // Create an RDF repository for the manifest data
    Repository repository = new SailRepository(new MemoryStore());
    repository.initialize();
    RepositoryConnection con = repository.getConnection();

    // Add W3C's manifest
    URL w3cManifest = resolveURL(W3C_MANIFEST_FILE);
View Full Code Here

  nsr.addPrefixBinding("pim", "http://www.w3.org/2000/10/swap/pim/contact#");
  nsr.addPrefixBinding("air", "http://www.daml.org/2001/10/html/airport-ont#");
  /*initializing the RDFS hierarchy*/
  fhs = new FSLSesameHierarchyStore();
  /*loading the RDF data from test file in the Sesame store*/
  sesameRepository = new SailRepository(new MemoryStore());
  try {
      sesameRepository.initialize();
      connection = sesameRepository.getConnection();
      File f = new File(MODEL_FILE_PATH);
      connection.add(f, f.toURL().toString(), RDFFormat.RDFXML);
View Full Code Here

    super(name);
  }

  @Override
  protected Repository createRepository() {
    return new SailRepository(new ForwardChainingRDFSInferencer(new MemoryStore()));
  }
View Full Code Here

    super(name);
  }

  @Override
  protected Repository createRepository() {
    return new SailRepository(new MemoryStore());
  }
View Full Code Here

  {
    if (!SAIL_TYPE.equals(config.getType())) {
      throw new SailConfigException("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

  public TupleQueryResultTest(String name)
    throws RepositoryException, IOException, UnsupportedRDFormatException, RDFParseException
  {
    super(name);

    rep = new SailRepository(new MemoryStore());
    rep.initialize();
    con = rep.getConnection();

    buildQueries();
    addData();
View Full Code Here

  return sesameRepository;
    }

    void initRepository(){
  try {
      sesameRepository = new SailRepository(new MemoryStore());
      sesameRepository.initialize();
      connection = sesameRepository.getConnection();
  }
  catch (RepositoryException ex){
      System.err.println("Error while initializing Sesame repository:");
View Full Code Here

TOP

Related Classes of org.openrdf.sail.memory.MemoryStore

Copyright © 2018 www.massapicom. 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.