Chapter 2. Change History

Table of Contents

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

Changes Since 0.8.0

Introduction

This section details the main changes made to the TM4J API between version 0.8.0 and 0.9.0.

Scope interface removed

The Scope interface which represented the collection of scoping topics applied to an occurrence, base name or association has been removed from the core API. Scope is now represented by a property whose value is a set of Topic objects. This change has been made in a non-backwards compatible manner and applications using Scope will need to be modified and recompiled.

Better Default TopicMapProvider Creation

In 0.8.x and prior versions, applications were responsible for implementing some mechanism for selecting the back-end to be used. In many applications it is desirable for the choice to be under user control. From version 0.9.0, the TopicMapProviderFactory interface has been changed to an abstract class implementing a static method newInstance. This method uses runtime configuration information to determine the back-end to be used and returns the appropriate concrete implementation of the class. For more information, please refer to the section called “Creating the TopicMapProvider”.

New abstract representation of a topic map source

From this version, a new package org.tm4j.topicmap.source has been added. The interface org.tm4j.topicmap.source.TopicMapSource represents an abstract source of topic map information which is capable of populating a TopicMap object with that information. An implementation, org.tm4j.topicmap.source.SerializedTopicMapSource allows an XTM or LTM file to be wrapped up as a TopicMapSource. See the section called “Parsing Topic Maps From File” for more information and sample code.

JNDI Service Provider

A new package, org.tm4j.topicmap.jndi provides the ability to share access to a topic map provider via JNDI. For more information, please refer to Chapter 11, Sharing Providers through JNDI.

Implicit Class-Instance Associations Removed

In previous versions of TM4J, any time you add a type to a topic, the system would automatically create a class-instance association between the two topics. This is no longer done, so although the typing topic will now be in the types property of the typed topic, there will not be an implicit class-instance association created between the two.

New XTMWriter Configuration Interface

XTMWriter is now configured through a more easily extensible interface. Instead of separate setXXX() methods for each configuration property of the XTMWriter class, there is a single method, setProperty(String, String) which takes a string property name and property value. The property names and the configuration values they accept are described in the section called “Exporting XTM Files”.

In addition, the XTMWriter now supports an additional configuration property, http://www.tm4j.org/tm4j/xtmwriter/writestubtopics, which if set to false will result in topics generated as stubs from a topicRef orsubjectIndicatorRef in a topic map and then never merged with any other topic, not being written out as topic elements.