Package org.openrdf.repository.sail

Examples of org.openrdf.repository.sail.SailRepository.initialize()


    con1.export(rdfWriter);

    con1.close();

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

    RepositoryConnection con2 = rep2.getConnection();

    con2.add(new StringReader(writer.toString()), "foo:bar", RDFFormat.RDFXML);
    con2.close();
View Full Code Here


  {
    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");
    URL manifest = new URL(MANIFEST_FILE);
View Full Code Here

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

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

    con.add(testCon.getStatements(null, null, null, false));

    assertTrue("Temp Repository should contain newly added statement", con.hasStatement(bob, name, nameBob,
View Full Code Here

    TestSuite suite = new TestSuite();

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

    con.add(new URL(manifestFileURL), manifestFileURL, RDFFormat.TURTLE);

    suite.setName(getManifestName(manifestRep, con, manifestFileURL));
View Full Code Here

      sail.shutDown();
      fail("Invalid value for entailment level:" + entailment);
    }

    Repository dataRep = new SailRepository(sail);
    dataRep.initialize();

    RepositoryConnection dataCon = dataRep.getConnection();

    // Add unnamed gaph
    dataCon.add(new URL(dataFile), null, RDFFormat.forFileName(dataFile));
View Full Code Here

    dataCon.close();
    dataRep.shutDown();

    // Create a repository with the expected result data
    Repository expectedResultRep = new SailRepository(new MemoryStore());
    expectedResultRep.initialize();

    RepositoryConnection erCon = expectedResultRep.getConnection();

    erCon.add(new URL(resultFile), null, RDFFormat.forFileName(resultFile));
View Full Code Here

  {
    TestSuite suite = new TestSuite();

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

    RepositoryConnection con = manifestRep.getConnection();

    URL manifestURL = SeRQLQueryTest.class.getResource(MANIFEST_FILE);
    con.add(manifestURL, null, RDFFormat.forFileName(MANIFEST_FILE));
View Full Code Here

    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 = SeRQLParserTest.class.getResource(MANIFEST_FILE);
    con.add(manifestURL, null, RDFFormat.forFileName(MANIFEST_FILE));
View Full Code Here

    throws Exception
  {
    TestSuite suite = new TestSuite();

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

    con.add(new URL(MANIFEST_FILE), MANIFEST_FILE, RDFFormat.TURTLE);

    String query = "SELECT DISTINCT manifestFile " + "FROM {x} rdf:first {manifestFile} "
View Full Code Here

  {
    Collection<? extends Statement> entailedStatements = null;
    Collection<? extends Statement> expectedStatements = null;

    Repository repository = new SailRepository(sailStack);
    repository.initialize();

    RepositoryConnection con = repository.getConnection();
    con.setAutoCommit(false);

    // clear the input store
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.