GeographicLocation Class Reference

Inheritance diagram for GeographicLocation:
Collaboration diagram for GeographicLocation:

List of all members.

Public Types

enum  Unit { KILOMETERS = (6367), METERS = (6367000), MILES = (3956) }

Public Methods

 GeographicLocation ()
 GeographicLocation (String name, String category, double longitude, double latitude, int elevation)
int getElevation ()
double getLongitude ()
double getLatitude ()
long calcTypeId ()
double getDistanceTo (IGeographicLocation other, Unit unit)
double getDistanceTo (IGeographicLocation other)
Object clone () throws CloneNotSupportedException
String getName ()
String getCategory ()
String getLabel ()
void setLabel (String label)
long getId ()
void setId (long id)

Package Attributes

double latitude

Member Enumeration Documentation

enum Unit [inherited]
Enumerator:
KILOMETERS 
METERS 
MILES 

Constructors

GeographicLocation ( String  name,
String  category,
double  longitude,
double  latitude,
int  elevation 
)

Method Details

long calcTypeId ( )

Implements TypeMappingGenerator.

Object clone ( ) throws CloneNotSupportedException
String getCategory ( )

Returns the category-string of this category. Note that this value is not further restricted, and different implementations might return different strings.

Returns:
the category string

Implements ISingleValueCategory.

Reimplemented in Mountain, PopulatedPlace, and Waters.

double getDistanceTo ( IGeographicLocation  other,
Unit  unit 
)

Calculates the Great-circle distance between this location and other, with the defined unit.

Parameters:
other
unit
Returns:

Implements IGeographicLocation.

double getDistanceTo ( IGeographicLocation  other)

Calculates the Great-circle distance between this location and other in kilometers.

Parameters:
other
unit
Returns:

Implements IGeographicLocation.

int getElevation ( )

Returns the elevation of the location in meters.

Returns:

Implements IGeographicLocation.

long getId ( ) [inherited]

Returns the Id of this DataObject. Might return 0, if the object hasn't been inserted into database yet.

Returns:
id

Implements DataObject.

Reimplemented in Tweet, and TwitterEntity.

String getLabel ( ) [inherited]

Returns the label of this token, which can be any kind of string (except null), mainly used for display-reasons only. Note: Components MUST NOT assume that any kind of label (like 'word' or else) is returned by this method.

Implements ILabeledElement.

Reimplemented in TEIDramaSpeaker, TEIDramaSpeechAct, TEIDramaStage, JodaDateTime, JodaInterval, JodaPeriod, Timex, Tweet, and TwitterEntity.

double getLatitude ( )

Returns the latitude of the location in decimal degrees, as defined in Wikipedia:Latitude, and according to WGS 84

Returns:

Implements IGeographicLocation.

double getLongitude ( )

Returns the longitude of the location in decimal degrees, as defined in Wikipedia:Longitude, and according to WGS 84.

Returns:

Implements IGeographicLocation.

String getName ( )

Implements INamedEntity.

void setId ( long  id) [inherited]

Set the Id of this DataObject.

Parameters:
id

Implements DataObject.

Reimplemented in Tweet, and TwitterEntity.

void setLabel ( String  label) [inherited]

Field Details

double latitude [package]