com.bbn.openmap.layer.location.db
Class LocationData
java.lang.Object
|
+--com.bbn.openmap.layer.location.db.LocationData
- public class LocationData
- extends java.lang.Object
This class is responsible for retrieving Latitude and Longitude
Data from a table in a Database given a City/Town name, State. Also
it retrieves identifier of the object that would be used to
represent this City/Town on Map. For instance, identifier can be
either a url or a name that can be looked up somewhere else.
This class needs the RecordSet to be called with the following
query:
select CITY (string), STATE (string), GRAPHIC (string, url or
graphic name), LATITUDE (float), LONGITUDE (float) from
LOCATION_TABLE (tablename where data is stored)
The class is expecting the results in this order.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
connection
protected java.sql.Connection connection
- Connection object that will be used to retrieve data.
cityName
protected java.lang.String cityName
stateName
protected java.lang.String stateName
graphicName
protected java.lang.String graphicName
latitude
protected float latitude
longitude
protected float longitude
queryString
protected java.lang.String queryString
LocationData
public LocationData()
LocationData
public LocationData(java.sql.Connection inConnection)
LocationData
public LocationData(RecordSet drs)
throws java.sql.SQLException
close
public void close()
throws java.sql.SQLException
java.sql.SQLException
getConnection
public java.sql.Connection getConnection()
setConnection
public void setConnection(java.sql.Connection inConnection)
getCityName
public java.lang.String getCityName()
- Returns:
- city name of current record
getStateName
public java.lang.String getStateName()
getGraphicName
public java.lang.String getGraphicName()
getLatitude
public float getLatitude()
getLongitude
public float getLongitude()
getQueryString
public java.lang.String getQueryString()
setQueryString
public void setQueryString(java.lang.String inQueryString)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
main
public static void main(java.lang.String[] args)
Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details