Limitations Of The Unified Topic Map

When topic maps are combined in this manner, there are certain limitations on what you as a programmer will be allowed to do with them. The most major limitation is that the unified view of the topic map is read-only. Any call to a method which would normally update the topic map will cause an UnsupportedOperationException to be thrown when called on an object from a unified view. You can still modify any object from any of the topic maps in the unified view directly, by retrieving the object to be modified and calling the appropriate method on it. In the following code sample, the first call to setData() will fail, because an attempt was made to update an occurrence in the "unified" view. The code block following it shows how this limitation can be sidestepped by retrieving the actual BaseName object to be modified from the underlying topic map implementation.