Configuration conf = (Configuration)app_context.getBean("JZKitConfig");
@SuppressWarnings("unchecked")
Iterator<SearchServiceDescriptionDBO> it = conf.enumerateRepositories();
while (it.hasNext()) {
SearchServiceDescriptionDBO ssd = it.next();
Collection<CollectionDescriptionDBO> col = ssd.getCollections();
if (col.size()>0) {
Iterator<CollectionDescriptionDBO> colit = col.iterator();
if(Log.isDebugEnabled(Geonet.Z3950))
Log.debug(Geonet.Z3950, "Service "+ssd.getServiceName()+" has "+col.size()+" collections "+colit.hasNext());
while (colit.hasNext()) {
CollectionDescriptionDBO oneCol = colit.next();
if(Log.isDebugEnabled(Geonet.Z3950))
Log.debug(Geonet.Z3950, "Adding collection "+oneCol.getCode()+":"+oneCol.getCollectionName()+":"+oneCol.getLocalId()+":"+ssd.getCode());
ret.add( new RepositoryInfo( oneCol.getCode() , oneCol.getCollectionName(), oneCol.getLocalId(), ssd.getCode(), ssd.getClassName()) ) ;
}
}
}
}