Iterator<Element> iter = modelPersonList.iterator();
while ( iter.hasNext() )
{
Element elemPerson = iter.next();
Individual individual = new Individual();
if ( isCommitor )
{
individual.setPrincipal( elemPerson.elementTextTrim( "id" ) );
}
individual.setCommitor( isCommitor );
individual.setEmail( elemPerson.elementTextTrim( "email" ) );
individual.setName( elemPerson.elementTextTrim( "name" ) );
individual.setOrganization( elemPerson.elementTextTrim( "organization" ) );
individual.setOrganizationUrl( elemPerson.elementTextTrim( "organizationUrl" ) );
individual.setUrl( elemPerson.elementTextTrim( "url" ) );
individual.setTimezone( elemPerson.elementTextTrim( "timezone" ) );
individual.setIndividualEmail( elemPerson.elementTextTrim( "email" ) );
// Roles
Element elemRoles = elemPerson.element( "roles" );
if ( elemRoles != null )
{
List<Element> roleNames = elemRoles.elements( "role" );
Iterator<Element> itRole = roleNames.iterator();
while ( itRole.hasNext() )
{
Element role = itRole.next();
individual.addRole( role.getTextTrim() );
}
}
// Properties
individual.setProperties( getProperties( elemPerson.element( "properties" ) ) );
ret.add( individual );
}
return ret;