CatalogConfigProviderImpl implements CatalogConfigProvider { @Activate protected void start(Map<String, Object> props) { CatalogConfig config = Configurable.createConfigurable(CatalogConfig.class, props); distributedCatalogIRI = vf.createIRI(config.iri() + "-distributed"); localCatalogIRI = vf.createIRI(config.iri() + "-local"); try (RepositoryConnection conn = repository.getConnection()) { IRI typeIRI = vf.createIRI(com.mobi.ontologies.rdfs.Resource.type_IRI); if (!conn.contains(distributedCatalogIRI, typeIRI, vf.createIRI(Catalog.TYPE))) { log.debug("Initializing the distributed Mobi Catalog."); addCatalogToRepo(distributedCatalogIRI, config.title() + " (Distributed)", config.description(), conn); } if (!conn.contains(localCatalogIRI, typeIRI, vf.createIRI(Catalog.TYPE))) { log.debug("Initializing the local Mobi Catalog."); addCatalogToRepo(localCatalogIRI, config.title() + " (Local)", config.description(), conn); } } }  @Override String getRepositoryId(); @Override Repository getRepository(); @Override IRI getDistributedCatalogIRI(); @Override IRI getLocalCatalogIRI();  }
@Test public void startTest() throws Exception { try (RepositoryConnection conn = repo.getConnection()) { assertTrue(conn.getStatements(null, null, null, localCatalogId).hasNext()); assertTrue(conn.getStatements(null, null, null, distributedCatalogId).hasNext()); } }