private static List<Agent> prepareContributorsFromEmlAgents(List<Agent> contacts,List<Agent> metadataProviders,List<Agent> associatedParties){
  List<Agent> ls=Lists.newArrayList();
  for (  Agent contact : contacts) {
    contact.setRole(CONTACT_ROLE);
  }
  ls.addAll(contacts);
  for (  Agent metadataProvider : metadataProviders) {
    metadataProvider.setRole(METADATA_PROVIDER_ROLE);
  }
  ls.addAll(metadataProviders);
  ls.addAll(associatedParties);
  return ls;
}

private static List < Agent > prepareContributorsFromEmlAgents ( List < Agent > contacts , List < Agent > metadataProviders , List < Agent > associatedParties ) { List < Agent > ls = Lists . newArrayList ( ) ; for ( Agent contact : contacts ) { contact . setRole ( CONTACT_ROLE ) ; } ls . addAll ( contacts ) ; for ( Agent metadataProvider : metadataProviders ) { metadataProvider . setRole ( METADATA_PROVIDER_ROLE ) ; } ls . addAll ( metadataProviders ) ; ls . addAll ( associatedParties ) ; return ls ; }
datacite contributors are created from the combined set of eml contact , metadataprovider and associatedparty agents . metadataprovider and contact agents don ' t have a role , so set . the role is converted to datacite contributortype in later processing .
