@Test public void findNamespaces() throws DatasetRegistryException, URISyntaxException { assertThat(createDatasetRegistry().findNamespaces(), hasItem("globalbioticinteractions/template-dataset")); }
@Override public Collection<String> findNamespaces() throws DatasetRegistryException { File directory = new File(cacheDir); Collection<String> namespaces = Collections.emptyList(); if (directory.exists() && directory.isDirectory()) { namespaces = collectNamespaces(directory); } else { LOG.warn("Directory [" + cacheDir + "] does not exist."); } return namespaces; }
DatasetRegistryLocal implements DatasetRegistry { @Override public Collection<String> findNamespaces() throws DatasetRegistryException { File directory = new File(cacheDir); Collection<String> namespaces = Collections.emptyList(); if (directory.exists() && directory.isDirectory()) { namespaces = collectNamespaces(directory); } else { LOG.warn("Directory [" + cacheDir + "] does not exist."); } return namespaces; } }
DatasetRegistryLocal implements DatasetRegistry { @Override public Collection<String> findNamespaces() throws DatasetRegistryException { File directory = new File(cacheDir); Collection<String> namespaces = Collections.emptyList(); if (directory.exists() && directory.isDirectory()) { namespaces = collectNamespaces(directory); } else { LOG.warn("Directory [" + cacheDir + "] does not exist."); } return namespaces; } DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory);  DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory, InputStreamFactory factory); }
DatasetRegistryLocal implements DatasetRegistry { @Override public Collection<String> findNamespaces() throws DatasetRegistryException { File directory = new File(cacheDir); Collection<String> namespaces = Collections.emptyList(); if (directory.exists() && directory.isDirectory()) { namespaces = collectNamespaces(directory); } else { LOG.warn("Directory [" + cacheDir + "] does not exist."); } return namespaces; } DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory);  DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory, InputStreamFactory factory); @Override Collection<String> findNamespaces(); @Override Dataset datasetFor(String namespace); }
DatasetRegistryLocal implements DatasetRegistry { @Override public Collection<String> findNamespaces() throws DatasetRegistryException { File directory = new File(cacheDir); Collection<String> namespaces = Collections.emptyList(); if (directory.exists() && directory.isDirectory()) { namespaces = collectNamespaces(directory); } else { LOG.warn("Directory [" + cacheDir + "] does not exist."); } return namespaces; } DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory);  DatasetRegistryLocal(String cacheDir, CacheFactory cacheFactory, InputStreamFactory factory); @Override Collection<String> findNamespaces(); @Override Dataset datasetFor(String namespace);  }