Package org.bedework.util.calendar
Class WsXMLTranslator
- java.lang.Object
-
- org.bedework.util.calendar.WsXMLTranslator
-
- All Implemented Interfaces:
Consumer<net.fortuna.ical4j.model.Calendar>
public class WsXMLTranslator extends Object implements Consumer<net.fortuna.ical4j.model.Calendar>
Convert to/from Web Services style XML. On input this has been parsed by the framework. For output we need to build a JAXB compliant structure.For the moment we build an ical4j structure and use that to create events
- Author:
- douglm
-
-
Constructor Summary
Constructors Constructor Description WsXMLTranslator(net.fortuna.ical4j.model.TimeZoneRegistry tzRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(net.fortuna.ical4j.model.Calendar calendar)static voiderror(Throwable t)StringfromRecurProperty(ietf.params.xml.ns.icalendar_2.RecurPropertyType rp)net.fortuna.ical4j.model.CalendarfromXcal(ietf.params.xml.ns.icalendar_2.IcalendarType ical)net.fortuna.ical4j.model.CalendarfromXcomp(javax.xml.bind.JAXBElement<? extends ietf.params.xml.ns.icalendar_2.BaseComponentType> comp)static voidwarn(String msg)
-
-
-
Method Detail
-
accept
public void accept(net.fortuna.ical4j.model.Calendar calendar)
-
fromXcal
public net.fortuna.ical4j.model.Calendar fromXcal(ietf.params.xml.ns.icalendar_2.IcalendarType ical)
- Parameters:
ical- xCal Icalendar object- Returns:
- Calendar object or null for no data
- Throws:
RuntimeException- on fatal error
-
fromXcomp
public net.fortuna.ical4j.model.Calendar fromXcomp(javax.xml.bind.JAXBElement<? extends ietf.params.xml.ns.icalendar_2.BaseComponentType> comp)
- Parameters:
comp- xCal component- Returns:
- Calendar object or null for no data
- Throws:
RuntimeException- on fatal error
-
fromRecurProperty
public String fromRecurProperty(ietf.params.xml.ns.icalendar_2.RecurPropertyType rp)
- Parameters:
rp- recurrence property- Returns:
- iCalendar recurrence rule value
-
error
public static void error(Throwable t)
- Parameters:
t- Throwable
-
warn
public static void warn(String msg)
- Parameters:
msg- message
-
-