You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(22) |
Jul
(4) |
Aug
(9) |
Sep
(6) |
Oct
(5) |
Nov
(15) |
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(4) |
Feb
(10) |
Mar
(12) |
Apr
(16) |
May
(2) |
Jun
(7) |
Jul
(10) |
Aug
(9) |
Sep
(3) |
Oct
(17) |
Nov
(17) |
Dec
(6) |
2003 |
Jan
(12) |
Feb
(15) |
Mar
(25) |
Apr
(20) |
May
(8) |
Jun
(3) |
Jul
(21) |
Aug
(10) |
Sep
(7) |
Oct
(1) |
Nov
(3) |
Dec
(6) |
2004 |
Jan
(5) |
Feb
(16) |
Mar
(34) |
Apr
(26) |
May
(20) |
Jun
(58) |
Jul
(76) |
Aug
(51) |
Sep
(40) |
Oct
(16) |
Nov
(7) |
Dec
(6) |
2005 |
Jan
(10) |
Feb
(1) |
Mar
(17) |
Apr
(8) |
May
(11) |
Jun
(15) |
Jul
(1) |
Aug
(7) |
Sep
(6) |
Oct
(10) |
Nov
(14) |
Dec
(9) |
2006 |
Jan
(11) |
Feb
(22) |
Mar
(17) |
Apr
(1) |
May
(15) |
Jun
(9) |
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2008 |
Jan
(2) |
Feb
(1) |
Mar
(8) |
Apr
(8) |
May
(12) |
Jun
(9) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Victor V. <vic...@sw...> - 2001-09-02 16:56:24
|
Hi, I have a question concerning the creation of resourceIds. Currently the resource id always starts with "http://topicmap.techquila.com/default" Only if the topic map contains a <?xml:base declaration, that url is used. My code looks like this: =================================================== location="file:data/simple-xtm.xml"; props.put("TOPIC_MAP0", location); mgr.registerProvider("com.techquila.topicmap.memory.TopicMapProviderFactoryImpl", props); TopicMap simpleTM = mgr.getTopicMap(location); Iterator topics = simpleTM.getTopics().iterator(); Topic aTopic; while ( topics.hasNext() ) { aTopic = (Topic)topics.next(); System.out.println( aTopic.getResourceID() ); } =================================================== I would expect that the resourceId would start with "file:data/simple-xtm.xml", which is the location where the topic map has been loaded from. Is this a bug? A misinterpretation? On the same line of thought: Why are there Ids AND resourceId. Both are unique. Both are always created. Bye Victor |
From: Kal A. <ka...@te...> - 2001-08-28 09:29:22
|
Hi Anil, You can try browsing your XTM file using the TM4J application called TMNav. Be warned though that this application is very experimental and is currently not very robust. You can get a compiled version of the TM4J suite from http://prdownloads.sourceforge.net/tm4j/tm4j-bin-0.5.0.tar.gz and once you have added all of the jar files in the lib directory to your CLASSPATH environment variable, you should be able to run the app with the command: java -DTOPIC_MAP0=my_topicmap.xtm com.techquila.tmnav.TMNavApp Alternatively, I would also recommend Ontopia's Navigator which has already been suggested in a previous reply to your question. Hope this helps, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of anil > Sent: 29 July 2001 16:35 > To: tm4...@li... > Subject: [TM4J-users] Browser for Running XTM file > > > Sir, > I am facing the problem of running my XTM file in a browser. I > have tried > with many browsers and falied. I came to know that you have built an > experimental browser to run an XTM file. I would be obliged if you could > give me the location or send me the information of getting it as > I am struck > at this point. > Regards, > Anil Kumar, > Software Engineer. > email : an...@re... > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Norbert H. <rue...@se...> - 2001-08-28 09:27:20
|
Hi, Kal Ahmed wrote: > Hi Norbert, > > I've had a look at your code and there is nothing wrong with that - I can > also reproduce the problem, so it looks like this is a TM4J bug. I'll have a > look at this when I get a chance (prob. not until tonight) and let you know > if I find the problem. If you would like to have a look in the source code > for yourself, my guess is that the problem is probably related to > TopicImpl.removeAssociationToType() not behaving correctly. > yes I think so, too. I just had a look in memory.TopicMapImpl and noticed that there is in addAssociation() a call to indexObject. And there exists a reverse operation unIndexObject which isn't called in removeAssociation()? Is it the missing call unIndexObject(association)? NoB |
From: Kal A. <ka...@te...> - 2001-08-28 09:04:52
|
Hi Norbert, I've had a look at your code and there is nothing wrong with that - I can also reproduce the problem, so it looks like this is a TM4J bug. I'll have a look at this when I get a chance (prob. not until tonight) and let you know if I find the problem. If you would like to have a look in the source code for yourself, my guess is that the problem is probably related to TopicImpl.removeAssociationToType() not behaving correctly. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Norbert > Hartl > Sent: 24 August 2001 19:47 > To: TM4J user list > Subject: [TM4J-users] Bug in Topic Class? > > > Hi, > > I've got a problem with the tm4j API. Maybe I misunderstood > the purpose. > > Is the setTypes() method supposed to overwrite any exisiting type > value? > > I have > > Topic A with Topics T1 as a type of Topic A > > and an Topic Array B which conatains Topics T3. > > If I call A.setTypes(B) then I should get a Topic A > with Topics T3 and T4 stored as types, right? > > But I get a Topic A with T1, T2 as Types. > > I append a short piece of testcode to make clear what > I meant. > > I would be very glad to hear if this is a tm4j problem > or if I misunderstood the whole thing. > > thanks in advance, > > Norbert > |
From: KLESSE,MARIO (HP-Germany,ex1) <mar...@hp...> - 2001-08-28 08:55:40
|
Hi Anil, if you just want to browse your XTM files, try Ontopia's Navigator, you can get an free eval license here: http://www.ontopia.net/download/freedownload.html. I think it's the best XTM browser availiable at present. Regards, Mario > -----Original Message----- > From: anil [mailto:an...@ii...] > Sent: Sonntag, 29. Juli 2001 17:35 > To: tm4...@li... > Subject: [TM4J-users] Browser for Running XTM file > > > Sir, > I am facing the problem of running my XTM file in a > browser. I have tried > with many browsers and falied. I came to know that you have built an > experimental browser to run an XTM file. I would be obliged > if you could > give me the location or send me the information of getting it > as I am struck > at this point. > Regards, > Anil Kumar, > Software Engineer. > email : an...@re... > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > |
From: anil <an...@ii...> - 2001-08-28 05:58:21
|
Sir, I am facing the problem of running my XTM file in a browser. I have tried with many browsers and falied. I came to know that you have built an experimental browser to run an XTM file. I would be obliged if you could give me the location or send me the information of getting it as I am struck at this point. Regards, Anil Kumar, Software Engineer. email : an...@re... |
From: Norbert H. <rue...@se...> - 2001-08-24 18:47:50
|
Hi, I've got a problem with the tm4j API. Maybe I misunderstood the purpose. Is the setTypes() method supposed to overwrite any exisiting type value? I have Topic A with Topics T1 as a type of Topic A and an Topic Array B which conatains Topics T3. If I call A.setTypes(B) then I should get a Topic A with Topics T3 and T4 stored as types, right? But I get a Topic A with T1, T2 as Types. I append a short piece of testcode to make clear what I meant. I would be very glad to hear if this is a tm4j problem or if I misunderstood the whole thing. thanks in advance, Norbert |
From: Kal A. <ka...@te...> - 2001-08-07 08:58:22
|
Hi Norbert, > at the moment I try to do a little topic map editing tool. > I asked myself what would be the best way to handle the > topic map data for a gui. > > My first thought was to use the topic map directly as a > model for the components. But there arise several problems: > > - except the ScopedObject I need a own model for every topic map object > - a gui editing panel should have a submit/cancel action. while every > factory method which creats topic map objects (e.g. createTopic()) > is inserting the Objects immediately into the topic map it's really > hard to cancel creation of a new topic map object. > - textfields don't have explicit models. So it's hard to display topic > map objects. (ok, this could be done using my own textfield) > > The alternative I'm trying at the moment is to read data from topic > map objects into Collections which the gui is using/modifying. > But thats a way the application faces itself with tons of nested > loops in order to get the data out of a topic map object and afterwards > back in again. > > Any suggestions? > The approach I took with TMNav's editing capabilities was to do a copy of the topic map object being edited and pass that to the editing dialog - the copied object would be created by a separate, memory-based TopicMapFactory, so creating and modifying the copy does not in any way modify the topic map which is being edited until the user chooses to commit their changes - at that point, another copy is performed to overwrite the propoerties of the topic map object being edited with the properties of the temporary object. The major weakness with this approach is that it is possible to modify a topic in such a way that when the updates are applied, the topic actually merges with one or more other topics and so the change can appear to have caused the topic to "get lost". However, I think that this could be addressed either: a) by smart GUI design that displays the merge occurring (somehow) b) by checking the changes made before they are committed to see if a merge would occur. Currently, there is no real API support for (2) but I think it would be useful if the API provided some way of indicating the set of topics that a topic would be merged with *if* it were added to a particular topic map. Hope this helps! Kal |
From: Norbert H. <rue...@se...> - 2001-08-07 08:26:30
|
Hi, at the moment I try to do a little topic map editing tool. I asked myself what would be the best way to handle the topic map data for a gui. My first thought was to use the topic map directly as a model for the components. But there arise several problems: - except the ScopedObject I need a own model for every topic map object - a gui editing panel should have a submit/cancel action. while every factory method which creats topic map objects (e.g. createTopic()) is inserting the Objects immediately into the topic map it's really hard to cancel creation of a new topic map object. - textfields don't have explicit models. So it's hard to display topic map objects. (ok, this could be done using my own textfield) The alternative I'm trying at the moment is to read data from topic map objects into Collections which the gui is using/modifying. But thats a way the application faces itself with tons of nested loops in order to get the data out of a topic map object and afterwards back in again. Any suggestions? I know the topic map is supposed to be used as a data model. This is pointed out in the docu. But don't know how. thanks in advance, NoB |
From: Kal A. <ka...@te...> - 2001-08-06 10:30:40
|
Hi, I've just completed and made available a tab-widget plug-in for Protégé which enables the use of Protégé[1] as a topic map editing tool. The plug-in's current functionality is limited in that it only currently supports the export of XTM files from an ontology developed in Protégé which is based on the "topic map ontology" distributed with the plug-in, but it is flexible enough to allow the use of slots on Protégé classes to represent topic names, occurrences or to establish associations between topics. TMTab version 0.1 is available now for free download. For more information or to download TMTab, please see the TMTab page at http://www.techquila.com/tmtab/index.html Cheers, Kal [1] http://smi.stanford.edu/projects/protege/ ----------------------------------- Kal Ahmed XML and Topic Maps Consultancy e: ka...@te... p: +44 (0)7968 529 531 w: www.techquila.com ----------------------------------- |
From: Kal A. <ka...@te...> - 2001-07-30 14:12:28
|
Hi René > for a long time I'm working with Topic Maps and since a the last > weeks I'm dealing with TM4J. I'm able to create the several > objects in memory, to write the topic map into a file and to read > files with TM4J. > But if I try to write a topic map I created, that also includes > associations, into a file, then everything is written in the > right manner except the associations. > The associations are always omitted. > > I create the association like the following: > > TopicMapFactoryImpl tmfi = new TopicMapFactoryImpl(); > Topic t = tmfi.createTopic( "associationTopic" ); > Association a = tmfi.createAssociation( "association", t ); > Member m1 = tmfi.createMember( a, "m1" ); > Member m2 = tmfi.createMember( a, "m2" ); > m1.addPlayer( tmfi.createTopic( "m1" ) ); > m2.addPlayer( tmfi.createTopic( "m2" ) ); > > > Could you tell me what I've done wrong? > Err...nothing! This looks like a bug in the TopicMapFactoryImpl.java class - when you call createTopic(), the factory both creates the Topic and also adds it to the TopicMap. When you call createAssociation(), the Association is created, but not added to the TopicMap - you need to call TopicMap.addAssociation() explicitly. I'm guessing that your code example missed out the call tmfi.createTopicMap() ? If not, then you need to call that before creating your topics and associations, then you can use the TopicMap object returned from that to add the association explicitly, so your code should be something like: TopicMapFactoryImpl tmfi = new TopicMapFactoryImpl(); TopicMap tm = tmfi.createTopicMap(); Topic t = tmfi.createTopic( "associationTopic" ); Association a = tmfi.createAssociation( "association", t ); Member m1 = tmfi.createMember( a, "m1" ); Member m2 = tmfi.createMember( a, "m2" ); m1.addPlayer( tmfi.createTopic( "m1" ) ); m2.addPlayer( tmfi.createTopic( "m2" ) ); tm.addAssociation(a); It does not matter whether you call tm.addAssociation() before or after creating the members. Hope this helps, Kal |
From: <Ren...@we...> - 2001-07-30 13:55:33
|
Hi, for a long time I'm working with Topic Maps and since a the last weeks I'm= dealing with TM4J. I'm able to create the several objects in memory, to w= rite the topic map into a file and to read files with TM4J. But if I try to write a topic map I created, that also includes associatio= ns, into a file, then everything is written in the right manner except the= associations. The associations are always omitted. I create the association like the following: TopicMapFactoryImpl tmfi =3D new TopicMapFactoryImpl(); Topic t =3D tmfi.createTopic( "associationTopic" ); Association a =3D tmfi.createAssociation( "association", t ); Member m1 =3D tmfi.createMember( a, "m1" ); Member m2 =3D tmfi.createMember( a, "m2" ); m1.addPlayer( tmfi.createTopic( "m1" ) ); m2.addPlayer( tmfi.createTopic( "m2" ) ); Could you tell me what I've done wrong=3F Ren=E9 Wiederhold =5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F= =5F=5F=5F=5F Jetzt und nur hier Ihr original PREMIERE WORLD SportPaket=20 plus 100 Euro ExtraPr=E4mie: http://premiere.web.de |
From: Kal A. <ka...@te...> - 2001-07-18 21:56:16
|
Hi Thomas, The way that the TM4J parser works means that some topics that aren't represented by <topic> element will get created in the data model held internally by TM4J. Typically, these get created when a <topic> element has a <subjectIndicatorRef> element anywhere in it other than inside a <subjectIdentity> element. These <subjectIndicatorRef> elements are references to subjects which TM4J automatically turns into topics. On the new topics being created, is there a <subjectIdentity>/<subjectInidicatorRef> element ? If so, then this is the reason. Also, TM4J creates the XTM-specified class-instance association type and class and instance role types by default - these are needed because TM4J attempts to honour the XTM requirement that <instanceOf> on a topic is actually equivalent to an association between the topic containing the <instanceOf> and the topic referenced from the <instanceOf>. I'm not sure why the name did not get updated properly (I take it that you mean that you changed the baseNameString in the <topic> element which specifies the <topicMap> element as its <subjectIndicatorRef> ?). I'll try and track that problem down and let you know what I find. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Thomas > Schwotzer > Sent: 17 July 2001 13:28 > To: tm4...@li... > Subject: [TM4J-users] problems during writing xtm files with tm4j > > > Hi, > yesterday I downloaded version 0.4.3. > > I plan to generate a VRML scenario > from a topic map. I would like > to use tm4j to read and write xtm files. > > Reading works fine. I could read a topic > map, count some topics etc. I used two > XTM files from Ontopia (opera.xtm and jill.xtm) > for testing. > > Writing was more difficult. > I simply changed the name of the topic map > and used XTMWriter and Walker for writing. > I could produce another xtm file... > > But this new copy did not contain the new > name but it contained 11 additional topics. > I run the small program several times - every > time 11 topics were added. > > My question is: Is it a known bug? > What could I have done wrong? > Are there some examples? > > Thanks in advance, thomas > > ps: Despite these problems: as far as I > can see your class lib is currently the best free > Java TM lib world wide. > -- > Thomas Schwotzer > Technische Universität Berlin > Intelligente Netze und Management verteilter Systeme > http://ivs.tu-berlin.de/~thsc > fon: +49-30-314-25102 mobile: +49-172-8719509 > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Thomas S. <th...@iv...> - 2001-07-17 12:26:49
|
Hi, yesterday I downloaded version 0.4.3. I plan to generate a VRML scenario=20 from a topic map. I would like to use tm4j to read and write xtm files. Reading works fine. I could read a topic=20 map, count some topics etc. I used two XTM files from Ontopia (opera.xtm and jill.xtm) for testing. Writing was more difficult. I simply changed the name of the topic map=20 and used XTMWriter and Walker for writing. I could produce another xtm file... But this new copy did not contain the new=20 name but it contained 11 additional topics.=20 I run the small program several times - every=20 time 11 topics were added. My question is: Is it a known bug? What could I have done wrong? Are there some examples? Thanks in advance, thomas ps: Despite these problems: as far as I=20 can see your class lib is currently the best free=20 Java TM lib world wide. --=20 Thomas Schwotzer Technische Universit=E4t Berlin Intelligente Netze und Management verteilter Systeme http://ivs.tu-berlin.de/~thsc fon: +49-30-314-25102 mobile: +49-172-8719509 |
From: Mario K. <mk...@st...> - 2001-06-25 16:54:54
|
Hi Kal, nothing is displayed at all. I tried to restart the application over and over again (with several modifications of my development environment), but that didn't fix the problem. I also tried it on another machine, but with the same result. I only thing I didn't try is to recompile the whole engine and application, but I don't believe that would help. Sometimes I also get some null pointer exceptions, like this: U:\Shares\roche\837rog01\4.3 xml\dtd development>java -DTOPIC_MAP0=U:\MAPS\conta cts.XTM com.techquila.tmnav.TMNavApp Malformed URL exception while expanding reference: phone:+61 7 5595 2266 Topic with no basename??? - ID:x1fco6kn0n-29 ... Topic with no basename??? - ID:x1fco6kn0n-7c Got 56 associations About to set frame size: 400x300 Starting brain view... Starting info view... Exception caught while running the brain java.lang.NullPointerException at com.natrificial.ui.util.s.h(Unknown Source) at com.natrificial.ui.util.s.reshape(Unknown Source) at com.natrificial.ui.core.BrainPanel.reshape(Unknown Source) at java.awt.Component.setBounds(Unknown Source) at com.natrificial.ui.util.s.setBounds(Unknown Source) at com.natrificial.ui.core.BrainPanel.setBounds(Unknown Source) at java.awt.Component.resize(Unknown Source) at java.awt.Component.setSize(Unknown Source) at java.awt.Component.resize(Unknown Source) at java.awt.Component.setSize(Unknown Source) at com.natrificial.ui.core.BrainPanel.init(Unknown Source) at com.natrificial.ui.core.BrainApp.a(Unknown Source) at com.natrificial.ui.core.BrainApp.start(Unknown Source) at com.techquila.tmnav.brain.BrainAppRunner.run(TMBrainView.java:692) at java.lang.Thread.run(Unknown Source) Got 0 themes. Got 0 themes. Views are started! Packing UI.... Exception caught while running the brain [java.lang.NullPointerException at com.natrificial.ui.util.FontManager.a(Unknown Source) at com.natrificial.ui.util.FontManager.setHeight(Unknown Source) at com.natrificial.ui.core.BrainApp.a(Unknown Source) at com.natrificial.ui.core.BrainApp.start(Unknown Source) at com.techquila.tmnav.brain.BrainAppRunner.run(TMBrainView.java:692) at java.lang.Thread.run(Unknown Source) Exception caught while running the brain] ...repeating ciao, Mario. -----Original Message----- From: Kal Ahmed [mailto:ka...@te...] Sent: Montag, 25. Juni 2001 17:53 To: tm4...@li... Subject: RE: [TM4J-users] Problem running TMNavApp Hi Mario, I have had some real problems with getting the TMNavApp application to display properly and consistently - I have found sometimes that simply restarting the application a couple of times fixes the problem (not a very comfortable way of starting the application I'm afraid). Is the problem that nothing at all is displayed or is it that the Brain panel is displayed but contains no "thoughts" ? I plan to have a serious look at all of the TMNavApp code pretty soon - and probably give it a complete rewrite, but if we can track down this problem in the meantime, that would be good. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Mario Klesse > Sent: 25 June 2001 13:17 > To: tm4...@li... > Subject: [TM4J-users] Problem running TMNavApp > > > Hi, > > I want to try out tm4j topic map engine. Especially I'm > interested in this > navigation application using the brain sdk. Unfortunately I don't > get running > this application: > > U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM > org.techquila.tmnav.TMNavA > pp > Exception in thread "main" java.lang.NoClassDefFoundError: > org/techquila/tmnav/T > MNavApp > > U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM > com.techquila.tmnav.TMNavA > pp > Topic with no basename??? - ID:x1fcnheotc-3d > Topic with no basename??? - ID:x1fcnheotc-6f > Topic with no basename??? - ID:x1fcnheotc-b4 > Topic with no basename??? - ID:x1fcnheotc-b3 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 2 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 1 > Topic with no basename??? - ID:x1fcnheotc-68 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 0 > Topic with no basename??? - ID:x1fcnheotc-66 > Topic with no basename??? - ID:x1fcnheotc-25 > Got 50 associations > About to set frame size: 400x300 > Starting brain view... > Starting info view... > Got 1 themes. > Theme: Music > Got 1 themes. > Theme: Music > Views are started! > Packing UI.... > > ...and then nothing happens. I'm using jdk1.3.1, xerces1_3_0, > tm4j0.4.3 and > brain sdk 2.10. What am I doing wrong? > > Mario. > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > _______________________________________________ Tm4j-users mailing list Tm4...@li... http://lists.sourceforge.net/lists/listinfo/tm4j-users |
From: Kal A. <ka...@te...> - 2001-06-25 15:53:39
|
Hi Mario, I have had some real problems with getting the TMNavApp application to display properly and consistently - I have found sometimes that simply restarting the application a couple of times fixes the problem (not a very comfortable way of starting the application I'm afraid). Is the problem that nothing at all is displayed or is it that the Brain panel is displayed but contains no "thoughts" ? I plan to have a serious look at all of the TMNavApp code pretty soon - and probably give it a complete rewrite, but if we can track down this problem in the meantime, that would be good. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Mario Klesse > Sent: 25 June 2001 13:17 > To: tm4...@li... > Subject: [TM4J-users] Problem running TMNavApp > > > Hi, > > I want to try out tm4j topic map engine. Especially I'm > interested in this > navigation application using the brain sdk. Unfortunately I don't > get running > this application: > > U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM > org.techquila.tmnav.TMNavA > pp > Exception in thread "main" java.lang.NoClassDefFoundError: > org/techquila/tmnav/T > MNavApp > > U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM > com.techquila.tmnav.TMNavA > pp > Topic with no basename??? - ID:x1fcnheotc-3d > Topic with no basename??? - ID:x1fcnheotc-6f > Topic with no basename??? - ID:x1fcnheotc-b4 > Topic with no basename??? - ID:x1fcnheotc-b3 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 2 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 1 > Topic with no basename??? - ID:x1fcnheotc-68 > Topic with no basename??? - > ID:http://topicmap.techquila.com/default#x1fcnhepid- > 0 > Topic with no basename??? - ID:x1fcnheotc-66 > Topic with no basename??? - ID:x1fcnheotc-25 > Got 50 associations > About to set frame size: 400x300 > Starting brain view... > Starting info view... > Got 1 themes. > Theme: Music > Got 1 themes. > Theme: Music > Views are started! > Packing UI.... > > ...and then nothing happens. I'm using jdk1.3.1, xerces1_3_0, > tm4j0.4.3 and > brain sdk 2.10. What am I doing wrong? > > Mario. > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > |
From: Mario K. <mk...@st...> - 2001-06-25 12:17:09
|
Hi, I want to try out tm4j topic map engine. Especially I'm interested in this navigation application using the brain sdk. Unfortunately I don't get running this application: U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM org.techquila.tmnav.TMNavA pp Exception in thread "main" java.lang.NoClassDefFoundError: org/techquila/tmnav/T MNavApp U:\Apps\tm4j\jars>java -DTOPIC_MAP0=U:\MAPS\MUSIC.XTM com.techquila.tmnav.TMNavA pp Topic with no basename??? - ID:x1fcnheotc-3d Topic with no basename??? - ID:x1fcnheotc-6f Topic with no basename??? - ID:x1fcnheotc-b4 Topic with no basename??? - ID:x1fcnheotc-b3 Topic with no basename??? - ID:http://topicmap.techquila.com/default#x1fcnhepid- 2 Topic with no basename??? - ID:http://topicmap.techquila.com/default#x1fcnhepid- 1 Topic with no basename??? - ID:x1fcnheotc-68 Topic with no basename??? - ID:http://topicmap.techquila.com/default#x1fcnhepid- 0 Topic with no basename??? - ID:x1fcnheotc-66 Topic with no basename??? - ID:x1fcnheotc-25 Got 50 associations About to set frame size: 400x300 Starting brain view... Starting info view... Got 1 themes. Theme: Music Got 1 themes. Theme: Music Views are started! Packing UI.... ...and then nothing happens. I'm using jdk1.3.1, xerces1_3_0, tm4j0.4.3 and brain sdk 2.10. What am I doing wrong? Mario. |
From: Kal A. <ka...@te...> - 2001-06-19 16:25:15
|
Hi Rich, > > You're right in that it's merging. :) I'm not sure why, though... > Tracked it down - the subjectIndicatorRef was the culprit after all! When the XTMBuilder sees the subjectIndicatorRef, it tries to locate a topic with that subject indicator and creates it if it doesn't exist - the upshot is that your topic then gets merged with that dummy topic that was created. The fix to this is in XTMBuilder.java, line 294(ish). change: case REFTYPE_SUBJECTINDICATOR: refTopic = getTopicBySubjectIndicator(expandedRef); break; to case REFTYPE_SUBJECTINDICATOR: if (purpose != SUBJECTIDENTITY) { refTopic = getTopicBySubjectIndicator(expandedRef); } break; I'm currently away from my Linux machine and can't seem to check this change in from my (Windoze) laptop (grrr....), but hopefully this should fix your problem. Cheers, Kal > This is the entire TM: > > <?xml version="1.0" encoding="utf-8" standalone="yes" ?> > <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="http://ideabank.csir.co.za/test2.xml"> > > <topic id="kim"> > <baseName> > <baseNameString>Kim</baseNameString> > </baseName> > > <instanceOf> > <topicRef > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > </instanceOf> > <subjectIdentity> > <subjectIndicatorRef > xlink:href="http://ideabank.csir.co.za/data#role"/> > </subjectIdentity> > </topic> > </topicMap> > > And I'm loading it by itself. The subjectIdentityRef is a red herring > (sorry :), I only used that as an example. > > But that still helps a lot so far, thanks :) > Rich > > > -----Original Message----- > > From: tm4...@li... > > [mailto:tm4...@li...]On Behalf Of Kal Ahmed > > Sent: 19 June 2001 04:40 > > To: tm4...@li... > > Subject: RE: [TM4J-users] loading problem > > > > > > Hi Rich, > > > > I think that it is possible that the topic is getting merged with > > some other > > topic. In your example, you have > > > > <topic id="kim"> > > <baseName> > > <baseNameString>Kim</baseNameString> > > </baseName> > > > > <instanceOf> > > <topicRef > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > </instanceOf> > > <subjectIdentity> > > <subjectIndicatorRef > > xlink:href="http://ideabank.csir.co.za/data#role"/> > > </subjectIdentity> > > </topic> > > > > This would get merged with any topic which has the same > > subjectIndicatorRef - I am just guessing from the URL of the > > subjectIndicatorRef, that it is not meant to be unique to Kim. > > > > The TopicMap.getTopics() returns all of the base topics - any > > merged topics > > are not included in the returned collection. Perhaps there should be a > > TopicMap.getAllTopics() function that includes the merged > topics in there. > > As a test, when you iterate through the collection, also call > > Topic.getMergedTopics() and iterate through that - my hunch is > that Kim is > > lurking in there somewhere :-) > > > > Cheers, > > > > Kal > > > > > -----Original Message----- > > > From: tm4...@li... > > > [mailto:tm4...@li...]On Behalf Of Richard > > > Watson > > > Sent: 19 June 2001 15:24 > > > To: TM4J Users > > > Subject: [TM4J-users] loading problem > > > > > > > > > Hi all, > > > > > > Got an interesting one. Java code that produces a strange result > > > as soon as > > > a subjectIdentity is added to a topic. > > > > > > Java code: > > > > > > (obviously uses some of my own stuff, but you'll get the idea) > > > > > > // largely irrelevant but just so you know :) > > > PersistenceManager p = PersistenceManager.getPersistenceManager(); > > > String strObject = "http://ideabank.csir.co.za/test2.xml#kim"; > > > TopicMap tm = p.getTopicMapForURL(new URL(strObject)); > > > > > > // here's the interesting bit > > > Topic o = (Topic)tm.getObjectByResourceID(strObject); > > > System.out.println("object " + o); > > > System.out.println("contains object: " + tm.getTopics().contains(o)); > > > > > > which produces output: > > > object com.techquila.topicmap.TopicImpl@d3147aed > > > contains object: false > > > > > > from this xml: > > > > > > <topic id="kim"> > > > <baseName> > > > <baseNameString>Kim</baseNameString> > > > </baseName> > > > > > > <instanceOf> > > > <topicRef > > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > > </instanceOf> > > > <subjectIdentity> > > > <subjectIndicatorRef > > > xlink:href="http://ideabank.csir.co.za/data#role"/> > > > </subjectIdentity> > > > </topic> > > > > > > and this output: > > > > > > object com.techquila.topicmap.TopicImpl@e79ef0b9 > > > contains object: true > > > > > > <topic id="kim"> > > > <baseName> > > > <baseNameString>Kim</baseNameString> > > > </baseName> > > > > > > <instanceOf> > > > <topicRef > > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > > </instanceOf> > > > </topic> > > > > > > I've round-tripped it as best I could, and it spits out: > > > > > > <topic> > > > <instanceOf> > > > <topicRef > > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > > </instanceOf> > > > <subjectIdentity> > > > <subjectIndicatorRef > > > xlink:href="http://ideabank.csir.co.za/data#role"/> > > > </subjectIdentity> > > > <baseName> > > > <baseNameString>Kim</baseNameString> > > > </baseName> > > > </topic> > > > > > > (observe the removed topic id) > > > This works fine for the first version (i.e. keeps the id). > > > > > > Also, while iterating through the topics, I find no resourceid > > for "kim". > > > But if I print out the o.resourceID above, I get the right one. > > > > > > So: iterating through the topics _does_ find a topic with the right > > > information but the wrong resourceID, and using > > tm.getObjectByResourceID() > > > finds a topic with the right resourceid. > > > > > > Cheers, > > > Rich the bug hunter :) > > > > > > > > > _______________________________________________ > > > Tm4j-users mailing list > > > Tm4...@li... > > > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > > > > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Richard W. <rw...@cs...> - 2001-06-19 15:05:02
|
Hi Kal, You're right in that it's merging. :) I'm not sure why, though... This is the entire TM: <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink" xml:base="http://ideabank.csir.co.za/test2.xml"> <topic id="kim"> <baseName> <baseNameString>Kim</baseNameString> </baseName> <instanceOf> <topicRef xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="http://ideabank.csir.co.za/data#role"/> </subjectIdentity> </topic> </topicMap> And I'm loading it by itself. The subjectIdentityRef is a red herring (sorry :), I only used that as an example. But that still helps a lot so far, thanks :) Rich > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Kal Ahmed > Sent: 19 June 2001 04:40 > To: tm4...@li... > Subject: RE: [TM4J-users] loading problem > > > Hi Rich, > > I think that it is possible that the topic is getting merged with > some other > topic. In your example, you have > > <topic id="kim"> > <baseName> > <baseNameString>Kim</baseNameString> > </baseName> > > <instanceOf> > <topicRef > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > </instanceOf> > <subjectIdentity> > <subjectIndicatorRef > xlink:href="http://ideabank.csir.co.za/data#role"/> > </subjectIdentity> > </topic> > > This would get merged with any topic which has the same > subjectIndicatorRef - I am just guessing from the URL of the > subjectIndicatorRef, that it is not meant to be unique to Kim. > > The TopicMap.getTopics() returns all of the base topics - any > merged topics > are not included in the returned collection. Perhaps there should be a > TopicMap.getAllTopics() function that includes the merged topics in there. > As a test, when you iterate through the collection, also call > Topic.getMergedTopics() and iterate through that - my hunch is that Kim is > lurking in there somewhere :-) > > Cheers, > > Kal > > > -----Original Message----- > > From: tm4...@li... > > [mailto:tm4...@li...]On Behalf Of Richard > > Watson > > Sent: 19 June 2001 15:24 > > To: TM4J Users > > Subject: [TM4J-users] loading problem > > > > > > Hi all, > > > > Got an interesting one. Java code that produces a strange result > > as soon as > > a subjectIdentity is added to a topic. > > > > Java code: > > > > (obviously uses some of my own stuff, but you'll get the idea) > > > > // largely irrelevant but just so you know :) > > PersistenceManager p = PersistenceManager.getPersistenceManager(); > > String strObject = "http://ideabank.csir.co.za/test2.xml#kim"; > > TopicMap tm = p.getTopicMapForURL(new URL(strObject)); > > > > // here's the interesting bit > > Topic o = (Topic)tm.getObjectByResourceID(strObject); > > System.out.println("object " + o); > > System.out.println("contains object: " + tm.getTopics().contains(o)); > > > > which produces output: > > object com.techquila.topicmap.TopicImpl@d3147aed > > contains object: false > > > > from this xml: > > > > <topic id="kim"> > > <baseName> > > <baseNameString>Kim</baseNameString> > > </baseName> > > > > <instanceOf> > > <topicRef > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > </instanceOf> > > <subjectIdentity> > > <subjectIndicatorRef > > xlink:href="http://ideabank.csir.co.za/data#role"/> > > </subjectIdentity> > > </topic> > > > > and this output: > > > > object com.techquila.topicmap.TopicImpl@e79ef0b9 > > contains object: true > > > > <topic id="kim"> > > <baseName> > > <baseNameString>Kim</baseNameString> > > </baseName> > > > > <instanceOf> > > <topicRef > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > </instanceOf> > > </topic> > > > > I've round-tripped it as best I could, and it spits out: > > > > <topic> > > <instanceOf> > > <topicRef > > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > > </instanceOf> > > <subjectIdentity> > > <subjectIndicatorRef > > xlink:href="http://ideabank.csir.co.za/data#role"/> > > </subjectIdentity> > > <baseName> > > <baseNameString>Kim</baseNameString> > > </baseName> > > </topic> > > > > (observe the removed topic id) > > This works fine for the first version (i.e. keeps the id). > > > > Also, while iterating through the topics, I find no resourceid > for "kim". > > But if I print out the o.resourceID above, I get the right one. > > > > So: iterating through the topics _does_ find a topic with the right > > information but the wrong resourceID, and using > tm.getObjectByResourceID() > > finds a topic with the right resourceid. > > > > Cheers, > > Rich the bug hunter :) > > > > > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > |
From: Kal A. <ka...@te...> - 2001-06-19 14:40:16
|
Hi Rich, I think that it is possible that the topic is getting merged with some other topic. In your example, you have <topic id="kim"> <baseName> <baseNameString>Kim</baseNameString> </baseName> <instanceOf> <topicRef xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="http://ideabank.csir.co.za/data#role"/> </subjectIdentity> </topic> This would get merged with any topic which has the same subjectIndicatorRef - I am just guessing from the URL of the subjectIndicatorRef, that it is not meant to be unique to Kim. The TopicMap.getTopics() returns all of the base topics - any merged topics are not included in the returned collection. Perhaps there should be a TopicMap.getAllTopics() function that includes the merged topics in there. As a test, when you iterate through the collection, also call Topic.getMergedTopics() and iterate through that - my hunch is that Kim is lurking in there somewhere :-) Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Richard > Watson > Sent: 19 June 2001 15:24 > To: TM4J Users > Subject: [TM4J-users] loading problem > > > Hi all, > > Got an interesting one. Java code that produces a strange result > as soon as > a subjectIdentity is added to a topic. > > Java code: > > (obviously uses some of my own stuff, but you'll get the idea) > > // largely irrelevant but just so you know :) > PersistenceManager p = PersistenceManager.getPersistenceManager(); > String strObject = "http://ideabank.csir.co.za/test2.xml#kim"; > TopicMap tm = p.getTopicMapForURL(new URL(strObject)); > > // here's the interesting bit > Topic o = (Topic)tm.getObjectByResourceID(strObject); > System.out.println("object " + o); > System.out.println("contains object: " + tm.getTopics().contains(o)); > > which produces output: > object com.techquila.topicmap.TopicImpl@d3147aed > contains object: false > > from this xml: > > <topic id="kim"> > <baseName> > <baseNameString>Kim</baseNameString> > </baseName> > > <instanceOf> > <topicRef > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > </instanceOf> > <subjectIdentity> > <subjectIndicatorRef > xlink:href="http://ideabank.csir.co.za/data#role"/> > </subjectIdentity> > </topic> > > and this output: > > object com.techquila.topicmap.TopicImpl@e79ef0b9 > contains object: true > > <topic id="kim"> > <baseName> > <baseNameString>Kim</baseNameString> > </baseName> > > <instanceOf> > <topicRef > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > </instanceOf> > </topic> > > I've round-tripped it as best I could, and it spits out: > > <topic> > <instanceOf> > <topicRef > xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> > </instanceOf> > <subjectIdentity> > <subjectIndicatorRef > xlink:href="http://ideabank.csir.co.za/data#role"/> > </subjectIdentity> > <baseName> > <baseNameString>Kim</baseNameString> > </baseName> > </topic> > > (observe the removed topic id) > This works fine for the first version (i.e. keeps the id). > > Also, while iterating through the topics, I find no resourceid for "kim". > But if I print out the o.resourceID above, I get the right one. > > So: iterating through the topics _does_ find a topic with the right > information but the wrong resourceID, and using tm.getObjectByResourceID() > finds a topic with the right resourceid. > > Cheers, > Rich the bug hunter :) > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > |
From: Richard W. <rw...@cs...> - 2001-06-19 14:24:31
|
Hi all, Got an interesting one. Java code that produces a strange result as soon as a subjectIdentity is added to a topic. Java code: (obviously uses some of my own stuff, but you'll get the idea) // largely irrelevant but just so you know :) PersistenceManager p = PersistenceManager.getPersistenceManager(); String strObject = "http://ideabank.csir.co.za/test2.xml#kim"; TopicMap tm = p.getTopicMapForURL(new URL(strObject)); // here's the interesting bit Topic o = (Topic)tm.getObjectByResourceID(strObject); System.out.println("object " + o); System.out.println("contains object: " + tm.getTopics().contains(o)); which produces output: object com.techquila.topicmap.TopicImpl@d3147aed contains object: false from this xml: <topic id="kim"> <baseName> <baseNameString>Kim</baseNameString> </baseName> <instanceOf> <topicRef xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="http://ideabank.csir.co.za/data#role"/> </subjectIdentity> </topic> and this output: object com.techquila.topicmap.TopicImpl@e79ef0b9 contains object: true <topic id="kim"> <baseName> <baseNameString>Kim</baseNameString> </baseName> <instanceOf> <topicRef xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> </instanceOf> </topic> I've round-tripped it as best I could, and it spits out: <topic> <instanceOf> <topicRef xlink:href="http://ideabank.csir.co.za/ib.defs.xml#person"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="http://ideabank.csir.co.za/data#role"/> </subjectIdentity> <baseName> <baseNameString>Kim</baseNameString> </baseName> </topic> (observe the removed topic id) This works fine for the first version (i.e. keeps the id). Also, while iterating through the topics, I find no resourceid for "kim". But if I print out the o.resourceID above, I get the right one. So: iterating through the topics _does_ find a topic with the right information but the wrong resourceID, and using tm.getObjectByResourceID() finds a topic with the right resourceid. Cheers, Rich the bug hunter :) |
From: Kal A. <ka...@te...> - 2001-06-19 07:37:06
|
I haven't used TM4J for a lot of editing and round-tripping topic map files since the 0.4 release (which was when I added the resourceID concept and the rest of the plumbing which supports dynamic topic merging). The most tricky thing was preservation of IDs - and my solution was to not make it an issue :) - in many ways, the ID assigned to a topic or an association should not matter, as long as the references are not broken, though of course if some one has made nice, human-readable IDs for all of their topics it is a bit of a shame that TM4J currently loses them all in a round-trip. If the topic map is never merged with another map, then it should be possible to preserve IDs - it is really just a matter of adding the appropriate options to the XTMBuilder and XTMWriter classes. Perhaps that is something which needs to be pushed up the priority list. If you notice any referential integrity problems after round-tripping the file, then thats a bug - please let me know of any difficulties like this that you encounter. I had noticed in the past that merging topicmaps occasionally generated a bunch of topics with no names, occurrences or types...and I think that may have been related to the loading sequence problem. Once again, thanks very much for the helpful bug reports - each of these bugs has been added as a test into the, currently very small, test suite so hopefully they should get picked up if a future change causes a regression. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Richard > Watson > Sent: 18 June 2001 18:45 > To: tm4...@li... > Subject: [TM4J-users] round-tripping > > > Excellent, thanks Kal. :) > > Have you used TM4J much to write out topicmaps? I've been attempting to > round-trip TM's, with a few difficulties. Anything I should particularly > watch out for? > > Cheers, > Rich > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Richard W. <rw...@cs...> - 2001-06-18 17:44:03
|
Excellent, thanks Kal. :) Have you used TM4J much to write out topicmaps? I've been attempting to round-trip TM's, with a few difficulties. Anything I should particularly watch out for? Cheers, Rich |
From: Kal A. <ka...@te...> - 2001-06-18 15:56:06
|
Hi Rich, Thanks for the samples and the code - it turned out that your problem arises when you use the same XTMBuilder object for the two separate loads, which my original test code wasn't doing. Anyway, I've fixed the problem now so the version of XTMBuilder.java in CVS now should hopefully solve this particular problem. Cheers, Kal > -----Original Message----- > From: tm4...@li... > [mailto:tm4...@li...]On Behalf Of Richard > Watson > Sent: 17 June 2001 12:55 > To: tm4...@li... > Subject: RE: [TM4J-users] sequence of loading two files > > > Hey, > > Ok, here's an attempt. (lots of code follows :) > > Have a method: > > (1) > > protected TopicMap getTopicMap(String[] files) > { > XTMBuilder builder = new XTMBuilder(new TopicMapFactoryImpl()); > XTMParser tmParser = new XTMParser(builder); > SAXParser parser = new SAXParser(); > parser.setContentHandler(tmParser); > > try > { > for (int nFile = 0; nFile < files.length; nFile++) > { > FileInputStream in = new FileInputStream(files[nFile]); > InputSource src = new InputSource(in); > parser.parse(src); > } > > return builder.getTopicMap(); > } > catch (Exception ex) { ex.printStackTrace(); } > > return null; > } > ----------------------------------------------- > Called with: > > (2) > > String[] files = { getObjectFileString("B.xml"), > getObjectFileString("A.xml") }; > TopicMap tm = tmm.getTopicMap(files); > ----------------------------------------------- > XTM Files: > > A.xml: > > (3) > > <?xml version="1.0" encoding="utf-8" standalone="yes" ?> > <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="http://ideabank.csir.co.za/A.xml"> > <topic id="m"> > <baseName> > <baseNameString>M</baseNameString> > </baseName> > </topic> > <topic id="n"> > <baseName> > <baseNameString>N</baseNameString> > </baseName> > </topic> > > <association id="m-n"> > <member> > <topicRef xlink:href="#m"/> > </member> > <member> > <topicRef xlink:href="#n"/> > </member> > </association> > > </topicMap> > ------------------------------------------------- > And B.xml > > (4) > > <?xml version="1.0" encoding="utf-8" standalone="yes" ?> > <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="http://ideabank.csir.co.za/B.xml"> > > <topic id="test"> > <baseName> > <baseNameString>Test</baseNameString> > </baseName> > </topic> > > </topicMap> > > ----------------------------------------------------- > If I use the above and print out the topic map, I get: > > (5) > > <?xml version="1.0" encoding="UTF-8"?> > <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="http://ideabank.csir.co.za/B.xml"> > <topic id="http://ideabank.csir.co.za/x1fbp0t5fb-a"/> > <topic id="http://ideabank.csir.co.za/x1fbp0t5fb-4"> > <baseName id="http://ideabank.csir.co.za/x1fbp0t5fb-5"> > <baseNameString>N</baseNameString> > </baseName> > </topic> > <topic id="http://ideabank.csir.co.za/x1fbp0t5fb-2"> > <baseName id="http://ideabank.csir.co.za/x1fbp0t5fb-3"> > <baseNameString>M</baseNameString> > </baseName> > </topic> > <topic id="http://ideabank.csir.co.za/x1fbp0t5fb-0"> > <baseName id="http://ideabank.csir.co.za/x1fbp0t5fb-1"> > <baseNameString>Test</baseNameString> > </baseName> > </topic> > <topic id="http://ideabank.csir.co.za/x1fbp0t5fb-8"/> > <association id="http://ideabank.csir.co.za/x1fbp0t5fb-6"> > <member id="http://ideabank.csir.co.za/x1fbp0t5fb-7"> > <topicRef > xlink:href="http://ideabank.csir.co.za/x1fbp0t5fb-8"/> > </member> > <member id="http://ideabank.csir.co.za/x1fbp0t5fb-9"> > <topicRef > xlink:href="http://ideabank.csir.co.za/x1fbp0t5fb-a"/> > </member> > </association> > </topicMap> > > (which has an 2 extra topics, it seems for the association's topicRefs) > ----------------------------------------- > Whereas if I either: > > Load A first, using: > > (6) > > String[] files = { getObjectFileString("A.xml"), > getObjectFileString("B.xml") }; > (instead of > String[] files = { getObjectFileString("B.xml"), > getObjectFileString("A.xml") }; > in (2) above) > ------------------------------ > OR > > Change the association in (3) to read: > > (7) > > <association id="m-n"> > <member> > <topicRef xlink:href="A.xml#m"/> > </member> > <member> > <topicRef xlink:href="A.xml#n"/> > </member> > </association> > > (putting in the "A.xml" bit) > ---------------------------------- > I then get as output > > (8) > > <?xml version="1.0" encoding="UTF-8"?> > <topicMap xmlns="http://www.topicmaps.org/xtm/1.0/" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:base="http://ideabank.csir.co.za/B.xml"> > <topic id="http://ideabank.csir.co.za/x1fbp1bc1g-0"> > <baseName id="http://ideabank.csir.co.za/x1fbp1bc1g-1"> > <baseNameString>Test</baseNameString> > </baseName> > </topic> > <topic id="http://ideabank.csir.co.za/x1fbp1bc1g-4"> > <baseName id="http://ideabank.csir.co.za/x1fbp1bc1g-5"> > <baseNameString>N</baseNameString> > </baseName> > </topic> > <topic id="http://ideabank.csir.co.za/x1fbp1bc1g-2"> > <baseName id="http://ideabank.csir.co.za/x1fbp1bc1g-3"> > <baseNameString>M</baseNameString> > </baseName> > </topic> > <association id="http://ideabank.csir.co.za/x1fbp1bc1g-6"> > <member id="http://ideabank.csir.co.za/x1fbp1bc1g-7"> > <topicRef > xlink:href="http://ideabank.csir.co.za/x1fbp1bc1g-2"/> > </member> > <member id="http://ideabank.csir.co.za/x1fbp1bc1g-8"> > <topicRef > xlink:href="http://ideabank.csir.co.za/x1fbp1bc1g-4"/> > </member> > </association> > </topicMap> > ------------------------------------------- > > All of which tells me that the initial case (which produces (5)) > creates two > dummy topics for the association (and does not link to the > existing "m" and > "n") IF you load B first. > > If you either load A first, OR you specify the "A.xml#m" bit in the > association, then it works fine. > > I've cut out any fiddling code in my app, so I'm pretty sure I'm not doing > anything weird. I'm also using TM4J code I got on Friday off SF. > > Hope this helps! (and is reproducible) > Rich > > > > -----Original Message----- > > From: tm4...@li... > > [mailto:tm4...@li...]On Behalf Of Kal Ahmed > > Sent: 15 June 2001 10:33 > > To: tm4...@li... > > Subject: RE: [TM4J-users] sequence of loading two files > > > > > > Hi Rich, > > > > I've had a look into this and not quite figured out whats going > wrong. If > > both topic maps have an xml:base attribute specified, the > XTMBuilder seems > > to do the right thing and put the fragment identifiers on the xml:base > > attribute value. If the topic maps do not have an xml:base > attribute, then > > the fragment identifiers get added to a default base URL > > (http://topicmap.techquila.com/default). > > > > Perhaps I am missing something obvious here - do you have a > sample of the > > topic maps which cause this problem that I can have a look at ? > > > > Cheers, > > > > Kal > > > > > -----Original Message----- > > > From: tm4...@li... > > > [mailto:tm4...@li...]On Behalf Of Richard > > > Watson > > > Sent: 14 June 2001 21:58 > > > To: TM4J Users > > > Subject: [TM4J-users] sequence of loading two files > > > > > > > > > Hi all, > > > > > > I'm getting a bit better at this stuff and things are working > nicely. :) > > > > > > I've found something that looks a bit suspicious: > > > > > > File "A.xml" and file "B.xml" > > > File A.xml has an association between #n and #m, both in A.xml. > > > Both files have correct bases set. > > > I load both into the same TopicMap using the XTMBuilder. > > > > > > Now...two cases: > > > If I load A.xml into the builder and then B.xml, the > > association will load > > > fine. > > > > > > If I load B first, then the topicRefs in the association must > > be "A.xml#n" > > > and "A.xml#m", or they end up with resourcerefs "B.xml#n" and > "B.xml#m". > > > > > > This a bug? > > > > > > Non-codey question of the day: where are you guys geographically? > > > > > > Cheers, > > > Rich > > > > > > > > > _______________________________________________ > > > Tm4j-users mailing list > > > Tm4...@li... > > > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > > > > > > > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > http://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Gerd M. <ge...@sm...> - 2001-06-17 12:29:05
|
On Thu, 14 Jun 2001 22:57:53 +0200 "Richard Watson" <rw...@cs...> wrote: > Hi all, > > I'm getting a bit better at this stuff and things are working nicely. :) > > I've found something that looks a bit suspicious: > > File "A.xml" and file "B.xml" > File A.xml has an association between #n and #m, both in A.xml. > Both files have correct bases set. > I load both into the same TopicMap using the XTMBuilder. > > Now...two cases: > If I load A.xml into the builder and then B.xml, the association will load > fine. > > If I load B first, then the topicRefs in the association must be "A.xml#n" > and "A.xml#m", or they end up with resourcerefs "B.xml#n" and "B.xml#m". > > This a bug? > > Non-codey question of the day: where are you guys geographically? Leipzig, Germany Best Regards, Gerd -- ________________________________________________________________ Gerd Mueller ge...@sm... SMB GmbH http://www.smb-tec.com |