Beyond The Data API

So far, the APIs presented have focused on one task only - the representation and manipulation of topic map data. However, it is recognised that an effective topic map application will require additional services. The representational APIs presented here should be used to form the core of a modularized topic map API. Modularization helps in a number of ways. For the implementor, modularization enables implementors to manage the trade-off between support for a complete API and the complexity involved in implementing all of that API. Additionally, modularization makes it possible for "standard" implementations of higher-level modules to be created which make use only of the API of lower level modules. Just as an XSLT processor might use any underlying DOM implementation, so a module of topic map indexing services could be written to make use of any underlying core data representation and event representation modules. For a developer, having clearly defined modules enables her to choose which implementation to use based on the modules she requires for the task, or to create applications which use an easily specified subset of the functionality of a "complete" topic map API.

The following diagram shows a proposed set of packages for a complete topic map API. The package core contains the data representation classes such as those APIs presented in this paper. The events package is used to provide event/action-based handling of updates to the topic map data. The index package provides standard indexing services for the topic map data (e.g. index of objects by their type, or an index of topics by their subject or subject indicators). utils is a catch-all package for additional convenience functions and indexes and may require further refinement. In addition to these basic modules, we show modules handling the streaming of topic maps either for serialization and deserialization to interchange syntaxes such as XTM 1.0, or simply streaming topic map objects found during a walk of the data set. and the XTM 1.0 model.

Figure 12 - Modules of a Topic Map API
Up: Developing A Topic Map Programming Model
Previous: Architecture Proposals Next: Conclusions