org.xbill.DNS
Class GPOSRecord

java.lang.Object
  extended by org.xbill.DNS.Record
      extended by org.xbill.DNS.GPOSRecord
All Implemented Interfaces:
Cloneable, Comparable

public class GPOSRecord
extends Record

Geographical Location - describes the physical location of a host.

Author:
Brian Wellington

Field Summary
 
Fields inherited from class org.xbill.DNS.Record
dclass, name, ttl, type
 
Constructor Summary
GPOSRecord(Name name, int dclass, long ttl, double longitude, double latitude, double altitude)
          Creates an GPOS Record from the given data
GPOSRecord(Name name, int dclass, long ttl, String longitude, String latitude, String altitude)
          Creates an GPOS Record from the given data
 
Method Summary
 double getAltitude()
          Returns the altitude as a double
 String getAltitudeString()
          Returns the altitude as a string
 double getLatitude()
          Returns the latitude as a double
 String getLatitudeString()
          Returns the latitude as a string
 double getLongitude()
          Returns the longitude as a double
 String getLongitudeString()
          Returns the longitude as a string
 
Methods inherited from class org.xbill.DNS.Record
byteArrayFromString, byteArrayToString, compareTo, equals, fromString, fromString, fromWire, getAdditionalName, getDClass, getName, getRRsetType, getTTL, getType, hashCode, newRecord, newRecord, newRecord, newRecord, rdataToString, rdataToWireCanonical, sameRRset, toString, toWire, toWireCanonical, unknownToString, withName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GPOSRecord

public GPOSRecord(Name name,
                  int dclass,
                  long ttl,
                  double longitude,
                  double latitude,
                  double altitude)
Creates an GPOS Record from the given data

Parameters:
longitude - The longitude component of the location.
latitude - The latitude component of the location.
altitude - The altitude component of the location (in meters above sea level).

GPOSRecord

public GPOSRecord(Name name,
                  int dclass,
                  long ttl,
                  String longitude,
                  String latitude,
                  String altitude)
Creates an GPOS Record from the given data

Parameters:
longitude - The longitude component of the location.
latitude - The latitude component of the location.
altitude - The altitude component of the location (in meters above sea level).
Method Detail

getLongitudeString

public String getLongitudeString()
Returns the longitude as a string


getLongitude

public double getLongitude()
Returns the longitude as a double

Throws:
NumberFormatException - The string does not contain a valid numeric value.

getLatitudeString

public String getLatitudeString()
Returns the latitude as a string


getLatitude

public double getLatitude()
Returns the latitude as a double

Throws:
NumberFormatException - The string does not contain a valid numeric value.

getAltitudeString

public String getAltitudeString()
Returns the altitude as a string


getAltitude

public double getAltitude()
Returns the altitude as a double

Throws:
NumberFormatException - The string does not contain a valid numeric value.