// ********************************************************************** // // // // BBN Technologies // 10 Moulton Street // Cambridge, MA 02138 // (617) 873-8000 // // Copyright (C) BBNT Solutions LLC. All rights reserved. // // // ********************************************************************** // // $Source: /cvs/openmap/openmap/src/openmap/com/bbn/openmap/layer/location/db/LocationData.java,v $ // $RCSfile: LocationData.java,v $ // $Revision: 1.4 $ // $Date: 2004/10/14 18:18:18 $ // $Author: dietrick $ // // ********************************************************************** package com.bbn.openmap.layer.location.generic; import java.awt.Color; import java.awt.Image; import com.bbn.openmap.omGraphics.OMGraphic; import java.sql.*; import com.bbn.openmap.layer.location.db.*; /** * This class is responsible for retrieving Latitude and Longitude * Data from a table in a Database.. Also * it retrieves identifier of the object that would be used to * represent this location 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:
* The class is expecting the results in this order. */ public interface LocationDataRecord { // public LocationData(); public boolean load(RecordSet drs, LocationColorFormatter colfmt) throws SQLException; /* public void close() throws SQLException { rset.close(); stmt.close(); } public Connection getConnection() { return connection; } public void setConnection(Connection inConnection) { connection = inConnection; } */ /** * @return city name of current record */ public String getDisplayName(); /* public String getStateName() { return stateName; } */ public int getRecID(); public String getGraphicName(); public float getLatitude(); public float getLongitude(); // ---------------------------------------------------------------- /** * Description string * @return String */ public String getDetails(); // ---------------------------------------------------------------- /** * Default output string * @return String */ public String toString(); /** * Get the color used for the location graphic. */ public Color getLocationColor(Color defcolor); /** * Get the color used for the label. */ public Color getLabelColor(Color defcolor); // ---------------------------------------------------------------- public Image getLocationImage(); // ---------------------------------------------------------------- public String getImageUrl(); }