From: Gerd M. <ge...@sm...> - 2001-06-27 08:05:48
|
On Wed, 27 Jun 2001 09:01:37 +0100 "Kal Ahmed" <ka...@te...> wrote: > > > > > But, what about an occurrence that happens to be stored in your local > > > persistent store? How do you reference it? Particularly, how do you > > > reference it such that others could, at a minimum, write and > > ask you for a > > > copy--given that you might have published the topic map on the > > web or sent > > > it off for merging elsewhere. > > > > > > All TopicMapObjects stored in a given persistent topic map have > > an object ID > > > assigned to them. So the URI for any TopicMapObject in the > > persistent store > > > would be the baseURL of the TopicMap with the object ID appended as a > > > fragment identifier. TopicMapObjects also have their sourceURL > > stored with > > > them (this is really to maintain the provenance of a topic map > > object and is > > > not intended to be a means of locating it). An application wishing to > > > resolve a URI to a topic map object would have to first split > > the URI into > > > the document part and the fragment identifier part, then look in the > > > TopicMapManager for the topic map with that ID. > > > > The ID should not be the object ID in the persistent store, since > > those IDs are normally hidden to the application layer, in our case the > > topicmap implementation. Also the validity of a topicmap object > > reference would depend on the database that contains it. So, if a > > topicmap provider changes the database, all references to it become > > invalid. We should better use the ID provided by TopicMapObject.getID() > > or the resourceID (or is this what you mean with persistent object ID ?). > > We could also use some kind of XPointer notation to point into another > > TopicMap. > > > > My feeling is that the ID returned by TopicMapObject.getID() would be the > best choice. TopicMapObject.getResourceID() is meant to return the "source" > ID of the topic map object. If a TopicMap is created by merging two or more > different sources, you will have resourceIDs which specify different URLs > all mixed up within the same TopicMap - this is useful if your goal is to > determine which objects came from where, but useless if you want some > consistent form of addressing - hence the get/setID() function on > TopicMapObject. +1 -- ________________________________________________________________ Gerd Mueller ge...@sm... SMB GmbH http://www.smb-tec.com |