Pitney Bowes MapXtreme User Manual

Page 498

Advertising
background image

Appendix D: Extensible Data Providers

Required Components

MapXtreme v7.1

505

Developer Guide

This interface is also typically the information that you will want to have written out to the workspace
file. For more information, see

Persistence Providers

.

ITable Interface

The ITable interface defines the interface for a Table, the basic container of information that
MapXtreme can read. query and display in a map. Methods on ITable include SearchAll,
SearchByEnvelope (area of interest) and SearchByKey. A table represents a single collection of
features and all features must contain the same structure (or schema).

ITableMetaData Interface

The ITableMetaData interface is used to convey important information about the properties and
supported capabilities of an open table, such as the columns and their data types, the types of
geometries contained in the table, and whether it supports editing operations.

The table metadata exposes the schema of the table as a collection of column definitions. Columns
are exposed through the IColumn and IGeometryColumn interfaces. Any column that returns
FeatureGeometry objects must be exposed as an IGeometryColumn. The IGeometryColumn also
enables the provider to indicate whether it supports Z and M dimensions in the geometry values it
returns and accepts during insert and update operations. Most data provider implementations will
have custom implementations for IColumn and IGeometryColumn to assist with the communication
of information between the MapXtreme search requests and the underlying provider implementation.

ICursor Interface

The ICursor interface is an IEnumerator that returns IFeature objects. When a search request is
issued against an ITable, the result is an ICursor which provides the access to the features. The
features returned from the cursor may be transient meaning that they are only expected to be valid
while the state of the cursor is unchanged. Advancing the cursor to the next record (feature) may
return the same feature object which may have been updated to the new values of the current
record. Robust data provider implementations should take advantage of this behavior to reuse
memory.

Search requests may request a subset of the attributes (columns) that the table exposes. The
features returned from the cursor must match the structure of the columns requested by the search.

IFeatureAccessor Interface

IFeatureAccessor is used to fetch features by key from a table. It has one primary method that it
exposes called FetchByKey which returns the feature identified by a given key. Each feature
returned by the data provider must contain a key. The definition and contents of a key are
determined by the data provider. When MapXtreme gives a key back to the data provider for
FetchByKey requests or editing operations, the data provider will use the key value(s) to identify the
correct record. The IFeatureAccessor interface provides a way for MapXtreme to bracket a set of
calls so that the data provider can, if desired, prepare a command and then bind in just the key
value(s) and execute the command for each FetchByKey call.

Advertising