*/
BulkResponse transformResponse(TModelList list, Collection keys,
String type) throws JAXRException {
BulkResponseImpl bResponse = new BulkResponseImpl();
if (list != null) {
bResponse = new BulkResponseImpl();
Collection fTModelResponse = new ArrayList();
TModelInfos infos = list.getTModelInfos();
//do incremental load here so can get detail
//get each TModelInfo
ConceptImpl concept = null;
Collection tkeys = new ArrayList();
Collection tinfos = infos.getTModelInfo();
Iterator iter = tinfos.iterator();
while (iter.hasNext()){
String id = ((TModelInfo)iter.next()).getTModelKey();
KeyImpl key = new KeyImpl(id);
tkeys.add(key);
}
//now do a getConcepts
//need to look at this -FIX??
Collection schemes = new ArrayList();
if (tkeys.size() > 0) {
BulkResponse response = mapper.getConcepts(tkeys);
if (response.getExceptions() == null) {
//get the objects for this
Collection rokeys = response.getCollection();
//need to return ClassificationSchemes
Iterator kiter = rokeys.iterator();
while (kiter.hasNext()) {
RegistryObject ro = (RegistryObject)kiter.next();
schemes.add(ro);
}
}
}
//set the bulk response
bResponse.setCollection(schemes);
}
return bResponse;
}