TM4J Developer's Guide

Kal Ahmed

$Header: /cvsroot/tm4j/tm4j/docs/src/devguide/devguide.xml,v 1.12 2002/05/27 18:03:10 kal_ahmed Exp $


Table of Contents

1. Introduction
What Is TM4J ?
Who Should Read This Guide
Layout of the Developer's Guide
A Note On Example Code
Other Conventions
Class Properties
2. Change History
Changes Since 0.8.0
Introduction
Scope interface removed
Better Default TopicMapProvider Creation
New abstract representation of a topic map source
JNDI Service Provider
Implicit Class-Instance Associations Removed
New XTMWriter Configuration Interface
Changes Since 0.7.0
Introduction
Factory Method Changes
New Back-Ends
New Utilities
3. TM4J Basics
TM4J Organisation
org.tm4j.topicmap
org.tm4j.net
org.tm4j.topicmap.utils
org.tm4j.tmapi
org.tm4j.tolog
org.tm4j.topicmap.cmd
org.tm4j.topicmap.source
org.tm4j.jndi
Third Party JAR files
TM4J Architecture Overview
The TopicMapProviderFactory Class
TopicMapProvider
TopicMapSource
TopicMap
LocatorFactory
Locator
TopicMapFactory
IndexManager
Index
The Core Interfaces
TopicMapObject
TopicMapProvider
Creating the TopicMapProvider
Getting Topic Maps From The Provider
Adding Topic Maps To The Provider
Creating Topic Maps
Factory Methods
Error Handling
Logging
TM4J Logging Categories
Utilities
TopicMapUtils
TopicMapWalker
IDGenerator and IDGeneratorFactory
Extractors and Testers
Locators
Locator
URILocator
LocatorFactory
LocatorResolver and LocatorResolverManager
4. Basic Operations
Parsing Topic Maps From File
Creating Topic Maps Programmatically
Copying Topic Map Objects
Exporting XTM Files
Filtering The Output
5. Advanced Features
Collection Properties
Topic Merging
Dynamic Merging
Static Merging
Setting the Merging Mode
MergedTopicSubjectClashException
Implicit Topics
Property Change Listeners
Multi-value Property Changes
Vetoable Changes
Default Listeners
Overriding The Default Listeners
Turning Off Event Notification
Advanced Topic Map Parsing Using TopicMapBuilder
Configuring Parsing
Creating a Customised TopicMapSource
6. TM4J Indexing Subsystem
Abstract Indexing Architecture
The Index Interface
The IndexManager Interface
The IndexProvider Interface
The TM4J Basic Indexes
Extending The TM4J Indexes
The Full-Text Index
Using the Lucene FullText Index
Limitations of the Full-Text Index
7. TM4J Utilities
Introduction
Testers
Extractors
XTMUtils
Making a Topic Map Consistent
TopicMapDoclet
Invoking the TopicMapDoclet
Other Utility Classes
AssociationUtils
BaseNameUtils
ScopeUtils
TopicMapFragment
8. Tolog Query Engine
Querying A Topic Map
Using TologResultsSet
Extending The Tolog Engine
Custom Predicates Implementing org.tm4j.tologx.parser.Predicate
Custom Predicates Extending org.tm4j.tologx.predicates.PredicateBase
Efficient Tolog Querying
9. TMAPI Implementation
TMAPI TopicMapSystem Creation
TMAPI Feature Support
Moving between TMAPI and TM4J APIs
The Future Of TMAPI in TM4J
10. Unified Topic Maps
Creating a Unified Topic Map
Limitations Of The Unified Topic Map
11. Sharing Providers through JNDI
Introduction
Jakarta Tomcat Configuration
JNDIProviderFactory Configuration
Using the JNDIProviderFactory
Additional Information
12. Getting More Information
A. Installing The Hibernate Back-End
Installing The Database Schema
Alternate Installation Procedure (Using Ant)
Testing the Hibernate Backend
Limitations Of The Hibernate Backend
B. Installing The Ozone Back-End
Ozone Database Creation
Running The Ozone Database Server
Connecting to Ozone

List of Figures

3.1. Basic Architecture of TM4J
3.2. TM4J Core Interface Hierarchy
4.1. Results of Deep and Shallow Copies
4.2. Exporting an XTM File with TM4J

List of Tables

3.1. JAR File Dependencies
3.2. TM4J Interfaces and their relation to objects in the XTM data model and DTD
3.3. TopicMapProviderFactory Implemenatations in TM4J
3.4. Common TopicMapProviderFactory configuration properties
3.5. Configuration Parameters for the Hibernate TopicMapProviderFactory
3.6. Databases supported by the Hibernate Back-end
3.7. TM4J Exceptions derived from TopicMapProcessingException
3.8. TM4J Logging Categories
4.1. Containment Hierarchy of TM4J core objects
4.2. XTMWriter Configuration Properties
5.1. Properties of TM4J Objects
5.2. MultiValuePropertyChangeEvent operation types
5.3. Property Changes Notified Through The MultiValuePropertyChangeListener Interface
6.1. TM4J Basic Indexes
8.1. Properties of the TologFragmentBuilder Interface
9.1. TM4J Support For TMAPI Features
11.1. Configuration Properties Recognised by org.tm4j.topicmap.jndi.JNDIProviderFActory

List of Examples

3.1. Creating a user-specified TopicMapProvider
3.2. Creating a specific backend connection
3.3. In-Memory Topic Map Provider Configuration
3.4. Ozone Topic Map Provider Configuration
3.5. Hibernate Topic Map Provider Configuration
3.6. Creating a Topic Map
4.1. Parsing an XTM File
4.2. Shallow, Deep and TopicMap Copying
4.3. Exporting a TopicMap
4.4. Exporting a TopicMap With A Scope Filter
6.1. Using the TM4J Basic Indexes
6.2. Sample Code - Using IndexProviders
6.3. Sample Code - Creating a new IndexProvider
6.4. Using a Custom Index Provider
6.5. Example of using the Lucene FullText Index
7.1. Using The PredicatedIterator class
7.2. Using Extractors
7.3. Invoking the TopicMapDoclet from Ant
8.1. Example of using replacement values
8.2. Invoking the tolog Query Engine
8.3. Using the TologResultsSet
8.4. Using the TologFragmentBuilder
9.1. Initialising the TM4J TMAPI Implementation