private static Sail getRyaSail(Configuration config) throws AccumuloException, AccumuloSecurityException, RyaDAOException { RdfCloudTripleStore store = new RdfCloudTripleStore(); if (ConfigUtils.getUseMongo(config)) { MongoDBRdfConfiguration conf = new MongoDBRdfConfiguration(config); conf.setTablePrefix(config.get(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX)); ConfigUtils.setIndexers(conf); MongoDBRyaDAO crdfdao = new MongoDBRyaDAO(conf); crdfdao.init(); conf.setDisplayQueryPlan(true); store.setRyaDAO(crdfdao); } else { Connector connector = ConfigUtils.getConnector(config); AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(connector); AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(config); conf.setTablePrefix(config.get(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX)); // sets // TablePrefixLayoutStrategy ConfigUtils.setIndexers(conf); conf.setDisplayQueryPlan(true); crdfdao.setConf(conf); crdfdao.init(); store.setRyaDAO(crdfdao); } return store; }
private static Sail getRyaSail() throws AccumuloException, AccumuloSecurityException { Connector connector = ConfigUtils.getConnector(getConf()); final RdfCloudTripleStore store = new RdfCloudTripleStore(); AccumuloRyaDAO crdfdao = new AccumuloRyaDAO(); crdfdao.setConnector(connector); AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration(getConf()); conf.setTablePrefix(tablePrefix); crdfdao.setConf(conf); store.setRyaDAO(crdfdao); return store; }