Пример #1
0
        public void parse(org.openrdf.model.Graph g, org.openrdf.model.Resource r)
        {
            Graph         config  = new Graph();
            SesameMapping mapping = new SesameMapping(config, g);

            SesameConverter.FromSesame(g, config);

            this._name = r.stringValue().Substring(r.stringValue().LastIndexOf(":") + 1);

            Object temp = ConfigurationLoader.LoadObject(config, SesameConverter.FromSesameResource(r, mapping));

            if (temp is IInMemoryQueryableStore)
            {
                this._repo = new DotNetRdfInMemoryRepository((IInMemoryQueryableStore)temp);
            }
            else if (temp is IGenericIOManager)
            {
                this._repo = new DotNetRdfGenericRepository((IGenericIOManager)temp);
            }
            else
            {
                throw new dotSesameRepo.config.RepositoryConfigException("Unable to load Configuration for the Repository as the loaded Object was not an IInMemoryQueryableStore or an IGenericIOManager implementation");
            }
        }
Пример #2
0
        public void parse(org.openrdf.model.Graph g, org.openrdf.model.Resource r)
        {
            Graph config = new Graph();
            SesameMapping mapping = new SesameMapping(config, g);
            SesameConverter.FromSesame(g, config);

            this._name = r.stringValue().Substring(r.stringValue().LastIndexOf(":") + 1);

            Object temp = ConfigurationLoader.LoadObject(config, SesameConverter.FromSesameResource(r, mapping));
            if (temp is IInMemoryQueryableStore)
            {
                this._repo = new DotNetRdfInMemoryRepository((IInMemoryQueryableStore)temp);
            }
            else if (temp is IGenericIOManager)
            {
                this._repo = new DotNetRdfGenericRepository((IGenericIOManager)temp);
            }
            else
            {
                throw new dotSesameRepo.config.RepositoryConfigException("Unable to load Configuration for the Repository as the loaded Object was not an IInMemoryQueryableStore or an IGenericIOManager implementation");
            }
        }
Пример #3
0
 public void SetGenericStore(IGenericIOManager manager)
 {
     this._repo = new DotNetRdfGenericRepository(manager);
 }
Пример #4
0
 public void SetInMemoryStore(IInMemoryQueryableStore store)
 {
     this._repo = new DotNetRdfInMemoryRepository(store);
 }
Пример #5
0
 public BaseRepositoryConnection(dotSesameRepo.Repository repository, DotNetRdfValueFactory factory)
 {
     this._repo = repository;
     this._mapping = factory.Mapping;
     this._factory = factory;
 }
Пример #6
0
 public BaseRepositoryConnection(dotSesameRepo.Repository repository, DotNetRdfValueFactory factory)
 {
     this._repo    = repository;
     this._mapping = factory.Mapping;
     this._factory = factory;
 }
Пример #7
0
 public void SetGenericStore(IGenericIOManager manager)
 {
     this._repo = new DotNetRdfGenericRepository(manager);
 }
Пример #8
0
 public void SetInMemoryStore(IInMemoryQueryableStore store)
 {
     this._repo = new DotNetRdfInMemoryRepository(store);
 }