List<BusinessEntity> bizEntityList = bizdetail.getBusinessEntity();
if (bizEntityList.size() != 1) {
throw new JAXRException("Unexpected count of organizations in BusinessDetail: " + bizEntityList.size());
}
BusinessEntity entity = bizEntityList.get(0);
Name n = null;
if (entity.getName().size()>0) n = entity.getName().get(0);
List<Description> descriptionList = entity.getDescription();
Description desc =null;
if (descriptionList.size()>0) desc = descriptionList.get(0);
Organization org = new OrganizationImpl(lifeCycleManager);
if( n != null ) {
org.setName(getIString(n.getLang(), n.getValue(), lifeCycleManager));
}
if( desc != null ) {
org.setDescription(getIString(desc.getLang(), desc.getValue(), lifeCycleManager));
}
org.setKey(lifeCycleManager.createKey(entity.getBusinessKey()));