* - eurekastreams person to be converted.
* @return converted person object.
*/
private Person convertToOSPerson(final PersonModelView inPerson)
{
Person osPerson = new PersonImpl();
// Populate the OpenSocial person properties.
osPerson.setName(new NameImpl(inPerson.getDisplayName()));
osPerson.setDisplayName(inPerson.getDisplayName());
osPerson.setId(inPerson.getOpenSocialId());
osPerson.setAboutMe(inPerson.getDescription());
osPerson.setProfileUrl(containerBaseUrl + "/#people/" + inPerson.getAccountId());
List<ListField> emailList = new ArrayList<ListField>();
emailList.add(new ListFieldImpl("primary", inPerson.getEmail()));
osPerson.setEmails(emailList);
AvatarUrlGenerator generator = new AvatarUrlGenerator(EntityType.PERSON);
osPerson.setThumbnailUrl(containerBaseUrl + generator.getNormalAvatarUrl(inPerson.getAvatarId()));
osPerson.setAccounts(Collections.singletonList((Account) new AccountImpl(accountTopLevelDomain, null, inPerson
.getAccountId())));
return osPerson;
}