com.bbn.openmap.layer.shape
Class SpatialIndexHandler

java.lang.Object
  |
  +--com.bbn.openmap.layer.shape.SpatialIndexHandler
All Implemented Interfaces:
PropertyConsumer

public class SpatialIndexHandler
extends java.lang.Object
implements PropertyConsumer

The SpatialIndexHandler keeps track of all the stuff dealing with a particular shape file - file names, colors, etc. You can ask it to create OMGraphics based on a bounding box, and make adjustments to it through its GUI.


Field Summary
protected  boolean buffered
           
static java.lang.String BufferedProperty
           
protected  DrawingAttributes drawingAttributes
           
protected  boolean enabled
           
static java.lang.String EnabledProperty
           
protected  I18n i18n
           
 java.lang.String imageURLString
           
protected  OMGeometryList masterList
          Master list for buffering.
protected  java.lang.String prettyName
           
protected  java.lang.String propertyPrefix
           
 java.lang.String shapeFileName
           
 SpatialIndex spatialIndex
           
 java.lang.String spatialIndexFileName
           
 
Fields inherited from interface com.bbn.openmap.PropertyConsumer
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty
 
Constructor Summary
SpatialIndexHandler()
           
SpatialIndexHandler(java.lang.String prefix, java.util.Properties props)
           
 
Method Summary
 boolean getBuffered()
           
 DrawingAttributes getDrawingAttributes()
           
 boolean getEnabled()
           
 OMGraphicList getGraphics(double xmin, double ymin, double xmax, double ymax)
          Create the OMGraphics out of the records that fall inside the bounding box.
 OMGraphicList getGraphics(double xmin, double ymin, double xmax, double ymax, OMGraphicList list)
          Given a bounding box, create OMGraphics from the ESRI records in the shape file.
 javax.swing.JComponent getGUI()
          Get the GUI that controls the attributes of the handler.
 java.lang.String getPrettyName()
           
 java.util.Properties getProperties(java.util.Properties props)
          Property Consumer method.
 java.util.Properties getPropertyInfo(java.util.Properties props)
          Property Consumer method.
 java.lang.String getPropertyPrefix()
          Property Consumer method.
protected  void getWholePlanet()
          Get the graphics for the entire planet.
protected  OMGraphicList RecordList(ESRIRecord rec, DrawingAttributes drawingAttributes)
          Gets the record graphics for a record with multiple graphics.
 void setBuffered(boolean set)
           
 void setDrawingAttributes(DrawingAttributes set)
           
 void setEnabled(boolean set)
           
 void setPrettyName(java.lang.String set)
           
 void setProperties(java.util.Properties props)
          Property Consumer method.
 void setProperties(java.lang.String prefix, java.util.Properties props)
          Property Consumer method.
 void setPropertyPrefix(java.lang.String prefix)
          Property Consumer method.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

spatialIndex

public SpatialIndex spatialIndex

shapeFileName

public java.lang.String shapeFileName

spatialIndexFileName

public java.lang.String spatialIndexFileName

imageURLString

public java.lang.String imageURLString

prettyName

protected java.lang.String prettyName

drawingAttributes

protected DrawingAttributes drawingAttributes

enabled

protected boolean enabled

buffered

protected boolean buffered

propertyPrefix

protected java.lang.String propertyPrefix

EnabledProperty

public static final java.lang.String EnabledProperty
See Also:
Constant Field Values

BufferedProperty

public static final java.lang.String BufferedProperty
See Also:
Constant Field Values

i18n

protected I18n i18n

masterList

protected OMGeometryList masterList
Master list for buffering. Only used if buffering is enabled.

Constructor Detail

SpatialIndexHandler

public SpatialIndexHandler()

SpatialIndexHandler

public SpatialIndexHandler(java.lang.String prefix,
                           java.util.Properties props)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getGUI

public javax.swing.JComponent getGUI()
Get the GUI that controls the attributes of the handler.


setPropertyPrefix

public void setPropertyPrefix(java.lang.String prefix)
Property Consumer method.

Specified by:
setPropertyPrefix in interface PropertyConsumer
Parameters:
prefix - the prefix String.

getPropertyPrefix

public java.lang.String getPropertyPrefix()
Property Consumer method.

Specified by:
getPropertyPrefix in interface PropertyConsumer
Returns:
the prefix string

setProperties

public void setProperties(java.util.Properties props)
Property Consumer method.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
props - a properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties props)
Property Consumer method.

Specified by:
setProperties in interface PropertyConsumer
Parameters:
prefix - a String used by the PropertyConsumer to prepend to each property value it wants to look up - setList.getProperty(prefix.propertyKey). If the prefix had already been set, then the prefix passed in should replace that previous value.
props - a Properties object that the PropertyConsumer can use to retrieve expected properties it can use for configuration.

getProperties

public java.util.Properties getProperties(java.util.Properties props)
Property Consumer method.

Specified by:
getProperties in interface PropertyConsumer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getPropertyInfo

public java.util.Properties getPropertyInfo(java.util.Properties props)
Property Consumer method.

Specified by:
getPropertyInfo in interface PropertyConsumer
Parameters:
props - a Properties object to load the PropertyConsumer properties into. If getList equals null, then a new Properties object should be created.
Returns:
Properties object containing PropertyConsumer property values. If getList was not null, this should equal getList. Otherwise, it should be the Properties object created by the PropertyConsumer.

getGraphics

public OMGraphicList getGraphics(double xmin,
                                 double ymin,
                                 double xmax,
                                 double ymax)
                          throws java.io.IOException,
                                 FormatException
Create the OMGraphics out of the records that fall inside the bounding box.

Parameters:
xmin - double for the min horizontal limit of the bounding box.
ymin - double for the min vertical limit of the bounding box.
xmax - double for the max horizontal limit of the bounding box.
ymax - double for the max vertical limit of the bounding box.
java.io.IOException
FormatException

getGraphics

public OMGraphicList getGraphics(double xmin,
                                 double ymin,
                                 double xmax,
                                 double ymax,
                                 OMGraphicList list)
                          throws java.io.IOException,
                                 FormatException
Given a bounding box, create OMGraphics from the ESRI records in the shape file.

Parameters:
xmin - double for the min horizontal limit of the bounding box.
ymin - double for the min vertical limit of the bounding box.
xmax - double for the max horizontal limit of the bounding box.
ymax - double for the max vertical limit of the bounding box.
list - OMGraphic list to add the new OMGraphics too. If null, a new OMGraphicList will be created.
Returns:
OMGraphicList containing the new OMGraphics.
java.io.IOException
FormatException

RecordList

protected OMGraphicList RecordList(ESRIRecord rec,
                                   DrawingAttributes drawingAttributes)
Gets the record graphics for a record with multiple graphics.

Returns:
OMGraphicList

getWholePlanet

protected void getWholePlanet()
                       throws FormatException
Get the graphics for the entire planet.

FormatException

setPrettyName

public void setPrettyName(java.lang.String set)

getPrettyName

public java.lang.String getPrettyName()

setBuffered

public void setBuffered(boolean set)

getBuffered

public boolean getBuffered()

setDrawingAttributes

public void setDrawingAttributes(DrawingAttributes set)

getDrawingAttributes

public DrawingAttributes getDrawingAttributes()

setEnabled

public void setEnabled(boolean set)

getEnabled

public boolean getEnabled()


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