5.3. Viewing (view.rsl)

(****
 *
 * Module View defines the objects and operations related to the different
 * calendar views available to the user.  The structural viewing levels are
 * item, day week, month, and year.  There are operations to go to the previous
 * and next views at any level, as well as an operation to go to a specific
 * date.  Lists of scheduled items can be viewed in a variety of ways.  A
 * general view filter operation can be applied to both structural and list
 * views.  Operations are available to view other users' calendars and to view
 * a list of active viewing windows.
 *
 * NOTE: this is work in progress.  A good deal of objects are yet to be
 * defined.
 *
 *)
module View;

  from CalendarDB import CalendarDB;
  from Schedule import ScheduledItem, StartTime, Duration, Title, Category,
        Date, Hours, Minutes;

  object DailyAgenda is
    components: FullDayName and TimeSlotDescriptor*;
    description: (*
        A DailyAgenda has a full day name and a list of time-slot descriptors.
        The FullDayName consists of the day name itself (e.g., Wednesday), the
        month, the date, and the year.  Each item in the TimeSlotDescriptor
        list consists of a starting time (e.g., 8 AM) and a list of zero or
        more scheduled items.
    *);
  end DailyAgenda;

  object FullDayName is
    components: DayName and MonthName and DateNumber and Year;
    description: (*
        A FullDayName has the complete and unique designation of a calendar
        day.
    *);
  end FullDayName;

  object DayName is Sunday or Monday or Tuesday or Wednesday or Thursday or
        Friday or Saturday;
  object Sunday;
  object Monday;
  object Tuesday;
  object Wednesday;
  object Thursday;
  object Friday;
  object Saturday;

  object MonthName is January or February or March or April or May or June or
        July or August or September or October or November or December;
  object January;
  object February;
  object March;
  object April;
  object May;
  object June;
  object July;
  object August;
  object September;
  object October;
  object November;
  object December;

  object DateNumber is integer;
  object Year is integer;

  object TimeSlotDescriptor is
    components: TimeSlotName and BriefItemDescriptor* and Overlaps;
    description: (*
        A time slot descriptor represents one slot (physically, a row) in a
        daily agenda.  The TimeSlotName component is the start time for the
        slot.  The list of BriefItemDescriptors contains the items that begin
        within the slot, where "within" is defined as the start time plus the
        current time increment.  The overlaps component is a list of items with
        start times that overlap with an item in the BriefItemDescriptor list.
    *);
  end TimeSlotDescriptor;

  object TimeSlotName is
    components: TimeValue and AmOrPm;
    description: (*
        A TimeSlotName consists of a numeric TimeValue and an AmOrPm indicator.
        TO DO: this definition should be reconciled as appropriate with the
        definition of Time in the Schedule module.
    *);
  end Time;

  object TimeValue is integer;
  object AmOrPm is AM or PM;
  object AM;
  object PM;

  object BriefItemDescriptor is
    components: Title and StartTime and Duration and Category;
    description: (*
        A brief item descriptor contains a subset of the information for a full
        scheduled item.  The information is a Title, StartTime, Duration, and
        Category.
    *);
  end BriefItemDescriptor;

  object Overlaps is
    components: BriefItemDescriptor*;
    description: (*
        Overlaps contain zero or more BriefItemDescriptors that overlap with
        with the master item in a given time slot.  An overlapping item is one
        with a StartTime within the same time slot as other items.  The
        "master" item in a time slot is the item that is first in a sorted
        order based on start time, duration, and alphabetic title as the
        primary, secondary, and tertiary sort keys, respectively.
    *);
  end Overlaps;

  object DailyFormatOptions is
    components: NormalTimeRangeOption and TimeIncrementOption and
        IncrementHeightOption and ShowHide24HoursOption and
        ShowHideExactTimeOption and ShowHideDashedLinesOption and
        ShowHideExtensionArrowsOption and ProportionalSpacingOnOffOption and
        DisplayOverlapsOption and DefaultHeightAndWidthOption;
    description: (*

    *);
  end DailyFormatOptions;

  object NormalTimeRangeOption is StartTime and EndTime;
  object TimeIncrementOption is Hours and Minutes;
  object IncrementHeightOption is integer;
  object ShowHide24HoursOption is Show or Hide;
  object ShowHideExactTimeOption is Show or Hide;
  object ShowHideDashedLinesOption is Show or Hide;
  object ShowHideExtensionArrowsOption is Show or Hide;
  object ProportionalSpacingOnOffOption is On or Off;
  object DisplayOverlapsOption is Horizontal or Vertical;
  object DefaultHeightAndWidthOption is Height and Width;

  object EndTime is TimeSlotName;
  object Show;
  object Hide;
  object On;
  object Off;
  object Horizontal;
  object Vertical;
  object Height is integer;
  object Width is integer;

  op ViewItem(Date, CalendarDB)->ScheduledItem;
  op ViewDay(Date, CalendarDB)->DailyAgenda;

end View;





Prev: caldb.rsl | Next: admin.rsl | Up: spec | Top: index