class TopicMapSourceManager implements TopicMapRepositoryIF {

  @Override
  public synchronized void refresh() {
    // Clear reference map
    refreshed = false;
    keyrefs.clear();
    refkeys.clear();

    // Refresh sources and rebuild reference map
    Iterator<TopicMapSourceIF> siter = sources.iterator();
    while (siter.hasNext()) {
      TopicMapSourceIF source = siter.next();
      try {
        // Refresh source
        source.refresh();
        Iterator<TopicMapReferenceIF> riter = source.getReferences().iterator();
        while (riter.hasNext()) {
          TopicMapReferenceIF ref = riter.next();
          // Create reference key and update reference map
          String refkey = createReferenceKey(ref);
          // ! System.out.println("KEY: " + refkey + " <= " + 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;
  }

  public  TopicMapSourceManager();
  public  TopicMapSourceManager(TopicMapSourceIF source);
  public  TopicMapSourceManager(Collection<TopicMapSourceIF> sources);

}