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;
}
Aggregations