protected IMetadataRepository getRepository(IRepositoryManager<IInstallableUnit> manager, URI location) { // note the use of MetadataRepositoryManager (the concrete implementation). if (manager instanceof MetadataRepositoryManager) { return ((MetadataRepositoryManager) manager).getRepository(location); } return null; }
public boolean hasQueryable() { if (queryable != null) return true; if (location == null) return false; IMetadataRepositoryManager manager = getMetadataRepositoryManager(); if (manager == null || !(manager instanceof MetadataRepositoryManager)) return false; IMetadataRepository repo = ((MetadataRepositoryManager) manager).getRepository(location); if (repo == null) return false; queryable = repo; return true; }