Beispiel #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");
            }
        }
        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");
            }
        }
 public void SetGenericStore(IGenericIOManager manager)
 {
     this._repo = new DotNetRdfGenericRepository(manager);
 }
 public void SetInMemoryStore(IInMemoryQueryableStore store)
 {
     this._repo = new DotNetRdfInMemoryRepository(store);
 }
 public BaseRepositoryConnection(dotSesameRepo.Repository repository, DotNetRdfValueFactory factory)
 {
     this._repo = repository;
     this._mapping = factory.Mapping;
     this._factory = factory;
 }
Beispiel #6
0
 public BaseRepositoryConnection(dotSesameRepo.Repository repository, DotNetRdfValueFactory factory)
 {
     this._repo    = repository;
     this._mapping = factory.Mapping;
     this._factory = factory;
 }
Beispiel #7
0
 public void SetGenericStore(IGenericIOManager manager)
 {
     this._repo = new DotNetRdfGenericRepository(manager);
 }
Beispiel #8
0
 public void SetInMemoryStore(IInMemoryQueryableStore store)
 {
     this._repo = new DotNetRdfInMemoryRepository(store);
 }