Class CalendarParsedResult

java.lang.Object
com.google.zxing.client.result.ParsedResult
com.google.zxing.client.result.CalendarParsedResult

public final class CalendarParsedResult extends ParsedResult
Represents a parsed result that encodes a calendar event at a certain time, optionally with attendees and a location.
  • Field Details

    • RFC2445_DURATION

      private static final Pattern RFC2445_DURATION
    • RFC2445_DURATION_FIELD_UNITS

      private static final long[] RFC2445_DURATION_FIELD_UNITS
    • DATE_TIME

      private static final Pattern DATE_TIME
    • summary

      private final String summary
    • start

      private final long start
    • startAllDay

      private final boolean startAllDay
    • end

      private final long end
    • endAllDay

      private final boolean endAllDay
    • location

      private final String location
    • organizer

      private final String organizer
    • attendees

      private final String[] attendees
    • description

      private final String description
    • latitude

      private final double latitude
    • longitude

      private final double longitude
  • Constructor Details

    • CalendarParsedResult

      public CalendarParsedResult(String summary, String startString, String endString, String durationString, String location, String organizer, String[] attendees, String description, double latitude, double longitude)
  • Method Details

    • getSummary

      public String getSummary()
    • getStart

      @Deprecated public Date getStart()
      Deprecated.
      Returns:
      start time
    • getStartTimestamp

      public long getStartTimestamp()
      Returns:
      start time
      See Also:
    • isStartAllDay

      public boolean isStartAllDay()
      Returns:
      true if start time was specified as a whole day
    • getEnd

      @Deprecated public Date getEnd()
      Deprecated.
      Returns:
      event end Date, or null if event has no duration
    • getEndTimestamp

      public long getEndTimestamp()
      Returns:
      event end Date, or -1 if event has no duration
      See Also:
    • isEndAllDay

      public boolean isEndAllDay()
      Returns:
      true if end time was specified as a whole day
    • getLocation

      public String getLocation()
    • getOrganizer

      public String getOrganizer()
    • getAttendees

      public String[] getAttendees()
    • getDescription

      public String getDescription()
    • getLatitude

      public double getLatitude()
    • getLongitude

      public double getLongitude()
    • getDisplayResult

      public String getDisplayResult()
      Specified by:
      getDisplayResult in class ParsedResult
    • parseDate

      private static long parseDate(String when) throws ParseException
      Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC).
      Parameters:
      when - The string to parse
      Throws:
      ParseException - if not able to parse as a date
    • format

      private static String format(boolean allDay, long date)
    • parseDurationMS

      private static long parseDurationMS(CharSequence durationString)
    • parseDateTimeString

      private static long parseDateTimeString(String dateTimeString) throws ParseException
      Throws:
      ParseException