private static void adaptChoreographies(DefinitionsBean def, Choreography[] choreographies) {
if(choreographies!=null){
for(Choreography chor : choreographies){
ChoreographyBean cBean = new ChoreographyBean(chor.getId());
def.addChoreography(cBean);
cBean.setParentDefinitions(def);
cBean.setName(chor.getName());
cBean.setClosed(chor.isIsClosed());
setDocumentationAndExtensions(cBean, chor);
if(chor.getParticipant()!=null){
for(Participant p : chor.getParticipant()){
ParticipantBean pBean = adaptParticipant(p,cBean,def);
elements.put(pBean.getId(), pBean);
if(chor.getFlowElement()!=null){
fillChoreography(cBean,chor,def);
if(chor.getMessageFlow()!=null){
for(MessageFlow mf : chor.getMessageFlow()){
MessageFlowBean mfb = adaptMessageFlow(mf,cBean,def);
elements.put(mfb.getId(), mfb);
if(chor.getFlowElementsByClass(SequenceFlow.class)!=null){
for(SequenceFlow sf : chor.getFlowElementsByClass(SequenceFlow.class)){
adaptSequenceFlow(sf, cBean, def);