if (slcol != null && !slcol.isEmpty()) {
Iterator<SpecificationLink> iter = slcol.iterator();
while (iter.hasNext()) {
SpecificationLink slink = (SpecificationLink) iter.next();
TModelInstanceInfo emptyTInfo = objectFactory.createTModelInstanceInfo();
tid.getTModelInstanceInfo().add(emptyTInfo);
RegistryObject specificationObject = slink.getSpecificationObject();
if (specificationObject.getKey() != null && specificationObject.getKey().getId() != null) {
emptyTInfo.setTModelKey(specificationObject.getKey().getId());
if (specificationObject.getDescription()!=null) {
for (Object o : specificationObject.getDescription().getLocalizedStrings()) {
LocalizedString locDesc = (LocalizedString) o;
Description description = objectFactory.createDescription();
emptyTInfo.getDescription().add(description);
description.setValue(locDesc.getValue());
description.setLang(locDesc.getLocale().getLanguage());
}
}
Collection<ExternalLink> externalLinks = slink.getExternalLinks();
if (externalLinks!=null && externalLinks.size()>0) {
for (ExternalLink link : externalLinks) {
InstanceDetails ids = objectFactory.createInstanceDetails();
emptyTInfo.setInstanceDetails(ids);
if (link.getDescription()!=null) {
Description description = objectFactory.createDescription();
ids.getDescription().add(description);
description.setValue(link.getDescription().getValue());
}