Package org.deltava.beans.schedule
Class RawScheduleEntry
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.Flight
org.deltava.beans.schedule.ScheduleEntry
org.deltava.beans.schedule.RawScheduleEntry
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,FlightNumber
,IDBean
,FlightTimes
,RoutePair
,ViewEntry
,Cacheable
A Schedule Entry with code share and day of week data.
- Since:
- 8.0
- Version:
- 11.2
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.deltava.beans.schedule.RoutePair
RoutePair.RoutePairImpl
-
Field Summary
Fields inherited from class org.deltava.beans.schedule.ScheduleEntry
_arrivalPlusDays, EQ_VARIES
-
Constructor Summary
ConstructorDescriptionCreates the bean from an existing Flight.RawScheduleEntry
(Airline a, int fNumber, int leg) Creates the bean. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a day of the week that this flight is operated on.Returns the day codes of the days of the week the flight is operated on.int
Returns a bitmap of the days operated.getDays()
Returns the day of the week this flight is operated on.Returns the end of the operating range.boolean
Returns whether this entry is always included.boolean
Returns the "historic flight" flag value for this flight.int
Returns the line number of this entry in the original source.Returns the start of the operating range.boolean
Returns whether this entry has been manually updated since import.boolean
operatesOn
(LocalDate ld) Returns if a flight is operated on a particular date.void
setArrivalPlusDays
(int days) Updates the number of days forward to adjust the arrival date.void
setDayMap
(int bitmap) Sets the day of the week that this flight is operated on.void
Updates the end of the operating range.void
setForceInclude
(boolean doForce) Updates whether this entry should always be included in a schedule filter, even if the route is already imported.void
setLineNumber
(int ln) Updates the source file line number for this entry.void
Updates the start of the operating range.void
setUpdated
(boolean isUpdated) Updates whether this entry has been manually updated.Converts a RawScheduleEntry to a ScheduleEntry for the current date.Methods inherited from class org.deltava.beans.schedule.ScheduleEntry
adjustForDST, getAcademy, getArrivalPlusDays, getCodeShare, getDuration, getHasDSTAdjustment, getID, getLength, getRemarks, getRowClassName, getSource, getTimeA, getTimeD, hashCode, isVariable, setAcademy, setCodeShare, setHistoric, setID, setLength, setRemarks, setSource, setTimeA, setTimeD, toString
Methods inherited from class org.deltava.beans.Flight
compareTo, equals, getAirline, getAirportA, getAirportD, getDistance, getEquipmentType, getFlightCode, getFlightNumber, getLeg, getLegCode, getShortCode, setAirline, setAirportA, setAirportD, setEquipmentType, setFlightNumber, setLeg
Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, getHexID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.schedule.FlightTimes
hasTimes
Methods inherited from interface org.deltava.beans.schedule.RoutePair
createKey, getAirports, getFlightType, includes, isPopulated, matches
-
Constructor Details
-
RawScheduleEntry
Creates the bean.- Parameters:
a
- the AirlinefNumber
- the flight numberleg
- the leg number
-
RawScheduleEntry
Creates the bean from an existing Flight.- Parameters:
f
- the Flight
-
-
Method Details
-
getDays
Returns the day of the week this flight is operated on.- Returns:
- a DayOfWeek enum
-
getDayCodes
Returns the day codes of the days of the week the flight is operated on.- Returns:
- a set of day codes (1234567)
-
getDayMap
public int getDayMap()Returns a bitmap of the days operated.- Returns:
- a bitmap of ordinal values
-
getLineNumber
public int getLineNumber()Returns the line number of this entry in the original source.- Returns:
- the line number
-
getStartDate
Returns the start of the operating range.- Returns:
- the range start date
-
getEndDate
-
getForceInclude
public boolean getForceInclude()Returns whether this entry is always included.- Returns:
- TRUE if always included, otherwise FALSE
-
getUpdated
public boolean getUpdated()Returns whether this entry has been manually updated since import.- Returns:
- TRUE if manually updated, otherwise FALSE
-
getHistoric
public boolean getHistoric()Description copied from class:ScheduleEntry
Returns the "historic flight" flag value for this flight.- Overrides:
getHistoric
in classScheduleEntry
- Returns:
- TRUE if this is a historic flight, FALSE otherwise
- See Also:
-
operatesOn
Returns if a flight is operated on a particular date.- Parameters:
ld
- the operating date- Returns:
- TRUE if the flight is operated on this date, otherwise FALSE
-
addDayOfWeek
Adds a day of the week that this flight is operated on.- Parameters:
d
- a DayOfWeek
-
setDayMap
public void setDayMap(int bitmap) Sets the day of the week that this flight is operated on.- Parameters:
bitmap
- a DayOfWeek bitmap
-
setStartDate
Updates the start of the operating range.- Parameters:
d
- the range start date
-
setEndDate
Updates the end of the operating range.- Parameters:
d
- the range end date
-
setLineNumber
public void setLineNumber(int ln) Updates the source file line number for this entry.- Parameters:
ln
- the line number
-
setForceInclude
public void setForceInclude(boolean doForce) Updates whether this entry should always be included in a schedule filter, even if the route is already imported.- Parameters:
doForce
- TRUE if always loaded, otherwsie FALSE
-
setUpdated
public void setUpdated(boolean isUpdated) Updates whether this entry has been manually updated.- Parameters:
isUpdated
- TRUE if manually updated, otherwise FALSE
-
setArrivalPlusDays
public void setArrivalPlusDays(int days) Updates the number of days forward to adjust the arrival date.- Parameters:
days
- the number of days
-
toToday
Converts a RawScheduleEntry to a ScheduleEntry for the current date.- Parameters:
dt
- today as a LocalDate- Returns:
- a SceduleEntry, or null if the flight does not operate
-