@Test public void testEmpty() { verifyEmptyManager(""); manager.refresh(); verifyEmptyManager(" after refresh"); }
@Override public synchronized void refresh() { refreshed = false; keyrefs.clear(); refkeys.clear(); Iterator<TopicMapSourceIF> siter = sources.iterator(); while (siter.hasNext()) { TopicMapSourceIF source = siter.next(); try { source.refresh(); Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator(); while (riter.hasNext()) { TopicMapReferenceIF ref = riter.next(); String refkey = createReferenceKey(ref); keyrefs.put(refkey, ref); refkeys.put(ref, refkey); } } catch (Throwable t) { log.error("Could not refresh topic map source " + source + ". Ignoring.", t); } } refreshed = true; }
TopicMapSourceManager implements TopicMapRepositoryIF { @Override public synchronized void refresh() { refreshed = false; keyrefs.clear(); refkeys.clear(); Iterator<TopicMapSourceIF> siter = sources.iterator(); while (siter.hasNext()) { TopicMapSourceIF source = siter.next(); try { source.refresh(); Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator(); while (riter.hasNext()) { TopicMapReferenceIF ref = riter.next(); String refkey = createReferenceKey(ref); keyrefs.put(refkey, ref); refkeys.put(ref, refkey); } } catch (Throwable t) { log.error("Could not refresh topic map source " + source + ". Ignoring.", t); } } refreshed = true; } }
TopicMapSourceManager implements TopicMapRepositoryIF { @Override public synchronized void refresh() { refreshed = false; keyrefs.clear(); refkeys.clear(); Iterator<TopicMapSourceIF> siter = sources.iterator(); while (siter.hasNext()) { TopicMapSourceIF source = siter.next(); try { source.refresh(); Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator(); while (riter.hasNext()) { TopicMapReferenceIF ref = riter.next(); String refkey = createReferenceKey(ref); keyrefs.put(refkey, ref); refkeys.put(ref, refkey); } } catch (Throwable t) { log.error("Could not refresh topic map source " + source + ". Ignoring.", t); } } refreshed = true; } TopicMapSourceManager();  TopicMapSourceManager(TopicMapSourceIF source);  TopicMapSourceManager(Collection<TopicMapSourceIF> sources); }
TopicMapSourceManager implements TopicMapRepositoryIF { @Override public synchronized void refresh() { refreshed = false; keyrefs.clear(); refkeys.clear(); Iterator<TopicMapSourceIF> siter = sources.iterator(); while (siter.hasNext()) { TopicMapSourceIF source = siter.next(); try { source.refresh(); Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator(); while (riter.hasNext()) { TopicMapReferenceIF ref = riter.next(); String refkey = createReferenceKey(ref); keyrefs.put(refkey, ref); refkeys.put(ref, refkey); } } catch (Throwable t) { log.error("Could not refresh topic map source " + source + ". Ignoring.", t); } } refreshed = true; } TopicMapSourceManager();  TopicMapSourceManager(TopicMapSourceIF source);  TopicMapSourceManager(Collection<TopicMapSourceIF> sources); @Override synchronized Collection<TopicMapReferenceIF> getReferences(); @Override synchronized Collection<String> getReferenceKeys(); @Override synchronized TopicMapReferenceIF getReferenceByKey(String key); @Override synchronized String getReferenceKey(TopicMapReferenceIF ref); @Override TopicMapStoreIF createStore(String refkey, boolean readonly); @Override synchronized TopicMapSourceIF getSourceById(String source_id); @Override synchronized Collection<TopicMapSourceIF> getSources(); @Override synchronized void addSource(TopicMapSourceIF source); @Override synchronized void removeSource(TopicMapSourceIF source); @Override synchronized void refresh(); @Override synchronized void close(); @Deprecated TopicMapReferenceIF getReferenceById(String reference_id); @Deprecated boolean hasId(String reference_id); @Deprecated Collection<String> getIds(); }
TopicMapSourceManager implements TopicMapRepositoryIF { @Override public synchronized void refresh() { refreshed = false; keyrefs.clear(); refkeys.clear(); Iterator<TopicMapSourceIF> siter = sources.iterator(); while (siter.hasNext()) { TopicMapSourceIF source = siter.next(); try { source.refresh(); Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator(); while (riter.hasNext()) { TopicMapReferenceIF ref = riter.next(); String refkey = createReferenceKey(ref); keyrefs.put(refkey, ref); refkeys.put(ref, refkey); } } catch (Throwable t) { log.error("Could not refresh topic map source " + source + ". Ignoring.", t); } } refreshed = true; } TopicMapSourceManager();  TopicMapSourceManager(TopicMapSourceIF source);  TopicMapSourceManager(Collection<TopicMapSourceIF> sources); @Override synchronized Collection<TopicMapReferenceIF> getReferences(); @Override synchronized Collection<String> getReferenceKeys(); @Override synchronized TopicMapReferenceIF getReferenceByKey(String key); @Override synchronized String getReferenceKey(TopicMapReferenceIF ref); @Override TopicMapStoreIF createStore(String refkey, boolean readonly); @Override synchronized TopicMapSourceIF getSourceById(String source_id); @Override synchronized Collection<TopicMapSourceIF> getSources(); @Override synchronized void addSource(TopicMapSourceIF source); @Override synchronized void removeSource(TopicMapSourceIF source); @Override synchronized void refresh(); @Override synchronized void close(); @Deprecated TopicMapReferenceIF getReferenceById(String reference_id); @Deprecated boolean hasId(String reference_id); @Deprecated Collection<String> getIds();  }