Package org.openrdf.repository

Examples of org.openrdf.repository.Repository.initialize()


  {
    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


  protected Repository createRepository()
    throws Exception
  {
    Repository repo = newRepository();
    repo.initialize();
    RepositoryConnection con = repo.getConnection();
    try {
      con.clear();
      con.clearNamespaces();
    }
View Full Code Here

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

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

  {
    sail = new SailImpl();
    sail = new AccessControlSail(sail);
    Repository repository = new SailRepository(sail);
    repository.setDataDir(dataDir);
    repository.initialize();
    return repository;
  }

  private static void uploadAclData(Repository repository)
    throws Exception
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 = SeRQLParserTestCase.class.getResource(MANIFEST_FILE);
    RDFFormat format = RDFFormat.forFileName(MANIFEST_FILE, RDFFormat.TURTLE);
    con.add(manifestURL, base(manifestURL.toExternalForm()), format);
View Full Code Here

  protected Repository createRepository(File dataDir, String entailment)
    throws Exception
  {
    Repository dataRep = new SailRepository(createSail(entailment));
    dataRep.setDataDir(dataDir);
    dataRep.initialize();

    RepositoryConnection con = dataRep.getConnection();
    try {
      con.clear();
      con.clearNamespaces();
View Full Code Here

  protected Repository createRepository(File dataDir)
    throws Exception
  {
    Repository repository = new SailRepository(newSail());
    repository.setDataDir(dataDir);
    repository.initialize();
    return repository;
  }

  protected NotifyingSail createSail(String entailment)
    throws Exception
View Full Code Here

  {
    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);
    RDFFormat format = RDFFormat.forFileName(MANIFEST_FILE, RDFFormat.TURTLE);
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();

    // clear the input store
    con.clear();
View Full Code Here

      con.close();
    }

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

    stream = getClass().getResourceAsStream(outputData);
    try {
      con.add(stream, outputData, RDFFormat.NTRIPLES);
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.