public class RecurrenceSet extends Object
Modifier and Type | Field and Description |
---|---|
long[] |
exdates |
EventRecurrence[] |
exrules |
long[] |
rdates |
EventRecurrence[] |
rrules |
Constructor and Description |
---|
RecurrenceSet(ContentValues values)
Creates a new RecurrenceSet from information stored in the
events table in the CalendarProvider.
|
RecurrenceSet(Cursor cursor)
Creates a new RecurrenceSet from information stored in a database
Cursor pointing to the events table in the
CalendarProvider. |
RecurrenceSet(String rruleStr,
String rdateStr,
String exruleStr,
String exdateStr) |
Modifier and Type | Method and Description |
---|---|
static void |
addPropertiesForRuleStr(ICalendar.Component component,
String propertyName,
String ruleStr) |
static void |
addPropertyForDateStr(ICalendar.Component component,
String propertyName,
String dateStr) |
static String |
fold(String unfoldedIcalContent)
fold and unfolds ical content lines as per RFC 2445 section 4.1.
|
boolean |
hasRecurrence()
Returns whether or not a recurrence is defined in this RecurrenceSet.
|
static long[] |
parseRecurrenceDates(String recurrence)
Parses the provided RDATE or EXDATE string into an array of longs
representing each date/time in the recurrence.
|
static boolean |
populateComponent(ContentValues values,
ICalendar.Component component) |
static boolean |
populateComponent(Cursor cursor,
ICalendar.Component component) |
static boolean |
populateContentValues(ICalendar.Component component,
ContentValues values)
Populates the database map of values with the appropriate RRULE, RDATE,
EXRULE, and EXDATE values extracted from the parsed iCalendar component.
|
static String |
unfold(String foldedIcalContent) |
public EventRecurrence[] rrules
public long[] rdates
public EventRecurrence[] exrules
public long[] exdates
public RecurrenceSet(ContentValues values) throws EventRecurrence.InvalidFormatException
values
- The values retrieved from the Events table.EventRecurrence.InvalidFormatException
public RecurrenceSet(Cursor cursor) throws EventRecurrence.InvalidFormatException
Cursor
pointing to the events table in the
CalendarProvider. The cursor must contain the RRULE, RDATE, EXRULE,
and EXDATE columns.cursor
- The cursor containing the RRULE, RDATE, EXRULE, and EXDATE
columns.EventRecurrence.InvalidFormatException
public RecurrenceSet(String rruleStr, String rdateStr, String exruleStr, String exdateStr) throws EventRecurrence.InvalidFormatException
public boolean hasRecurrence()
public static long[] parseRecurrenceDates(String recurrence) throws EventRecurrence.InvalidFormatException
recurrence
- The recurrence to be parsed.EventRecurrence.InvalidFormatException
public static boolean populateContentValues(ICalendar.Component component, ContentValues values)
component
- The iCalendar component containing the desired
recurrence specification.values
- The db values that should be updated.public static boolean populateComponent(Cursor cursor, ICalendar.Component component)
public static boolean populateComponent(ContentValues values, ICalendar.Component component)
public static void addPropertiesForRuleStr(ICalendar.Component component, String propertyName, String ruleStr)
public static String fold(String unfoldedIcalContent)
The iCalendar object is organized into individual lines of text, called content lines. Content lines are delimited by a line break, which is a CRLF sequence (US-ASCII decimal 13, followed by US-ASCII decimal 10).
Lines of text SHOULD NOT be longer than 75 octets, excluding the line break. Long content lines SHOULD be split into a multiple line representations using a line "folding" technique. That is, a long line can be split between any two characters by inserting a CRLF immediately followed by a single linear white space character (i.e., SPACE, US-ASCII decimal 32 or HTAB, US-ASCII decimal 9). Any sequence of CRLF followed immediately by a single linear white space character is ignored (i.e., removed) when processing the content type.
public static void addPropertyForDateStr(ICalendar.Component component, String propertyName, String dateStr)