Calendar
Content
- 1 Calendar-objects
- 1.1 Link
- 1.2 Elements
- 1.2.1 PublicationDelivery
- 1.2.2 ServiceCalendarFrame
- 1.2.2.1 ServiceCalendarFrame
- 1.2.3 dayTypes
- 1.2.4 timebands
- 1.2.5 operatingDays
- 1.2.6 operatingPeriods
- 1.2.7 dayTypeAssignments
Calendar-objects
A Service Calendar defines days, dayType, operational periods and other calendar items, as well as the connections between them. These definitions are further used (mainly) in the Timetable to specify when a Line operates.
Link
The XML example in it its entirety can be found in the GitHub repository:Â https://github.com/entur/profile-norway-examples/blob/master/netex/schedule/ServiceCalendar-example.xml
Elements
Below is a more detailed description of the most important elements of modelling a calendar object.
Note that this is only a simplified example of NeTEx XML.
PublicationDelivery
All XML files according to the Norwegian NeTEx profile should be of type PublicationDelivery containing relevant Frames. (See GitHub for a complete example.)
Description of the dummy ServiceFrame and TimetableFrame in the example is only included to indicate a complete PublicationDelivery.
ServiceCalendarFrame
All calendar objects are defined in a ServiceCalendarFrame. It can be done in a ServiceCalendar object, but given that most components are often reused across the dataset, it is recommended to define these directly in ServiceCalendarFrame.
ServiceCalendarFrame
<ServiceCalendarFrame version="any" id="RUT:ServiceCalendarFrame:1">
<ServiceCalendar version="any" id="RUT:ServiceCalendar">
<Name>Weekdays</Name>
<FromDate>2019-04-01</FromDate>
<ToDate>2019-08-31</ToDate>
</ServiceCalendar>
[...]
dayTypes
Defining day type by means of weekdays.
<dayTypes>
<DayType version="any" id="RUT:DayType:weekdays">
<Name>Ukedager</Name>
<properties>
<PropertyOfDay>
<DaysOfWeek>Monday Tuesday Wednesday Thursday Friday</DaysOfWeek>
</PropertyOfDay>
</properties>
</DayType>
[...]
</dayTypes>
timebands
Timeband shows time indication.
StartTime and EndTime or Duration specify the period span.
If StartTime and EndTime are equal it specifies a specific time. E.g. when specifying a repeating hourly departure (in Rhythmical Journey), this is indicated by a consistent time of "00".
<timebands>
<Timeband version="any" id="RUT:Timeband:TM15">
<!--Name>15 minutes past the hour</Name-->
<StartTime>00:15:00</StartTime>
<EndTime>00:15:00</EndTime>
</Timeband>
</timebands>
operatingDays
Specification of an operating day, possibly also the start and length of an operating day. Can be linked to a dayType , e.g. Kalender#dayTypeAssignments.
operatingPeriods
Specification of an operating period, based on previously defined start and end days.
dayTypeAssignments
Attaching a dayType to a specific date or pre-defined OperatingDay/Period for a given calendar, i.e. a dayType will be valid within the time period specified by the calendar object to which it is associated.