## com.bbn.openmap.layer.vpf
Class FeatureClassInfo

    java.lang.Object
      com.bbn.openmap.layer.vpf.DcwRecordFile
          com.bbn.openmap.layer.vpf.FeatureClassInfo

All Implemented Interfaces:
  Closable, java.lang.Runnable, TerminatingRunnable

public class FeatureClassInfo
extends DcwRecordFile
implements TerminatingRunnable, Closable

This class wraps a feature type file (potext.tft, polbndl.lft, etc) from VPF. It maintains sufficient information about the table it is indexed from so that it can take a List of values, rather than a single value. It also knows about its containing CoverageTable so it can look up information in int.vdt and char.vdt.

Field Summary
`protected char` `featureType` the type of feature this table represents
`protected DcwThematicIndex` `thematicIndex` the thematic index for the tile_id column
`static java.lang.String` `TILE_ID_COLUMN_NAME` the name of the column where tiling information lives
`protected java.lang.String` `tileFileColName` the name of the column with the primitive id
`protected java.lang.String` `tileFileName` the name of the primitive file: edg, fac, end, cnd

Fields inherited from class com.bbn.openmap.layer.vpf.DcwRecordFile
`byteorder, columnInfo, documentationFileName, filename, ID_COLUMN_NAME, inputFile, MSBFirst, recordLength, tableDescription, tablename, vli`

Constructor Summary
`FeatureClassInfo(CoverageTable cthis, java.lang.String colname, java.lang.String tablepath, java.lang.String ftname)` Construct a FeatureClassInfo.
`FeatureClassInfo(CoverageTable cthis, java.lang.String colname, java.lang.String tablepath, java.lang.String ftname, java.lang.String tileDirFile, java.lang.String tileDirFileColName)` Construct a FeatureClassInfo that can be used for feature search

Method Summary
`void` `checkInit()` Check to see if the file has been fully initialized, call run() to do that if needed.
`boolean` `close(boolean done)` Implement the Closable interface
`void` `findYourself(DcwRecordFile rf)` Probe the DcwRecordFile looking for what column we are in.
`protected java.lang.String` `getAttribute(DcwColumnInfo dci, java.lang.Object colObj, MutableInt type)`
`java.lang.String` `getAttribute(int ftid, int colIndex, MutableInt type)` Given a row from the primitive table, this function returns a full string description of the row
`java.lang.String` `getDescription(java.util.List l, MutableInt type)` Given a row from the primitive table, this function returns a full string description of the row
`int` `getFaccIndex()` Returns the column position of the f_code column.
`char` `getFeatureType()` Return the type of feature this table is for.
`DcwThematicIndex` `getThematicIndex()` Returns the thematic index for the tile_id column, if it has been initialized.
`int` `getTileIdIndex()` Returns the column position of the tile_id column.
`int` `getTilePrimitiveIdColIndex()` Returns the column position of the primitive id column.
`java.lang.String` `getTileThematicFileName()` Returns the file name (no path info) of the thematic index for the tile_id column.
`TilingAdapter` `getTilingAdapter()` Returns a TilingAdapter suitable for retrieving primitive ids from records in this feature table.
`boolean` `initThematicIndex(java.lang.String path)` Causes the thematic index for the tile_id column to be initilized.
`void` `run()` Complete the initialization of the FeatureClassInfo.

Methods inherited from class com.bbn.openmap.layer.vpf.DcwRecordFile

`close, finalize, finishInitialization, getColumnCount, getColumnInfo, getColumnName, getDescription, getDocumentationFilename, getRecordCount, getRecordLength, getRow, getRow, getTableFile, getTableName, getTilingAdapter, getTilingAdapter, getTilingAdapter, lookupSchema, lookupSchema, main, parseAllRowsAndPrintSome, parseRow, parseRow, parseSomeRowsAndPrint, printSchema, reopen, seekToRow, whatColumn`

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

Field Detail

### tileFileName

    protected java.lang.String tileFileName

  the name of the primitive file: edg, fac, end, cnd

### tileFileColName

    protected java.lang.String tileFileColName

  the name of the column with the primitive id

### featureType

    protected char featureType

  the type of feature this table represents

### TILE_ID_COLUMN_NAME

    public static final java.lang.String TILE_ID_COLUMN_NAME

  the name of the column where tiling information lives

  See Also:
    Constant Field Values

### thematicIndex

    protected DcwThematicIndex thematicIndex

  the thematic index for the tile_id column

Constructor Detail

### FeatureClassInfo

    public FeatureClassInfo(CoverageTable cthis,
                            java.lang.String colname,
                            java.lang.String tablepath,
                            java.lang.String ftname)
                     throws FormatException

  Construct a FeatureClassInfo.

Parameters:
  `cthis` - the CoverageTable to use for vdt lookups
  `colname` - the column name from the primitive table
  `tablepath` - the directory of the feature table
  `ftname` - the name of the feature type
Throws:
  `FormatException` - some error was encountered

### FeatureClassInfo

    public FeatureClassInfo(CoverageTable cthis,
                            java.lang.String colname,
                            java.lang.String tablepath,
                            java.lang.String ftname,
                            java.lang.String tileDirFile,
                            java.lang.String tileDirFileColName)
                     throws FormatException

  Construct a FeatureClassInfo that can be used for feature search

Parameters:
  `cthis` - the CoverageTable to use for vdt lookups
  `colname` - the column name from the primitive table
  `tablepath` - the directory of the feature table
  `ftname` - the name of the feature type
  `tileDirFile` - the name of the primitive file
  `tileDirFileColName` - the name of the primitive id column
Throws:
  `FormatException` - some error was encountered

Method Detail

### getTilingAdapter

    public TilingAdapter getTilingAdapter()

  Returns a TilingAdapter suitable for retrieving primitive ids from records in this feature table.

  Returns:
    a tilingadapter or null

### getTileThematicFileName

    public java.lang.String getTileThematicFileName()

  Returns the file name (no path info) of the thematic index for the tile_id column.

### initThematicIndex

    public boolean initThematicIndex(java.lang.String path)

  Causes the thematic index for the tile_id column to be initilized.

  Parameters:
    `path` - the path to the directory where the index lives
  Returns:
    true if a thematic index is available, false if not

### getThematicIndex

    public DcwThematicIndex getThematicIndex()

  Returns the thematic index for the tile_id column, if it has been initialized.

  Returns:
    null or a themaitc index for the column

### getTileIdIndex

    public int getTileIdIndex()

  Returns the column position of the tile_id column.

  See Also:
    `DcwRecordFile.whatColumn(String)`

### getFaccIndex

    public int getFaccIndex()

  Returns the column position of the f_code column.

  See Also:
    `DcwRecordFile.whatColumn(String)`

### getTilePrimitiveIdColIndex

    public int getTilePrimitiveIdColIndex()

  Returns the column position of the primitive id column.

  See Also:
    `DcwRecordFile.whatColumn(String)`

### getFeatureType

    public char getFeatureType()

  Return the type of feature this table is for. Returns one of the featuretype codes in CoverageTable.

  See Also:
    `CoverageTable.AREA_FEATURETYPE`

### run

    public void run()

  Complete the initialization of the FeatureClassInfo. This function can be called more than once.

  Specified by:
    `run` in interface `java.lang.Runnable`

### close

    public boolean close(boolean done)

  Implement the Closable interface

  Specified by:
    `close` in interface `Closable`
  Parameters:
    `done` - `true` indicates that this is a permanent closure. `false` indicates that the object may be used again later, as this is only an attempt to temporarily reclaim resources
  Returns:
    `true` indicates the object is still usable. `false` indicates that the object is now unusable, and any references to it should be released so the garbage collector can do its job.

### findYourself

    public void findYourself(DcwRecordFile rf)

  Probe the DcwRecordFile looking for what column we are in. (Info needed later to getDescription with the data list.)

  Parameters:
    `rf` - the primitive data table we'll get rows from

### getDescription

    public java.lang.String getDescription(java.util.List l,
                                           MutableInt type)

  Given a row from the primitive table, this function returns a full string description of the row

  Parameters:
    `l` - the record list from the primitive table
    `type` - the first integral type
  Returns:
    the description string for the list

### getAttribute

    public java.lang.String getAttribute(int ftid,
                                         int colIndex,
                                         MutableInt type)

  Given a row from the primitive table, this function returns a full string description of the row

  Parameters:
    `ftid` - the record list from the primitive table
    `colIndex` - column index for attribute to return
    `type` - the first integral type
  Returns:
    the description string for the list

### checkInit

    public void checkInit()

  Check to see if the file has been fully initialized, call run() to do that if needed.

### getAttribute

    protected java.lang.String getAttribute(DcwColumnInfo dci,
                                            java.lang.Object colObj,
                                            MutableInt type)

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