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.shape
Class ESRIRecord

    java.lang.Object
      com.bbn.openmap.layer.shape.ShapeUtils
          com.bbn.openmap.layer.shape.ESRIRecord

All Implemented Interfaces:
  ShapeConstants

Direct Known Subclasses:
  ESRIMultiPointRecord, ESRIPointRecord, ESRIPolygonRecord

public abstract class ESRIRecord
extends ShapeUtils

This is the base class for all shape record classes. It stores the record number and content length of a record, also known as the record header.

Version:
  $Revision: 1.2.2.1 $ $Date: 2004/10/14 18:27:16 $
Author:
  Ray Tomlinson, Tom Mitchell

Field Summary
`int` | `contentLength` The length of the data portion of this record.
`int` | `recordNumber` The ordinal of this record.

Fields inherited from interface com.bbn.openmap.dataAccess.shape.ShapeConstants
`DBF_ATTRIBUTE, DBF_CHARACTER, DBF_DATE, DBF_LOGICAL, DBF_MEMO, DBF_NUMERIC, DBF_TYPE_CHARACTER, DBF_TYPE_DATE, DBF_TYPE_LOGICAL, DBF_TYPE_MEMO, DBF_TYPE_NUMERIC, PARAM_DBF, PARAM_SHP, PARAM_SHX, SHAPE_BOUNDS_ATTRIBUTE, SHAPE_DBF_DASHPATTERN, SHAPE_DBF_DASHPHASE, SHAPE_DBF_DESCRIPTION, SHAPE_DBF_FILLCOLOR, SHAPE_DBF_INFO_ATTRIBUTE, SHAPE_DBF_LINECOLOR, SHAPE_DBF_LINEWIDTH, SHAPE_DBF_SELECTCOLOR, SHAPE_FILE_HEADER_LENGTH, SHAPE_FILE_RECORD_HEADER_LENGTH, SHAPE_INDEX_ATTRIBUTE, SHAPE_MAX_MEASURE_ATTRIBUTE, SHAPE_MAX_Z_ATTRIBUTE, SHAPE_MEASURE_ATTRIBUTE, SHAPE_MIN_MEASURE_ATTRIBUTE, SHAPE_MIN_Z_ATTRIBUTE, SHAPE_TYPE_ARC, SHAPE_TYPE_MULTIPATCH, SHAPE_TYPE_MULTIPOINT, SHAPE_TYPE_MULTIPOINTM, SHAPE_TYPE_MULTIPOINTZ, SHAPE_TYPE_NULL, SHAPE_TYPE_POINT, SHAPE_TYPE_POINTM, SHAPE_TYPE_POINTZ, SHAPE_TYPE_POLYGON, SHAPE_TYPE_POLYGONM, SHAPE_TYPE_POLYGONZ, SHAPE_TYPE_POLYLINE, SHAPE_TYPE_POLYLINEM, SHAPE_TYPE_POLYLINEZ, SHAPE_Z_ATTRIBUTE`

Constructor Summary
`ESRIRecord()` Initialize an empty record.
`ESRIRecord(byte[] b, int off)` Initialize a record from a buffer.

Method Summary
`abstract OMGeometry` | `addOMGeometry(OMGeometryList list)` Generates OMGeometry and adds them to the given list.
`abstract void` | `addOMGraphics(OMGraphicList list, DrawingAttributes drawingAttributes)` Generates 2D OMGraphics and adds them to the given list.
`int` | `getBinaryStoreSize()` Returns the number of bytes needed to store the record header and record data.
`abstract ESRIBoundingBox` | `getBoundingBox()` Gets this record's bounding box.
`int` | `getContentLength()` Accessor for the content length of this record.
`abstract int` | `getRecordLength()` Yields the length of this record's data portion.
`int` | `getRecordNumber()` Accessor for record number field.
`abstract int` | `getShapeType()` Gets this record's shape type as an int.
`int` | `write(byte[] b, int off)` Writes this record to the given buffer at the given offset.

Methods inherited from class com.bbn.openmap.layer.shape.ShapeUtils
`readBEInt, readBox, readLEDouble, readLEInt, readLEInt, readLELong, readPoint, writeBEInt, writeBox, writeLEDouble, writeLEInt, writeLELong, writePoint`

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

Field Detail

### recordNumber

    public int recordNumber

  The ordinal of this record.

### contentLength

    public int contentLength

  The length of the data portion of this record.

Constructor Detail

### ESRIRecord

    public ESRIRecord()

  Initialize an empty record. Used when constructing a record to be written to a shape file.

### ESRIRecord

    public ESRIRecord(byte[] b,
                      int off)

  Initialize a record from a buffer. Reads the record header fields from the given buffer at the given offset.

Parameters:
  `b` - the buffer
  `off` - the offset

Method Detail

### addOMGraphics

    public abstract void addOMGraphics(OMGraphicList list,
                                       DrawingAttributes drawingAttributes)

  Generates 2D OMGraphics and adds them to the given list. If you are using jdk1.1.X, you'll have to comment out this method, because jdk1.1.X doesn't know about the java.awt.Stroke and java.awt.Paint interfaces.

  Parameters:
    `list` - the graphics list
    `drawingAttributes` - Attributes that describe how to render the graphics.

### addOMGeometry

    public abstract OMGeometry addOMGeometry(OMGeometryList list)

  Generates OMGeometry and adds them to the given list. The list takes care of DrawingAttributes.

  Parameters:
    `list` - the geometry list

### getBoundingBox

    public abstract ESRIBoundingBox getBoundingBox()

  Gets this record's bounding box.

  Returns:
    a bounding box

### getShapeType

    public abstract int getShapeType()

  Gets this record's shape type as an int. Shape types are enumerated on the ShapeUtils class.

  Returns:
    the shape type as an int

### getRecordLength

    public abstract int getRecordLength()

  Yields the length of this record's data portion.

  Returns:
    number of bytes equal to the size of this record's data

### getBinaryStoreSize

    public int getBinaryStoreSize()

  Returns the number of bytes needed to store the record header and record data.

  Returns:
    number of bytes equal to the size of this record

### write

    public int write(byte[] b,
                     int off)

  Writes this record to the given buffer at the given offset.

  Parameters:
    `b` - the buffer
    `off` - the offset
  Returns:
    the number of bytes written

### getRecordNumber

    public int getRecordNumber()

  Accessor for record number field.

  Returns:
    the ordinal of this record in the file

### getContentLength

    public int getContentLength()

  Accessor for the content length of this record. That's the size of this record in 16 bit words.

  Returns:
    the number of 16 bit words that this record takes up

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