Package org.bedework.convert
Class Icalendar
java.lang.Object
org.bedework.convert.Icalendar
- All Implemented Interfaces:
Serializable,net.fortuna.ical4j.model.TimeZoneRegistry,org.bedework.util.calendar.ScheduleMethods
public class Icalendar
extends Object
implements net.fortuna.ical4j.model.TimeZoneRegistry, org.bedework.util.calendar.ScheduleMethods, Serializable
Class to represent an RFC icalendar object converted to an internal form.
This object acts as it's own timezone registry allowing us to handle timezones defined in the event objects which we do not store in the system timezone store.
- Version:
- 1.0
- Author:
- Mike Douglass douglm@rpi.edu
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWe may use internal timezones or be forced to use an unknown tz shipped in with an event -
Field Summary
Fields inherited from interface org.bedework.util.calendar.ScheduleMethods
methods, methodTypeAdd, methodTypeCancel, methodTypeCounter, methodTypeDeclineCounter, methodTypeNone, methodTypePollStatus, methodTypePublish, methodTypeRefresh, methodTypeReply, methodTypeRequest, methodTypeUnknown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddComponent(EventInfo val) voidAdd a timezonevoidclear()static intfindMethodType(String val) Convert to int method indexorg.bedework.util.calendar.IcalDefs.IcalComponentTypestatic StringgetMethodName(int mt) intstatic intgetMethodType(String val) An event or a free-busy request may contain an organizer.net.fortuna.ical4j.model.TimeZonegetTimeZone(String id) Iterator<?>iterator()static booleanitipReplyMethodType(int mt) True for itip reply type methodstatic booleanitipRequestMethodType(int mt) True for itip request type methodvoidregister(net.fortuna.ical4j.model.TimeZone timezone) voidregister(net.fortuna.ical4j.model.TimeZone timezone, boolean update) booleanTrue for itip reply type methodbooleanTrue for itip request type methodvoidsetCalscale(String val) voidsetComponentType(org.bedework.util.calendar.IcalDefs.IcalComponentType val) voidvoidsetMethodType(int val) voidvoidsetVersion(String val) intsize()toString()booleanTrue for valid itip methodstatic booleanvalidItipMethodType(int val) True for valid itip methodstatic booleanvalidItipMethodType(int val, org.bedework.util.calendar.IcalDefs.IcalComponentType type) True for valid itip method for given component type
-
Constructor Details
-
Icalendar
public Icalendar()
-
-
Method Details
-
setProdid
- Parameters:
val- product id
-
getProdid
- Returns:
- String
-
setVersion
- Parameters:
val- version
-
getVersion
- Returns:
- String
-
setCalscale
- Parameters:
val- cal scale
-
getCalscale
- Returns:
- String
-
setMethod
- Parameters:
val- method
-
getMethod
- Returns:
- String
-
getTimeZones
- Returns:
- Collection of timezone info
-
addTimeZone
Add a timezone- Parameters:
tzi- TimeZoneInfo
-
getComponents
- Returns:
- Collection
-
setComponentType
public void setComponentType(org.bedework.util.calendar.IcalDefs.IcalComponentType val) - Parameters:
val- component type for the collection
-
getComponentType
public org.bedework.util.calendar.IcalDefs.IcalComponentType getComponentType()- Returns:
- ComponentType
-
setMethodType
public void setMethodType(int val) - Parameters:
val- method type
-
getMethodType
public int getMethodType()- Returns:
- int
-
getMethodType
- Parameters:
val- String method name- Returns:
- int
-
getMethodName
- Parameters:
mt- method index- Returns:
- A string value for the method
-
getOrganizer
An event or a free-busy request may contain an organizer. Return it if it is present.- Returns:
- organizer object if present.
-
getEventInfo
- Returns:
- EventInfo
-
addComponent
- Parameters:
val- the (possible) event object
-
iterator
- Returns:
- Iterator
-
size
public int size()- Returns:
- int
-
validItipMethodType
public boolean validItipMethodType()True for valid itip method- Returns:
- boolean
-
requestMethodType
public boolean requestMethodType()True for itip request type method- Returns:
- boolean
-
replyMethodType
public boolean replyMethodType()True for itip reply type method- Returns:
- boolean
-
itipRequestMethodType
public static boolean itipRequestMethodType(int mt) True for itip request type method- Parameters:
mt- method- Returns:
- boolean
-
itipReplyMethodType
public static boolean itipReplyMethodType(int mt) True for itip reply type method- Parameters:
mt- method- Returns:
- boolean
-
validItipMethodType
public static boolean validItipMethodType(int val) True for valid itip method- Parameters:
val- itip method to test- Returns:
- boolean
-
validItipMethodType
public static boolean validItipMethodType(int val, org.bedework.util.calendar.IcalDefs.IcalComponentType type) True for valid itip method for given component type- Parameters:
val- itip method to testtype- component type- Returns:
- boolean
-
findMethodType
Convert to int method index- Parameters:
val- String possible method- Returns:
- int
-
register
public void register(net.fortuna.ical4j.model.TimeZone timezone) - Specified by:
registerin interfacenet.fortuna.ical4j.model.TimeZoneRegistry
-
register
public void register(net.fortuna.ical4j.model.TimeZone timezone, boolean update) - Specified by:
registerin interfacenet.fortuna.ical4j.model.TimeZoneRegistry
-
clear
public void clear()- Specified by:
clearin interfacenet.fortuna.ical4j.model.TimeZoneRegistry
-
getTimeZone
- Specified by:
getTimeZonein interfacenet.fortuna.ical4j.model.TimeZoneRegistry
-
toString
-