DcwThematicIndex (OpenMap API)
Date: 2016-12-09

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

    java.lang.Object
      com.bbn.openmap.layer.vpf.DcwThematicIndex

    public class DcwThematicIndex

extends java.lang.Object

Read a VPF thematic index file. (VPF *.?ti files)

Nested Class Summary
`static class` | `DcwThematicIndex.IndexRecord` A utility class used to record index records.

Field Summary
`protected boolean` | `byteOrder` the byte order of the file
`protected java.lang.String` | `filename` the name of the file being read

Constructor Summary
`DcwThematicIndex(java.lang.String filename, boolean border)` Construct an index, assumes this is pre-VPF2407 format.
`DcwThematicIndex(java.lang.String filename, boolean border, boolean vpf2407)` Construct an index, assumes this is pre-VPF2407 format.

Method Summary
`void` | `close()` Closes the associated input file.
`int[]` | `get(java.lang.Object valueIndex)` Returns the list of rows listed for this index
`java.lang.String` | `getColumnIndexed()` Returns the name of the column being indexed
`char` | `getDataTypeSpecifier()` Returns the datatype specifier
`char` | `getFieldTypeOfIndex()` Returns the type of the field being indexed
`int` | `getNumberOfCodes()` Returns the number of distinct indexed values
`int` | `getNumberOfDataElements()` Returns the number of elements in the index field
`int` | `getNumberOfRows()` Returns the number of rows indexed
`boolean` | `getSorted()`
`java.lang.String` | `getTableIndexed()` Returns the name of the table being indexed
`char` | `getTypeOfIndex()` Returns the type of index (refer to VPF spec for valid values)
`java.lang.Object[]` | `getValueIndexes()` Returns the set of values indexed by this thematic index.
`void` | `reopen(int offset)` Reopen the associated input file.

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

Field Detail

### filename

    protected final java.lang.String filename

  the name of the file being read

### byteOrder

    protected boolean byteOrder

  the byte order of the file

Constructor Detail

### DcwThematicIndex

    public DcwThematicIndex(java.lang.String filename,
                            boolean border)
                     throws FormatException

  Construct an index, assumes this is pre-VPF2407 format.

  Parameters:
    `filename` - the file to oped
    `border` - the byteorder
  Throws:
    `FormatException`

### DcwThematicIndex

    public DcwThematicIndex(java.lang.String filename,
                            boolean border,
                            boolean vpf2407)
                     throws FormatException

  Construct an index, assumes this is pre-VPF2407 format.

  Parameters:
    `filename` - the file to oped
    `border` - the byteorder
    `vpf2407` - true for MILSTD-2407 format thematic index. false will properly read a VPF2407 format index, but will ignore one header field (sorted). true will improperly read old-style data.
  Throws:
    `FormatException`

Method Detail

### getValueIndexes

    public java.lang.Object[] getValueIndexes()

  Returns the set of values indexed by this thematic index.

  Returns:
    the set of values indexed

### get

    public int[] get(java.lang.Object valueIndex)
              throws FormatException

  Returns the list of rows listed for this index

  Parameters:
    `valueIndex` - the value to look up
  Returns:
    an array of rows
  Throws:
    `FormatException`

### getNumberOfCodes

    public int getNumberOfCodes()

  Returns the number of distinct indexed values

  Returns:
    the number of distinct indexed values

### getNumberOfRows

    public int getNumberOfRows()

  Returns the number of rows indexed

  Returns:
    the number of rows indexed

### getTypeOfIndex

    public char getTypeOfIndex()

  Returns the type of index (refer to VPF spec for valid values)

  Returns:
    the type of index (refer to VPF spec for valid values)

### getFieldTypeOfIndex

    public char getFieldTypeOfIndex()

  Returns the type of the field being indexed

  Returns:
    the type of the field being indexed

### getNumberOfDataElements

    public int getNumberOfDataElements()

  Returns the number of elements in the index field

  Returns:
    the number of elements in the index field

### getDataTypeSpecifier

    public char getDataTypeSpecifier()

  Returns the datatype specifier

  Returns:
    the datatype specifier

### getTableIndexed

    public java.lang.String getTableIndexed()

  Returns the name of the table being indexed

  Returns:
    the name of the table being indexed

### getColumnIndexed

    public java.lang.String getColumnIndexed()

  Returns the name of the column being indexed

  Returns:
    the name of the column being indexed

### getSorted

    public boolean getSorted()

### close

    public void close()
               throws FormatException

  Closes the associated input file. (may later get reopened)

  Throws:
    `FormatException`

### reopen

    public void reopen(int offset)
                throws FormatException

  Reopen the associated input file.

  Parameters:
    `offset` - the byte offset to seek to upon reopening the file. If offset is invalid (less than 1), then the input stream is in an undefined location.
  Throws:
    `FormatException` - some error was encountered in reopening file or seeking to the desired row.
  See Also:
    `close()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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