Example #1
0
 public DotNetRdfGenericRepositoryConnection(DotNetRdfGenericRepository repo, IGenericIOManager manager, DotNetRdfValueFactory factory)
     : base(repo, factory)
 {
     this._repo    = repo;
     this._manager = manager;
     this._factory = factory;
 }
        public void InteropSesameContextsForVirtuoso()
        {
            VirtuosoManager virtuoso = new VirtuosoManager("DB", "dba", "dba");

            DotNetRdfGenericRepository repo = new DotNetRdfGenericRepository(virtuoso);

            dotSesameRepo.RepositoryConnection conn = repo.getConnection();

            dotSesameRepo.RepositoryResult result = conn.getContextIDs();
            while (result.hasNext())
            {
                dotSesame.Resource r = result.next() as dotSesame.Resource;
                Assert.IsTrue(r != null, "Should not be null");
                Console.WriteLine(r.ToString());
            }
        }
        public void InteropSesameLoadFromVirtuoso()
        {
            VirtuosoManager virtuoso = new VirtuosoManager("DB", "dba", "dba");

            DotNetRdfGenericRepository repo = new DotNetRdfGenericRepository(virtuoso);

            dotSesameRepo.RepositoryConnection conn = repo.getConnection();

            dotSesame.Resource[] contexts = new dotSesame.Resource[] { repo.getValueFactory().createURI("http://localhost/TurtleImportTest") };

            dotSesameRepo.RepositoryResult result = conn.getStatements(null, null, null, true, contexts);
            while (result.hasNext())
            {
                dotSesame.Statement r = result.next() as dotSesame.Statement;
                Assert.IsTrue(r != null, "Should not be null");
                Console.WriteLine(r.ToString());
            }
        }
 public DotNetRdfGenericRepositoryConnection(DotNetRdfGenericRepository repo, IGenericIOManager manager, DotNetRdfValueFactory factory)
     : base(repo, factory)
 {
     this._repo = repo;
     this._manager = manager;
     this._factory = factory;
 }