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:
- 12.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface RoutePair
RoutePair.RoutePairImplModifier and TypeInterfaceDescriptionstatic classHelper class when all you need is a naked RoutePair. -
Field Summary
Fields inherited from class ScheduleEntry
_arrivalPlusDays, EQ_VARIESModifier and TypeFieldDescriptionprotected intAdjusts the arrival date/time forward by a certain number of days.static final StringVariable equipment code. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the bean from an existing Flight.RawScheduleEntry(Airline a, int fNumber, int leg) Creates the bean. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds 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.intReturns 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.booleanReturns whether this entry is always included.booleanReturns the "historic flight" flag value for this flight.intReturns the line number of this entry in the original source.Returns the start of the operating range.booleanReturns whether this entry has been manually updated since import.booleanoperatesOn(LocalDate ld) Returns if a flight is operated on a particular date.voidsetArrivalPlusDays(int days) Updates the number of days forward to adjust the arrival date.voidsetDayMap(int bitmap) Sets the day of the week that this flight is operated on.voidsetDaysOfWeek(String days) Sets the days of the week that this flight operates on.voidUpdates the end of the operating range.voidsetForceInclude(boolean doForce) Updates whether this entry should always be included in a schedule filter, even if the route is already imported.voidsetLineNumber(int ln) Updates the source file line number for this entry.voidUpdates the start of the operating range.voidsetUpdated(boolean isUpdated) Updates whether this entry has been manually updated.Converts a RawScheduleEntry to a ScheduleEntry for the current date.Methods inherited from class 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, toStringModifier and TypeMethodDescriptionbooleanAdjusts the arrival time if the DST offsets for either Airport have changed from the effective date of this schedule etnry.booleanReturns if this flight is part of the Flight Academy.intReturns the number of days forward to adjust the arrival time.If a codeshare, the flight code of the operator's flight.final DurationA method to return the exact length of the flight.booleanReturns whether the arrival time has been adjusted for DST changes between the effective date of this Schedule Entry and the current date.final intgetID()Returns the database ID of the schedule entry.final intReturns the length of the flight, in hours multiplied by 10.Returns any operator notes for this flight.Returns the CSS class for this object if rendered in a view table.Returns the original source of this Schedule Entry.getTimeA()Returns the arrival time of the flight, with full timezone information.getTimeD()Returns the departure time of the flight, with full timezone information.inthashCode()static booleanisVariable(Flight f) Helper method to determine if flight is using a variable equipment type.voidsetAcademy(boolean academy) Updates this Schedule entry's "Flight Academy flight" flag.voidsetCodeShare(String flightCode) If this is a codeshare flight, the flight code of the operator's flight.voidsetHistoric(boolean historic) Updates this Schedule entry's "historic flight" flag.final voidsetID(int id) Sets the database ID of this schedule entry.voidsetLength(int len) Sets the length of a flight leg.voidsetRemarks(String remarks) Updates any notes (usually about codehsare operator) for this flight.voidsetSource(ScheduleSource src) Updates the source of this entry.voidSets the arrival time for this flight.voidSets the departure time for this flight.toString()Methods inherited from class Flight
compareTo, equals, getAirline, getAirportA, getAirportD, getCallsign, getDistance, getEquipmentType, getFlightCode, getFlightNumber, getLeg, getLegCode, getShortCode, setAirline, setAirportA, setAirportD, setEquipmentType, setFlightNumber, setLegModifier and TypeMethodDescriptionintbooleanReturns the Airline.Returns the arrival Airport.Returns the departure Airport.Returns the flight code as a callsign, using the Airline ICAO code.intReturns the distance between the Airports.Returns the Equipment type for this flightReturns a text representation of the Flight in the format "CODE### Leg #".intReturns the Flight Number.intgetLeg()Returns the Flight Leg.Returns an abbreviated version of the Flight code with a dash instead of text.Returns the Flight code without the leg.voidSet the Airline for this flight.voidSets the Arrival Airport object for this flight.voidSets the Departure Airport object for this flight.voidsetEquipmentType(String eqType) Sets the equipment type for this flight.voidsetFlightNumber(int fNumber) Set the Flight Number for this flightvoidsetLeg(int leg) Sets the Flight leg for this flightMethods inherited from class DatabaseBean
cacheKey, getHexID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.getHexID()Returns the hexadecimal database ID of this object.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.Methods inherited from interface FlightTimes
hasFlightTimesModifier and TypeMethodDescriptiondefault booleanReturns if both the departure and arrrival date/times have been populated.Methods inherited from interface RoutePair
createKey, getAirports, getFlightType, includes, isPopulated, matches, midPointModifier and TypeMethodDescriptiondefault StringReturns a key that describes the route pair.Returns the airports in this Route Pair.default FlightTypeReturns the flight type for customs/gate purposes.default booleanReturns whether this RoutePair includes a particular IATA or ICAO code.default booleanReturns whether both airports are populated.default booleanReturns whether this RoutePair matches a particular Route Pair.default GeoLocationmidPoint()Returns the midpoint between the two Airports on a Great Circle route.
-
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:ScheduleEntryReturns the "historic flight" flag value for this flight.- Overrides:
getHistoricin 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
-
setDaysOfWeek
Sets the days of the week that this flight operates on. This is a list of digits matching the days of the week.- Parameters:
days- a String with a list of days- See Also:
-
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
-