Class Airport
java.lang.Object
org.deltava.beans.schedule.Airport
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<Airport>,Auditable,ComboAlias,GeoLocation,GeospaceLocation,IconMapEntry,LabelMapEntry,MapEntry,MarkerMapEntry,ICAOAirport,ViewEntry
public class Airport
extends Object
implements Comparable<Airport>, Auditable, ComboAlias, ViewEntry, ICAOAirport, MarkerMapEntry, IconMapEntry, LabelMapEntry
A class for storing airport information.
- Since:
- 1.0
- Version:
- 12.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 TypeMethodDescriptionvoidaddAirlineCode(String aCode) Adds an airline to the list of airlines associated with this Airport.clone()intbooleanReturns a list codes for the airlines associated with this Airport.intReturns the altitude of the location above MSL.booleangetASDE()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.booleanReturns whether this Airport has gate data configuredbooleanReturns whether the Airport has a fictional IATA code, for non-existent airports.booleanReturns 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.intReturns 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.booleanReturns whether this Airport is in the Schengen Zone.getLabel()Returns the label text.final doubleReturns the latitude of this location.final doubleReturns the longitude of this location.intReturns the maximum length of all runways at this airport.getName()Return this airport's name.intReturns the Google Earth palette code.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.booleanhasAirlineCode(String code) Determines if a particular airline services this Airport.final inthashCode()booleanReturns if the position of this Airport has been set.voidremoveAirlineCode(String aCode) Removes an airline from the list of airlines associated with this Airport.voidsetAirlines(Collection<String> airlines) Resets the list of Airlines associated with this Airport.voidsetAltitude(int alt) Sets this Airport's altitude.voidsetASDE(boolean hasASDE) Sets whether this airport has ASDE-X radar.voidSets this airport's Country.voidsetGateData(boolean hasData) Sets whether this airport has gate data configured.voidsetHasFictionalCode(boolean isFictional) Sets whether this Airport is using a fictional IATA code, for non-extant Airports.voidsetHasPFI(boolean hasPFI) Sets whether this Airport has a US Pre-Flight Inspection station.voidSets this Airport's IATA code.voidSets this Airport's ICAO code.voidsetIsSchengen(boolean isSZ) Sets whether this Airport is in the Schengen Zone.voidsetLocation(double lat, double lng) Sets this airport's location.voidsetMaximumRunwayLength(int len) Updates the length of the longest runway at this Airport.voidSets this airport's name.voidSets this airport's ICAO region.voidsetSupercededAirport(String iata) Updates the superseded airport code for this airport.voidSet this airport's Time Zone.toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.deltava.beans.Auditable
getAuditType, isCrossAppMethods 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 superseded airport code for this airport.- Parameters:
iata- the airport IATA code- See Also:
-
getIATA
-
getICAO
Description copied from interface:ICAOAirportReturns the ICAO code for the airport.- Specified by:
getICAOin interfaceICAOAirport- Returns:
- the ICAO code
-
getLabel
Description copied from interface:LabelMapEntryReturns the label text.- Specified by:
getLabelin interfaceLabelMapEntry- Returns:
- the label text
-
getName
-
getAltitude
public int getAltitude()Description copied from interface:GeospaceLocationReturns the altitude of the location above MSL.- Specified by:
getAltitudein 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:
-
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:GeoLocationReturns the latitude of this location.- Specified by:
getLatitudein interfaceGeoLocation- Returns:
- the latitude in degrees
-
getLongitude
public final double getLongitude()Description copied from interface:GeoLocationReturns the longitude of this location.- Specified by:
getLongitudein 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:
compareToin interfaceComparable<Airport>
-
getComboAlias
Description copied from interface:ComboAliasReturns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAliasin interfaceComboAlias- Returns:
- The alias for this entry
-
getComboName
Description copied from interface:ComboAliasReturns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboNamein 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:MarkerMapEntryReturns the icon color for this entry if displayed in a Google Map.- Specified by:
getIconColorin interfaceMarkerMapEntry- Returns:
- the icon color
-
getPaletteCode
public int getPaletteCode()Description copied from interface:IconMapEntryReturns the Google Earth palette code.- Specified by:
getPaletteCodein interfaceIconMapEntry- Returns:
- the palette code
-
getIconCode
public int getIconCode()Description copied from interface:IconMapEntryReturns the Google Earth icon code.- Specified by:
getIconCodein interfaceIconMapEntry- Returns:
- the icon code within the palette
-
getInfoBox
Description copied from interface:MapEntryReturns the text to display in this marker's infobox if displayed in a Google Map.- Specified by:
getInfoBoxin interfaceMapEntry- Returns:
- the infobox HTML text, or null if no infobox to be displayed
-
equals
-
hashCode
-
getRowClassName
Description copied from interface:ViewEntryReturns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Returns:
- the CSS class name, or NULL if none
-
toString
-
getAuditID
Description copied from interface:AuditableReturns the object ID for this auditable object.- Specified by:
getAuditIDin interfaceAuditable- Returns:
- the ID
-
clone
-