public class ParseContext extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ParseContext.TimezonedDate
Represents a property whose date-time value has a timezone.
|
Constructor and Description |
---|
ParseContext() |
Modifier and Type | Method and Description |
---|---|
void |
addDate(ICalDate icalDate,
ICalProperty property,
ICalParameters parameters)
Adds a parsed date to this parse context so its timezone can be applied
to it after the iCalendar object has been parsed (if it has one).
|
void |
addFloatingDate(ICalProperty property,
ICalDate date)
Keeps track of a date-time property that does not have a timezone
(floating time), so it can be added to the
TimezoneInfo object
after the iCalendar object is parsed. |
void |
addTimezonedDate(String tzid,
ICalProperty property,
ICalDate date)
Keeps track of a date-time property value that uses a timezone so it can
be parsed later.
|
void |
addWarning(int code,
Object... args)
Adds a parse warning.
|
void |
addWarning(String message)
Adds a parse warning.
|
List<ParseContext.TimezonedDate> |
getFloatingDates()
Gets the date-time properties that are in floating time (lacking a
timezone).
|
Integer |
getLineNumber()
Gets the line number the parser is currently on.
|
String |
getPropertyName()
Gets the name of the property that the parser is currently parsing.
|
ListMultimap<String,ParseContext.TimezonedDate> |
getTimezonedDates()
Gets the list of date-time property values that use a timezone.
|
ICalVersion |
getVersion()
Gets the version of the iCalendar object being parsed.
|
List<ParseWarning> |
getWarnings()
Gets the parse warnings.
|
void |
setLineNumber(Integer lineNumber)
Sets the line number the parser is currently on.
|
void |
setPropertyName(String propertyName)
Sets the name of the property that the parser is currently parsing.
|
void |
setVersion(ICalVersion version)
Sets the version of the iCalendar object being parsed.
|
public ParseContext()
public ICalVersion getVersion()
public void setVersion(ICalVersion version)
version
- the iCalendar versionpublic Integer getLineNumber()
public void setLineNumber(Integer lineNumber)
lineNumber
- the line number or null if not applicablepublic String getPropertyName()
public void setPropertyName(String propertyName)
propertyName
- the property name (e.g. "DTSTART") or null if not
applicablepublic void addDate(ICalDate icalDate, ICalProperty property, ICalParameters parameters)
icalDate
- the parsed dateproperty
- the property that the date value belongs toparameters
- the property's parameterspublic void addTimezonedDate(String tzid, ICalProperty property, ICalDate date)
tzid
- the timezone ID (TZID parameter)property
- the propertydate
- the date object that was assigned to the property objectpublic ListMultimap<String,ParseContext.TimezonedDate> getTimezonedDates()
public void addFloatingDate(ICalProperty property, ICalDate date)
TimezoneInfo
object
after the iCalendar object is parsed.property
- the propertydate
- the property's date valuepublic List<ParseContext.TimezonedDate> getFloatingDates()
public void addWarning(int code, Object... args)
code
- the warning codeargs
- the warning message argumentspublic void addWarning(String message)
message
- the warning messagepublic List<ParseWarning> getWarnings()
Copyright © 2013–2024 Michael Angstadt. All rights reserved.