com.bbn.openmap.layer.vpf
Class VPFLayerGraphicWarehouse

java.lang.Object
  extended by com.bbn.openmap.layer.vpf.LayerGraphicWarehouseSupport
      extended by com.bbn.openmap.layer.vpf.VPFLayerGraphicWarehouse
All Implemented Interfaces:
VPFGraphicWarehouse, VPFWarehouse
Direct Known Subclasses:
VPFFeatureGraphicWarehouse

public class VPFLayerGraphicWarehouse
extends LayerGraphicWarehouseSupport

Implement a graphic factory that builds OMGraphics.

See Also:
OMGraphic

Field Summary
 
Fields inherited from class com.bbn.openmap.layer.vpf.LayerGraphicWarehouseSupport
antarcticaThreshold, areaSubList, drawingAttributes, edgeSubList, graphics, logger, pointSubList, textSubList
 
Constructor Summary
VPFLayerGraphicWarehouse()
           
 
Method Summary
 void createArea(CoverageTable covtable, AreaTable areatable, java.util.List<java.lang.Object> facevec, LatLonPoint ll1, LatLonPoint ll2, double dpplat, double dpplon)
          Method called by the VPF reader code to construct an area feature.
 void createEdge(CoverageTable c, EdgeTable edgetable, java.util.List<java.lang.Object> edgevec, LatLonPoint ll1, LatLonPoint ll2, double dpplat, double dpplon, CoordFloatString coords)
          Method called by the VPF reader code to construct an edge feature.
protected  boolean createFeature(java.util.List<java.lang.Object> prim, int[] skipArray)
          Determine if this primitive should be drawn or skipped.
 void createNode(CoverageTable c, NodeTable nt, java.util.List<java.lang.Object> nodeprim, double latitude, double longitude, boolean isEntityNode)
          Method called by the VPF reader code to construct a node feature.
 void createText(CoverageTable c, TextTable texttable, java.util.List<java.lang.Object> textvec, double latitude, double longitude, java.lang.String text)
          Method called by the VPF reader code to construct a text feature.
 java.util.List<java.lang.String> getFeatures()
          Get a List of Strings listing all the feature types wanted.
protected  int[] getSkipArray(java.lang.String featureString, DcwRecordFile table, java.lang.String colAppend)
          Build an array that lists the columns we require the record to have.
static void main(java.lang.String[] argv)
           
 void resetForCAT()
          Lets the warehouse know that a different CoverageAttributeTable will be using it.
 void setProperties(java.lang.String prefix, java.util.Properties props)
          Set properties of the warehouse.
 
Methods inherited from class com.bbn.openmap.layer.vpf.LayerGraphicWarehouseSupport
addArea, addEdge, addPoint, addText, checkLibraryForUsage, clear, createAreaOMPoly, createEdgeOMPoly, createOMPoint, createOMText, doThinning, drawAreaFeatures, drawCPointFeatures, drawEdgeFeatures, drawEPointFeatures, drawTextFeatures, getDrawingAttributes, getFanEpsilon, getFeatureString, getGraphics, getGraphics, getGUI, getProperties, getUseLibraries, initDrawingAttributes, isDoThinning, setAreaFeatures, setCPointFeatures, setDoThinning, setDrawingAttributes, setEdgeFeatures, setEPointFeatures, setFanEpsilon, setFeatures, setTextFeatures, setUseLibraries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VPFLayerGraphicWarehouse

public VPFLayerGraphicWarehouse()
Method Detail

setProperties

public void setProperties(java.lang.String prefix,
                          java.util.Properties props)
Set properties of the warehouse.

Overrides:
setProperties in class LayerGraphicWarehouseSupport
Parameters:
prefix - the prefix to use for looking up properties.
props - the properties file to look at.

getFeatures

public java.util.List<java.lang.String> getFeatures()
Get a List of Strings listing all the feature types wanted. Returned with the area features first, then text features, then line features, then point features.


getSkipArray

protected int[] getSkipArray(java.lang.String featureString,
                             DcwRecordFile table,
                             java.lang.String colAppend)
Build an array that lists the columns we require the record to have.

Parameters:
featureString - the (space-separated) list of required columns
table - the table we use to find the column numbers
colAppend - the (possibly null) string we append to the entries in featureString to build the real column name

resetForCAT

public void resetForCAT()
Lets the warehouse know that a different CoverageAttributeTable will be using it. The skip arrays need to be reset.

Specified by:
resetForCAT in interface VPFWarehouse
Overrides:
resetForCAT in class LayerGraphicWarehouseSupport

createFeature

protected boolean createFeature(java.util.List<java.lang.Object> prim,
                                int[] skipArray)
Determine if this primitive should be drawn or skipped.

Parameters:
prim - the list for the primitive feature object.
skipArray - a list of columns.
Returns:
true if any of the columns listed in skipArray is non-null.

createArea

public void createArea(CoverageTable covtable,
                       AreaTable areatable,
                       java.util.List<java.lang.Object> facevec,
                       LatLonPoint ll1,
                       LatLonPoint ll2,
                       double dpplat,
                       double dpplon)
Description copied from interface: VPFGraphicWarehouse
Method called by the VPF reader code to construct an area feature.

Parameters:
covtable - the coverage table for this area
areatable - the areatable being parsed
facevec - the record read from the area table
ll1 - upperleft of selection region (passed to warehouse)
ll2 - lowerright of selection region (passed to warehouse)
dpplat - threshold for latitude thinning (passed to warehouse)
dpplon - threshold for longitude thinngin (passed to warehouse)

createEdge

public void createEdge(CoverageTable c,
                       EdgeTable edgetable,
                       java.util.List<java.lang.Object> edgevec,
                       LatLonPoint ll1,
                       LatLonPoint ll2,
                       double dpplat,
                       double dpplon,
                       CoordFloatString coords)
Description copied from interface: VPFGraphicWarehouse
Method called by the VPF reader code to construct an edge feature.

Parameters:
c - the coverage table for this edge
edgetable - the edgetable being parsed
edgevec - the record read from the edge table
ll1 - upperleft of selection region (passed to warehouse)
ll2 - lowerright of selection region (passed to warehouse)
dpplat - threshold for latitude thinning (passed to warehouse)
dpplon - threshold for longitude thinngin (passed to warehouse)

createText

public void createText(CoverageTable c,
                       TextTable texttable,
                       java.util.List<java.lang.Object> textvec,
                       double latitude,
                       double longitude,
                       java.lang.String text)
Description copied from interface: VPFGraphicWarehouse
Method called by the VPF reader code to construct a text feature.

Parameters:
c - the coverage table for this text
texttable - the texttable being parsed
textvec - the record read from the text table
latitude - the latitude of the text
longitude - the longitude of the text
text - the text string

createNode

public void createNode(CoverageTable c,
                       NodeTable nt,
                       java.util.List<java.lang.Object> nodeprim,
                       double latitude,
                       double longitude,
                       boolean isEntityNode)
Description copied from interface: VPFGraphicWarehouse
Method called by the VPF reader code to construct a node feature.

Parameters:
c - the coverage table for this node
nt - the nodetable being parsed
nodeprim - the record read from the node table
latitude - the latitude of the node
longitude - the longitude of the node
isEntityNode - true if we are reading entity notes, false if we are reading connected nodes

main

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


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