From: Kal A. <ka...@te...> - 2001-06-12 16:44:52
|
Hi Rich, > > Nope, it was a bug. Thanks for the report. > > No problem, great to get such speedy replies. > > I need to sort out the external-xlinked files trick referred to > in my first > mail. Could you point me at the best place to do it and I'll have a go at > stitching it myself? I'll send you the code rather than do the CVS thing > right now. If it's being done already, I'll happily wait. :) > I think that should now be fixed in CVS. The fix was to make the dummy topic get the URI of the referenced topic as its resourceID property. Now, what I haven't checked is if the engine then correctly merges the dummy topic with the real thing when it is encountered - is that the problem you are having, or is there something else that I'm missing ? > My application design needs: > a) One file with definitions of various topic types such as idea > and person. > b) One file with a basic structure that all people share, and refers to > topic in a). > c) A file per person who wants to design their own structures. They might > refer to topics in a) and later to each other. > > I could fiddle the design but I quite like it. :) Looks good to me! I would suggest that you create Published Subject Identifiers for the topics types declared in (a) - that way it is possible to create a reference like this: <topic> <instanceOf><subjectIndicatorRef xlink:href="http://psi.csir.com/mindmap/idea"></instanceOf> <baseName><baseNameString>My Cool Idea</baseNameString></baseName> </topic> Note that the URI does not have to resolve to another topic, but when a topic such as: <topic> <subjectIdentity><subjectIndicatorRef xlink:href="http://psi.csir.com/mindmap/idea"></subjectIdentity> <baseName><baseNameString>Idea</baseNameString></baseName> </topic> is found in a topic map, then the dummy topic created for the type of the first topic should get merged with the second topic. As I type this, I start to feel less and less sure that TM4J actually *does* this...if it doesn't, the code at fault will be in XTMBuilder.java - when processing a reference which is found to be a subjectIndicatorRef, it should: a) See if it already has a topic with that subject indicator - if so, use that for the type and we are done b) Create a dummy topic, assign it an object ID (assignID() should generate something unique) and **then add the subjectIndicatorRef reference as a subject indicator of the dummy topic**. Its that bit between the ** which I have a suspicion might be missing - I'm not able to take a look at this till tomorrow now, but if this is a problem and you find and make the change, I would be happy to receive it in email. Cheers, Kal > (feel free to suggest alternatives, but this looks pretty scaleable and > quite compatible with the general web-vibe) Yes, absolutely, and workable in a peer-to-peer architecture too. Cheers, Kal |