## 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.

Field Summary
`protected java.lang.String` `cityName`
`protected java.sql.Connection` `connection` Connection object that will be used to retrieve data.
`protected java.lang.String` `graphicName`
`protected float` `latitude`
`protected float` `longitude`
`protected java.lang.String` `queryString`
`protected java.lang.String` `stateName`

Constructor Summary
`LocationData()`
`LocationData(java.sql.Connection inConnection)`
`LocationData(RecordSet drs)`

Method Summary
`void` `close()`
`java.lang.String` `getCityName()`
`java.sql.Connection` `getConnection()`
`java.lang.String` `getGraphicName()`
`float` `getLatitude()`
`float` `getLongitude()`
`java.lang.String` `getQueryString()`
`java.lang.String` `getStateName()`
`static void` `main(java.lang.String[] args)`
`void` `setConnection(java.sql.Connection inConnection)`
`void` `setQueryString(java.lang.String inQueryString)`
`java.lang.String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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

Constructor Detail

### LocationData

    public LocationData()

### LocationData

    public LocationData(java.sql.Connection inConnection)

### LocationData

    public LocationData(RecordSet drs)
                 throws java.sql.SQLException

Method Detail

### close

    public void close()
               throws java.sql.SQLException

  Throws:
    `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()

### main

    public static void main(java.lang.String[] args)

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details