if (list != null) {
TModelInfos infos = list.getTModelInfos();
if (infos != null) {
List<TModelInfo> tmodelInfoList = infos.getTModelInfo();
if (tmodelInfoList.size() > 1) {
throw new InvalidRequestException("Multiple matches found:" + tmodelInfoList.size());
}
if (tmodelInfoList.size() ==1) {
TModelInfo info = tmodelInfoList.get(0);
scheme = new ClassificationSchemeImpl(registryService.getLifeCycleManagerImpl());
scheme.setName(new InternationalStringImpl(info.getName().getValue()));