Search in sources :

Example 1 with OrganizerPropType

use of ietf.params.xml.ns.icalendar_2.OrganizerPropType in project bw-calendar-engine by Bedework.

the class ToXEvent method makeOrganizer.

/**
 * @param val
 * @return Organizer
 * @throws Throwable
 */
public static OrganizerPropType makeOrganizer(final BwOrganizer val) throws Throwable {
    OrganizerPropType prop = new OrganizerPropType();
    prop.setCalAddress(val.getOrganizerUri());
    ArrayOfParameters pars = new ArrayOfParameters();
    JAXBElement<? extends BaseParameterType> param;
    prop.setParameters(pars);
    String temp = val.getScheduleStatus();
    if (temp != null) {
        ScheduleStatusParamType ss = new ScheduleStatusParamType();
        ss.setText(temp);
        param = of.createScheduleStatus(ss);
        pars.getBaseParameter().add(param);
    }
    temp = val.getCn();
    if (temp != null) {
        CnParamType cn = new CnParamType();
        cn.setText(temp);
        param = of.createCn(cn);
        pars.getBaseParameter().add(param);
    }
    temp = val.getDir();
    if (temp != null) {
        DirParamType d = new DirParamType();
        d.setUri(temp);
        param = of.createDir(d);
        pars.getBaseParameter().add(param);
    }
    temp = val.getLanguage();
    if (temp != null) {
        LanguageParamType l = new LanguageParamType();
        l.setText(temp);
        param = of.createLanguage(l);
        pars.getBaseParameter().add(param);
    }
    temp = val.getSentBy();
    if (temp != null) {
        SentByParamType sb = new SentByParamType();
        sb.setCalAddress(temp);
        param = of.createSentBy(sb);
        pars.getBaseParameter().add(param);
    }
    return prop;
}
Also used : DirParamType(ietf.params.xml.ns.icalendar_2.DirParamType) LanguageParamType(ietf.params.xml.ns.icalendar_2.LanguageParamType) ScheduleStatusParamType(ietf.params.xml.ns.icalendar_2.ScheduleStatusParamType) OrganizerPropType(ietf.params.xml.ns.icalendar_2.OrganizerPropType) ArrayOfParameters(ietf.params.xml.ns.icalendar_2.ArrayOfParameters) BwString(org.bedework.calfacade.BwString) SentByParamType(ietf.params.xml.ns.icalendar_2.SentByParamType) CnParamType(ietf.params.xml.ns.icalendar_2.CnParamType)

Aggregations

ArrayOfParameters (ietf.params.xml.ns.icalendar_2.ArrayOfParameters)1 CnParamType (ietf.params.xml.ns.icalendar_2.CnParamType)1 DirParamType (ietf.params.xml.ns.icalendar_2.DirParamType)1 LanguageParamType (ietf.params.xml.ns.icalendar_2.LanguageParamType)1 OrganizerPropType (ietf.params.xml.ns.icalendar_2.OrganizerPropType)1 ScheduleStatusParamType (ietf.params.xml.ns.icalendar_2.ScheduleStatusParamType)1 SentByParamType (ietf.params.xml.ns.icalendar_2.SentByParamType)1 BwString (org.bedework.calfacade.BwString)1