*/
public class MpxCalendarConverter {
public void from(ProjectCalendar mpxCalendar, WorkCalendar calendar, MpxImportState state){
calendar.setName(mpxCalendar.getName());
state.getCalendarManager().fixBaseCalendar(calendar, state.getProjectTitle());
calendar.setId(new CalendarId(mpxCalendar.getUniqueID()));
//base calendar
WorkCalendar standardCalendar = state.getCalendarManager().getStandardBaseCalendar();
ProjectCalendar mpxBaseCalendar=null;
WorkCalendar baseCalendar=null;
if (mpxCalendar.isDerived()) {
mpxBaseCalendar = mpxCalendar.getParent();
if (mpxBaseCalendar==null){
mpxBaseCalendar=state.getMpxStandardBaseCalendar();
}
baseCalendar=state.getCalendarManager().getCalendar(new CalendarId(mpxBaseCalendar.getUniqueID()));
if (baseCalendar == null)
baseCalendar = standardCalendar;
calendar.setBase(baseCalendar);
}