private static ParticipantBean adaptParticipant(Participant participant, CollaborationBean c, DefinitionsBean defs) {
ParticipantBean result = new ParticipantBean(participant.getId());
result.setName(participant.getName());
result.setInterfaces(findInterfaces(defs, participant.getInterfaceRef()));
result.setEndPoints(findEndPoints(defs, participant.getEndPointRef()));
if(participant.getProcessRef()!=null){
IProcessBean pBean = findProcess(defs, participant.getProcessRef().getLocalPart());
result.setProcess(pBean);
pBean.setDefinitionalCollaboration(c);
}
else {
result.setProcess(null);
}
setDocumentationAndExtensions(result, participant);
c.addParticipant(result);
elements.put(result.getId(), result);
return result;
}