|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.bbn.openmap.layer.vpf.VPFAutoFeatureGraphicWarehouse
public class VPFAutoFeatureGraphicWarehouse
Implement a graphic factory that builds OMGraphics from VPF. Designed to work closely with the VPFFeatureLayer, using GeoSymAttExpression objects to figure out how features are rendered. Uses two files to help manage features. The first file is a symbol lookup file that ties FACC codes and attribute settings with a set of CGM files. This file should cover entries for a particular data set. The second file is a priority file, that lists the order that features should be rendered, by feature type, facc code and attribute settings. If you want to change which features are displayed, or the order in which they are displayed, this is the file to modify.
Both of these files are CSV files, and their fields are important. The lookup file is of the format:
facc,type,symbol,conditions AK160,A,0804, AL005,A,0081 0734, AL015,P,0002,bfc=81ANDsta=0or2or3or6or11 AL015,P,0010,bfc=7ANDhwt=0or2or3or4or7or22 AL015,P,0011,bfc=7ANDhwt=11or14or15or16or20or21Note that the conditions field can be empty.The first field is the 5 character FACC code, the second field is the type (P, A, L) and the third field is the CGM file name.
The priority file is similar:
priority,type,facc,conditions,description 0,Area,BA040, 0,Area,BE010,cvl=99999 0,Area,BE010,idsm=0 AND cvl>=msdcand<>99999 0,Area,BE010,idsm=0 AND cvl>=ssdcand<msdcThe priority field really isn't important, the order of the overall file is.
OMGraphic| Nested Class Summary | |
|---|---|
protected static class |
VPFAutoFeatureGraphicWarehouse.FeaturePriorityHolder
A FeaturePriorityHolder represents a rendering order slot in a list of feature types to be rendered. |
| Field Summary | |
|---|---|
static java.lang.String |
CGM_DIR_PROPERTY
|
protected java.lang.String[] |
compositeFeatureFaccs
|
protected java.lang.String |
debugFacc
If set, the warehouse will limit visibility to specified facc and print out decision making process. |
static int |
DEFAULT_ICON_SIZE
|
static java.lang.String |
EV_IDSM
|
static java.lang.String |
EV_ISDM
|
static java.lang.String |
EV_MSDC
|
static java.lang.String |
EV_MSSC
|
static java.lang.String |
EV_SSDC
|
static java.lang.String |
FACC_DEBUG_PROPERTY
|
protected java.util.Hashtable<java.lang.String,java.util.List<VPFAutoFeatureGraphicWarehouse.FeaturePriorityHolder>> |
faccLookup
|
protected java.lang.String |
faccLookupFilePath
|
protected VPFFeatureInfoHandler |
featInfoHandler
|
static java.lang.String |
FEATURE_INFO_HANDLER_PROPERTY
|
protected java.lang.String |
geoSymDirectory
|
static java.lang.String |
ICON_SIZE_PROPERTY
|
protected int |
iconSize
|
protected double |
idsm
Interactive Display Selection Mode:ECDIS defines the display of depth zones to be divided into two or four depth areas. |
protected java.lang.String |
info
|
protected double |
isdm
Interactive Shallow Display Mode:ECDIS defines the display mode of shallow water areas (shallow depth zones) to be one of two symbology scenarios. |
protected static java.util.logging.Logger |
logger
|
protected double |
msdc
Mariner Specified Deep Contour: The four-zone display mode requires the establishment of a deep contour that must be specified by the mariner through application inquiry. |
protected double |
mssc
Mariner Specified Shallow Contour - The four-zone display mode requires the establishment of a shallow contour that must be specified by the mariner through application inquiry. |
protected java.lang.String |
prefix
The property prefix for scoping properties. |
protected java.util.List<VPFAutoFeatureGraphicWarehouse.FeaturePriorityHolder> |
priorities
|
static java.lang.String |
PRIORITY_FILE_PROPERTY
|
protected java.lang.String |
priorityFilePath
|
protected double |
ssdc
Ship's Safety Depth Contour: The ships safety depth contour represents a safe contour based on the draft of the ship. |
static java.lang.String |
SYMBOL_LOOKUP_FILE_PROPERTY
|
| Fields inherited from interface com.bbn.openmap.PropertyConsumer |
|---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
| Constructor Summary | |
|---|---|
VPFAutoFeatureGraphicWarehouse()
|
|
| Method Summary | |
|---|---|
boolean |
checkLibraryForUsage(java.lang.String libName)
Utility method to check if the specified library name has been set by the configuration as one to use. |
OMGraphic |
createArea(CoverageTable covtable,
AreaTable areatable,
java.util.List<java.lang.Object> facevec,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon,
java.lang.String featureType,
int primID)
Create an OMPoly for an area described by the facevec. |
OMGraphic |
createEdge(CoverageTable c,
EdgeTable edgetable,
java.util.List<java.lang.Object> edgevec,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon,
CoordFloatString coords,
java.lang.String featureType,
int primID)
|
OMGraphic |
createNode(CoverageTable c,
NodeTable t,
java.util.List<java.lang.Object> nodeprim,
double latitude,
double longitude,
boolean isEntityNode,
java.lang.String featureType,
int primID)
Method called by the VPF reader code to construct a node feature. |
OMGraphic |
createText(CoverageTable c,
TextTable texttable,
java.util.List<java.lang.Object> textvec,
double latitude,
double longitude,
java.lang.String text,
java.lang.String featureType,
int primID)
|
boolean |
drawAreaFeatures()
Return true, this is a NOOP for this warehouse. |
boolean |
drawCPointFeatures()
Return true, this is a NOOP for this warehouse. |
boolean |
drawEdgeFeatures()
Return true, this is a NOOP for this warehouse. |
boolean |
drawEPointFeatures()
Return true, this is a NOOP for this warehouse. |
boolean |
drawTextFeatures()
Return true, this is a NOOP for this warehouse. |
double |
getExternalAttribute(java.lang.String rightSide)
|
VPFFeatureInfoHandler |
getFeatInfoHandler()
Set the object used to manage attribute formatting and display for features on the map. |
java.util.List<java.lang.String> |
getFeatures()
Get a List of Strings listing all the feature types wanted. |
OMGraphicList |
getFeatures(LibrarySelectionTable lst,
LatLonPoint ll1,
LatLonPoint ll2,
Projection proj,
OMGraphicList omgList)
This is where the magic happens. |
java.awt.Component |
getGUI(LibrarySelectionTable lst)
Get the GUI to control different aspects of the warehouse. |
int |
getIconSize()
|
java.util.Properties |
getProperties(java.util.Properties getList)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
java.util.Properties |
getPropertyInfo(java.util.Properties list)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getPropertyPrefix()
Get the property key prefix that is being used to prepend to the property keys for Properties lookups. |
static char |
getType(java.lang.String type)
|
java.util.List<java.lang.String> |
getUseLibraries()
Get a list of VPF library names that should be used, specified at configuration. |
void |
handleInformationForOMGraphic(OMGraphic omg,
FeatureClassInfo fci,
java.util.List<java.lang.Object> fcirow)
Given an OMGraphic that is going to be added to the map, use the FeatureClassInfo to gather attribute information from the fcirow contents. |
protected void |
init()
The warehouse is initialized the first time features are fetched. |
boolean |
needToFetchTileContents(java.lang.String libraryName,
java.lang.String currentFeature,
TileDirectory currentTile)
|
void |
resetForCAT()
To let the warehouse know that a new CoverageAttributeTable will be using the warehouse. |
void |
setFeatInfoHandler(VPFFeatureInfoHandler featInfoHandler)
|
void |
setIconSize(int iconSize)
|
void |
setProperties(java.util.Properties setList)
Method to set the properties in the PropertyConsumer. |
void |
setProperties(java.lang.String prefix,
java.util.Properties props)
Set properties of the warehouse. |
void |
setPropertyPrefix(java.lang.String prefix)
Set the property key prefix that should be used by the PropertyConsumer. |
void |
setUseLibraries(java.util.List<java.lang.String> libNames)
Set the VPF libraries to use, by name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static java.util.logging.Logger logger
public static final java.lang.String CGM_DIR_PROPERTY
public static final java.lang.String SYMBOL_LOOKUP_FILE_PROPERTY
public static final java.lang.String PRIORITY_FILE_PROPERTY
public static final java.lang.String FEATURE_INFO_HANDLER_PROPERTY
public static final java.lang.String FACC_DEBUG_PROPERTY
public static final java.lang.String ICON_SIZE_PROPERTY
public static final int DEFAULT_ICON_SIZE
protected java.util.List<VPFAutoFeatureGraphicWarehouse.FeaturePriorityHolder> priorities
protected java.util.Hashtable<java.lang.String,java.util.List<VPFAutoFeatureGraphicWarehouse.FeaturePriorityHolder>> faccLookup
protected java.lang.String priorityFilePath
protected java.lang.String faccLookupFilePath
protected java.lang.String geoSymDirectory
protected VPFFeatureInfoHandler featInfoHandler
protected int iconSize
protected java.lang.String[] compositeFeatureFaccs
protected java.lang.String debugFacc
protected java.lang.String prefix
public static final java.lang.String EV_ISDM
public static final java.lang.String EV_IDSM
public static final java.lang.String EV_SSDC
public static final java.lang.String EV_MSDC
public static final java.lang.String EV_MSSC
protected double isdm
protected double idsm
protected double ssdc
protected double msdc
protected double mssc
protected java.lang.String info
| Constructor Detail |
|---|
public VPFAutoFeatureGraphicWarehouse()
| Method Detail |
|---|
protected void init()
public static char getType(java.lang.String type)
public void setUseLibraries(java.util.List<java.lang.String> libNames)
setUseLibraries in interface VPFWarehousepublic java.util.List<java.lang.String> getUseLibraries()
getUseLibraries in interface VPFWarehousepublic boolean checkLibraryForUsage(java.lang.String libName)
checkLibraryForUsage in interface VPFWarehouselibName - the library name to test
public OMGraphic createArea(CoverageTable covtable,
AreaTable areatable,
java.util.List<java.lang.Object> facevec,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon,
java.lang.String featureType,
int primID)
createArea in interface VPFFeatureWarehouse
public OMGraphic createEdge(CoverageTable c,
EdgeTable edgetable,
java.util.List<java.lang.Object> edgevec,
LatLonPoint ll1,
LatLonPoint ll2,
double dpplat,
double dpplon,
CoordFloatString coords,
java.lang.String featureType,
int primID)
createEdge in interface VPFFeatureWarehouse
public OMGraphic createText(CoverageTable c,
TextTable texttable,
java.util.List<java.lang.Object> textvec,
double latitude,
double longitude,
java.lang.String text,
java.lang.String featureType,
int primID)
createText in interface VPFFeatureWarehouse
public OMGraphic createNode(CoverageTable c,
NodeTable t,
java.util.List<java.lang.Object> nodeprim,
double latitude,
double longitude,
boolean isEntityNode,
java.lang.String featureType,
int primID)
createNode in interface VPFFeatureWarehouse
public boolean needToFetchTileContents(java.lang.String libraryName,
java.lang.String currentFeature,
TileDirectory currentTile)
needToFetchTileContents in interface VPFFeatureWarehouse
public OMGraphicList getFeatures(LibrarySelectionTable lst,
LatLonPoint ll1,
LatLonPoint ll2,
Projection proj,
OMGraphicList omgList)
throws FormatException
lst - LibrarySelectionTable that lets the warehouse know where the
data is and what's in it.ll1 - upper left coordinate of the desired area.ll2 - lower right coordinate of the desired area.proj - the projection for the area, used to generate OMGraphics
added to the list.omgList - the list to add OMGraphics to. One will be created and
returned if this is null.
FormatExceptionpublic boolean drawEdgeFeatures()
drawEdgeFeatures in interface VPFWarehousepublic boolean drawTextFeatures()
drawTextFeatures in interface VPFWarehousepublic boolean drawAreaFeatures()
drawAreaFeatures in interface VPFWarehousepublic boolean drawEPointFeatures()
drawEPointFeatures in interface VPFWarehousepublic boolean drawCPointFeatures()
drawCPointFeatures in interface VPFWarehousepublic double getExternalAttribute(java.lang.String rightSide)
rightSide - the string pulled out of the VPF data for attribute
comparisons.
public void handleInformationForOMGraphic(OMGraphic omg,
FeatureClassInfo fci,
java.util.List<java.lang.Object> fcirow)
omg - The OMGraphic representing a feature.fci - The Description of the columns of the fcirow.fcirow - The attributes for the feature.public void setProperties(java.util.Properties setList)
PropertyConsumer
setProperties in interface PropertyConsumersetList - a properties object that the PropertyConsumer
can use to retrieve expected properties it can use for
configuration.
public void setProperties(java.lang.String prefix,
java.util.Properties props)
setProperties in interface PropertyConsumerprefix - the prefix to use for looking up properties.props - the properties file to look at.public java.util.Properties getProperties(java.util.Properties getList)
PropertyConsumer
getProperties in interface PropertyConsumergetList - a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties list)
PropertyConsumer
getPropertyInfo in interface PropertyConsumerlist - a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new
Properties object should be created.
public void setPropertyPrefix(java.lang.String prefix)
PropertyConsumer
setPropertyPrefix in interface PropertyConsumerprefix - the prefix String.public java.lang.String getPropertyPrefix()
PropertyConsumer
getPropertyPrefix in interface PropertyConsumerpublic void resetForCAT()
VPFWarehouse
resetForCAT in interface VPFWarehousepublic int getIconSize()
public void setIconSize(int iconSize)
public java.awt.Component getGUI(LibrarySelectionTable lst)
VPFWarehouse
getGUI in interface VPFWarehouselst - LibrarySelectionTable to use to get information
about the data, if needed.public java.util.List<java.lang.String> getFeatures()
VPFWarehouse
getFeatures in interface VPFWarehousepublic VPFFeatureInfoHandler getFeatInfoHandler()
public void setFeatInfoHandler(VPFFeatureInfoHandler featInfoHandler)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||