Class Airport
java.lang.Object
org.deltava.beans.schedule.Airport
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Airport>
,Auditable
,ComboAlias
,GeoLocation
,GeospaceLocation
,IconMapEntry
,MapEntry
,MarkerMapEntry
,ICAOAirport
,ViewEntry
public class Airport
extends Object
implements Comparable<Airport>, Auditable, ComboAlias, ViewEntry, ICAOAirport, MarkerMapEntry, IconMapEntry
A class for storing airport information.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.deltava.beans.GeoLocation
DEGREE_FEET, DEGREE_MILES, FEET_MILES, LAT_DIRECTIONS, LATITUDE, LON_DIRECTIONS, LONGITUDE, RADIAN_MILES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAirlineCode
(String aCode) Adds an airline to the list of airlines associated with this Airport.clone()
int
boolean
Returns a list codes for the airlines associated with this Airport.int
Returns the altitude of the location above MSL.boolean
getASDE()
Returns whether this Airport has ASDE-X radar.Returns the object ID for this auditable object.Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.Returns this airport's country.boolean
Returns whether this Airport has gate data configuredboolean
Returns whether the Airport has a fictional IATA code, for non-existent airports.boolean
Returns whether this Airport has a US customs pre-flight inspection station.getIATA()
Return this airprort's IATA Code.getICAO()
Returns the ICAO code for the airport.int
Returns the Google Earth icon code.Returns the icon color for this entry if displayed in a Google Map.Returns the text to display in this marker's infobox if displayed in a Google Map.boolean
Returns whether this Airport is in the Schengen Zone.final double
Returns the latitude of this location.final double
Returns the longitude of this location.int
Returns the maximum length of all runways at this airport.getName()
Return this airport's name.int
Returns the Google Earth palette code.Returns this airport's latitude and longitude.Returns the ICAO region containing this Airport.Returns the CSS class for this object if rendered in a view table.getState()
Returns the State this airport is located in.Returns the IATA code of any former Airports replaced by this Airport.getTZ()
Returns this airport's time zone.boolean
hasAirlineCode
(String code) Determines if a particular airline services this Airport.final int
hashCode()
boolean
Returns if the position of this Airport has been set.void
removeAirlineCode
(String aCode) Removes an airline from the list of airlines associated with this Airport.void
setAirlines
(Collection<String> airlines) Resets the list of Airlines associated with this Airport.void
setAltitude
(int alt) Sets this Airport's altitude.void
setASDE
(boolean hasASDE) Sets whether this airport has ASDE-X radar.void
Sets this airport's Country.void
setGateData
(boolean hasData) Sets whether this airport has gate data configured.void
setHasFictionalCode
(boolean isFictional) Sets whether this Airport is using a fictional IATA code, for non-extant Airports.void
setHasPFI
(boolean hasPFI) Sets whether this Airport has a US Pre-Flight Inspection station.void
Sets this Airport's IATA code.void
Sets this Airport's ICAO code.void
setIsSchengen
(boolean isSZ) Sets whether this Airport is in the Schengen Zone.void
setLocation
(double lat, double lng) Sets this airport's location.void
setMaximumRunwayLength
(int len) Updates the length of the longest runway at this Airport.void
Sets this airport's name.void
Sets this airport's ICAO region.void
setSupercededAirport
(String iata) Updates the superceded airport code for this airport.void
Set this airport's Time Zone.toString()
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.Auditable
getAuditType, isCrossApp
Methods inherited from interface org.deltava.beans.GeoLocation
distanceFeet, distanceTo
-
Field Details
-
ALL
Special airport object for "All Airports".
-
-
Constructor Details
-
Airport
Create a new Airport object.- Parameters:
iata
- The airport's IATA codeicao
- The airport's ICAO codename
- The airport's name- Throws:
NullPointerException
- If the IATA or ICAO codes are null
-
Airport
-
-
Method Details
-
setLocation
public void setLocation(double lat, double lng) Sets this airport's location.- Parameters:
lat
- This airport's latitudelng
- This airport's longitude
-
setTZ
Set this airport's Time Zone.- Parameters:
tz
- A Time Zone wrapper for the time zone- See Also:
-
setCountry
Sets this airport's Country.- Parameters:
c
- the Country- See Also:
-
setMaximumRunwayLength
public void setMaximumRunwayLength(int len) Updates the length of the longest runway at this Airport.- Parameters:
len
- the length in feet- See Also:
-
setASDE
public void setASDE(boolean hasASDE) Sets whether this airport has ASDE-X radar.- Parameters:
hasASDE
- TRUE if ASDE-X present, otherwise FALSE- See Also:
-
setGateData
public void setGateData(boolean hasData) Sets whether this airport has gate data configured.- Parameters:
hasData
- TRUE if gate data configured, otherwise FALSE- See Also:
-
setIsSchengen
public void setIsSchengen(boolean isSZ) Sets whether this Airport is in the Schengen Zone.- Parameters:
isSZ
- TRUE if in the Schengen Zone, otherwise FALSE- See Also:
-
setHasPFI
public void setHasPFI(boolean hasPFI) Sets whether this Airport has a US Pre-Flight Inspection station.- Parameters:
hasPFI
- TRUE if a PFI present, otherwise FALSE
-
setHasFictionalCode
public void setHasFictionalCode(boolean isFictional) Sets whether this Airport is using a fictional IATA code, for non-extant Airports.- Parameters:
isFictional
- TRUE if a fictional code, otherwise FALSE
-
setName
Sets this airport's name.- Parameters:
name
- the airport name- See Also:
-
setICAO
Sets this Airport's ICAO code.- Parameters:
code
- the ICAO code- Throws:
NullPointerException
- if code is null- See Also:
-
setIATA
Sets this Airport's IATA code.- Parameters:
code
- the IATA code- Throws:
NullPointerException
- if code is null- See Also:
-
setRegion
Sets this airport's ICAO region.- Parameters:
code
- the region code- See Also:
-
setAltitude
public void setAltitude(int alt) Sets this Airport's altitude.- Parameters:
alt
- the altitude in feet MSL- See Also:
-
setSupercededAirport
Updates the superceded airport code for this airport.- Parameters:
iata
- the airport IATA code- See Also:
-
getIATA
-
getICAO
Description copied from interface:ICAOAirport
Returns the ICAO code for the airport.- Specified by:
getICAO
in interfaceICAOAirport
- Returns:
- the ICAO code
-
getName
-
getAltitude
public int getAltitude()Description copied from interface:GeospaceLocation
Returns the altitude of the location above MSL.- Specified by:
getAltitude
in interfaceGeospaceLocation
- Returns:
- the altitude in feet
-
getRegion
-
getTZ
-
getCountry
-
getState
-
getMaximumRunwayLength
public int getMaximumRunwayLength()Returns the maximum length of all runways at this airport.- Returns:
- the length in feet of the longest runway
- See Also:
-
getSupercededAirport
Returns the IATA code of any former Airports replaced by this Airport.- Returns:
- the IATA code, or null if none
- See Also:
-
getPosition
Returns this airport's latitude and longitude.- Returns:
- a GeoPosition object containing the airport's position
-
getIsSchengen
public boolean getIsSchengen()Returns whether this Airport is in the Schengen Zone.- Returns:
- TRUE if in the Schengen Zone, otherwise FALSE
- See Also:
-
getHasPFI
public boolean getHasPFI()Returns whether this Airport has a US customs pre-flight inspection station.- Returns:
- TRUE if PFI present, otherwise FALSE
- See Also:
-
getHasFictionalCode
public boolean getHasFictionalCode()Returns whether the Airport has a fictional IATA code, for non-existent airports.- Returns:
- TRUE if the code is fictional, otherwise FALSE
-
getLatitude
public final double getLatitude()Description copied from interface:GeoLocation
Returns the latitude of this location.- Specified by:
getLatitude
in interfaceGeoLocation
- Returns:
- the latitude in degrees
-
getLongitude
public final double getLongitude()Description copied from interface:GeoLocation
Returns the longitude of this location.- Specified by:
getLongitude
in interfaceGeoLocation
- Returns:
- the longitude in degrees
-
getASDE
public boolean getASDE()Returns whether this Airport has ASDE-X radar.- Returns:
- TRUE if ASDE-X radar present, otherwise FALSE
- See Also:
-
getGateData
public boolean getGateData()Returns whether this Airport has gate data configured- Returns:
- TRUE if gate data configured, otherwise FALSE
- See Also:
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Airport>
-
getComboAlias
Description copied from interface:ComboAlias
Returns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAlias
in interfaceComboAlias
- Returns:
- The alias for this entry
-
getComboName
Description copied from interface:ComboAlias
Returns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboName
in interfaceComboAlias
- Returns:
- The visible name for this entry
-
addAirlineCode
Adds an airline to the list of airlines associated with this Airport.- Parameters:
aCode
- The airline code- Throws:
NullPointerException
- if aCode is null- See Also:
-
removeAirlineCode
Removes an airline from the list of airlines associated with this Airport.- Parameters:
aCode
- The airline code- Throws:
NullPointerException
- if aCode is null- See Also:
-
setAirlines
Resets the list of Airlines associated with this Airport.- Parameters:
airlines
- a Collection of Airline codes- See Also:
-
getAirlineCodes
Returns a list codes for the airlines associated with this Airport.- Returns:
- The unsorted list of airline codes
- See Also:
-
hasAirlineCode
Determines if a particular airline services this Airport.- Parameters:
code
- The airline code- Returns:
- If the airline is associated with this airport
- See Also:
-
hasPosition
public boolean hasPosition()Returns if the position of this Airport has been set.- Returns:
- TRUE if the position has been set, otherwise FALSE
-
getIconColor
Description copied from interface:MarkerMapEntry
Returns the icon color for this entry if displayed in a Google Map.- Specified by:
getIconColor
in interfaceMarkerMapEntry
- Returns:
- the icon color
-
getPaletteCode
public int getPaletteCode()Description copied from interface:IconMapEntry
Returns the Google Earth palette code.- Specified by:
getPaletteCode
in interfaceIconMapEntry
- Returns:
- the palette code
-
getIconCode
public int getIconCode()Description copied from interface:IconMapEntry
Returns the Google Earth icon code.- Specified by:
getIconCode
in interfaceIconMapEntry
- Returns:
- the icon code within the palette
-
getInfoBox
Description copied from interface:MapEntry
Returns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBox
in interfaceMapEntry
- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-
equals
-
hashCode
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-
toString
-
getAuditID
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- Returns:
- the ID
-
clone
-