Class NetworkInfo
java.lang.Object
org.deltava.beans.servinfo.NetworkInfo
- All Implemented Interfaces:
Serializable
,Cacheable
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkInfo
(OnlineNetwork net) Initializes this bean for a particular network. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Controller c) Adds a Controller entry to the data.void
Adds a Pilot entry to the data.void
Adds a server entry to the data.cacheKey()
Returns the cache key for this object.clone()
get
(int networkID) Returns the entry for a particular network user, if online.getController
(String callsign) Returns a specific online Controller entry.getControllerByFrequency
(String freq, GeoLocation loc) Returns a controller by Frequency.Returns the active Controllers on this network.Returns all Controllers within a specific distance of a particular point.Returns the network.Returns a specific online Pilot entry.Returns the active Pilots on this network.Returns the FSD servers on this network.Returns the effective date of this data.int
Returns the ServInfo data format version.int
hashCode()
boolean
Returns whether the internal database IDs for Pilots and Controllers have been loaded.void
merge
(Collection<RadioPosition> positions) Merges a Collection of radio positions to determine controller locations.void
setPilotIDs
(Map<String, Integer> idMap) Assigns Pilot IDs to online Pilots and Controllers that have user accounts.void
Updates the validity date of this data.void
setVersion
(int version) Updates the ServInfo data format revision.
-
Constructor Details
-
NetworkInfo
Initializes this bean for a particular network.- Parameters:
net
- the network- See Also:
-
-
Method Details
-
getVersion
public int getVersion()Returns the ServInfo data format version.- Returns:
- the data format version, usually 7 for legacy ServInfo
- See Also:
-
getNetwork
-
getValidDate
Returns the effective date of this data.- Returns:
- the date/time the data was generated
- See Also:
-
getControllers
Returns the active Controllers on this network.- Returns:
- a Collection of Controller beans
- See Also:
-
getServers
Returns the FSD servers on this network.- Returns:
- a Collection of Server beans
-
getControllers
Returns all Controllers within a specific distance of a particular point.- Parameters:
gl
- the location- Returns:
- a Collection of Controller beans
- See Also:
-
hasPilotIDs
public boolean hasPilotIDs()Returns whether the internal database IDs for Pilots and Controllers have been loaded.- Returns:
- TRUE if loaded, otherwise FALSE
- See Also:
-
getPilots
Returns the active Pilots on this network.- Returns:
- a Collection of Pilot beans
- See Also:
-
get
Returns the entry for a particular network user, if online.- Parameters:
networkID
- the user's network ID- Returns:
- a NetworkUser bean, or null if not found
-
setPilotIDs
-
setVersion
public void setVersion(int version) Updates the ServInfo data format revision.- Parameters:
version
- the data format, typically 7- See Also:
-
setValidDate
Updates the validity date of this data.- Parameters:
d
- the date/time this data was generated- See Also:
-
add
Adds a Controller entry to the data.- Parameters:
c
- the Controller bean- See Also:
-
add
-
add
Adds a server entry to the data.- Parameters:
srv
- the Server bean- See Also:
-
getPilot
-
getController
Returns a specific online Controller entry.- Parameters:
callsign
- the callsign- Returns:
- a Controller bean, or null if the callsign was not found
- See Also:
-
getControllerByFrequency
Returns a controller by Frequency.- Parameters:
freq
- the frequencyloc
- the location to sort, if multiple results found- Returns:
- a Controller bean, or null if the frequency was not found
-
merge
Merges a Collection of radio positions to determine controller locations.- Parameters:
positions
- a Collection of RadioPosition beans
-
clone
-
hashCode
-
cacheKey
-