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: Lars H. <he...@se...> - 2005-03-14 13:32:50
|
Hi, Some more comments / ideas to previous written comments. :) [...] > Regarding the question if we (TMAPI.org) plan to support factory > methods with an additional id argument: No, not planned. And I think this will never happen, because there is no equivalent in the TMDM. The TMDM deals only with source locators, there are no ids. Regarding your object by id lookup method you may want to write a helper class that accepts a String that will be resolved against the base locator and returns a TopicMapObject or null. I.e.: public TopicMapObject getObjectByNiceId(String niceId) { // _tmoIdx is an instance of the TopicMapObjectsIndex // _baseLocator is a locator instance that is equal to the // topic map base locator return _tmoIdx.getTopicMapObjectBySourceLocator( _baseLocator.resolveRelative("#"+niceId)); } Best regards, Lars |
From: Lars H. <he...@se...> - 2005-03-14 13:14:51
|
Hi, Stefan's path goes in the right direction, just an additional comment. > Just call TopicMapObject.addSourceLocator(baselocator+"#"+id) Should be: Locator sourceLoc = tm.getBaseLocator().resolveRelative("#" + myId); tmObject.addSourceLocator(sourceLoc); Now you can fetch the TopicMapObject via the Locator myLoc = tm.getBaseLocator().resolveRelative("#" + myId); TopicMapObjectsIndex.getTopicMapObjectBySourceLocator(myLoc); If you want to look up objects by their id you may remember them via a HashMap for example. Map map = new HashMap(); map.put("written-by", assoc.getObjectId()); [...] Association written_by = tm.getObjectById(map.get("written-by")); Regarding the question if we (TMAPI.org) plan to support factory methods with an additional id argument: No, not planned. > When it comes to serialisation the xtm serialiser will check if the > sourcelocator starts with the baselocator address. If thats the case, > your id is used. This behavior may be given, but is not something TMAPI or a standard forces. Beside that a TopicMapObject may have more than one source locator that starts with the base locator reference. The concrete id may be choosen randomly from that set of source locators. Best regards, Lars |
From: Stefan L. <li...@no...> - 2005-03-14 11:51:55
|
Hi Richard, There is a simple trick to assign the XML' ids that works for also for tinytim and xtm4xmldb Just call TopicMapObject.addSourceLocator(baselocator+"#"+id) When it comes to serialisation the xtm serialiser will check if the sourcelocator starts with the baselocator address. If thats the case, your id is used. hope that helps Richard Gregory wrote: >Hi Kal, > >I don't know whether this is the right place for the question, or i I should be aiming it at the >TMAPI list, so if you think I should post the question over on the TMAPI list let me know. > >I'm starting to look at TMAPI, and trying to rework some of my TM4J programs using the TM4J TMAPI >implementation.One thing I use quite a lot with TM4J is assigning topic and and assoication ID's >with the createTopic(java.lang.String id)/createAssociation(java.lang.String id) methods, and the >getObjectByID() method. Is there anything like this in TMAPI (I couldn't find anything in the >TMAPI docs), or do you know of any plans to implement anything like this in TMAPI? > >Cheers, > >Richard. > > > >Send instant messages to your online friends http://uk.messenger.yahoo.com > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Tm4j-users mailing list >Tm4...@li... >https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > -- My place : http://user.cs.tu-berlin.de/~lischke |
From: Richard G. <ric...@ya...> - 2005-03-14 10:51:04
|
Hi Kal, I don't know whether this is the right place for the question, or i I should be aiming it at the TMAPI list, so if you think I should post the question over on the TMAPI list let me know. I'm starting to look at TMAPI, and trying to rework some of my TM4J programs using the TM4J TMAPI implementation.One thing I use quite a lot with TM4J is assigning topic and and assoication ID's with the createTopic(java.lang.String id)/createAssociation(java.lang.String id) methods, and the getObjectByID() method. Is there anything like this in TMAPI (I couldn't find anything in the TMAPI docs), or do you know of any plans to implement anything like this in TMAPI? Cheers, Richard. Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: Christoph F. <cf...@fo...> - 2005-03-11 07:40:33
|
Hi Wang I would say it's a bug. There is some functionality that tries to assert that no more nodes are drawn than a user could actually distinguish and navigate but a. it does not work as expected b. there is no real strategy how to deal with the case, that a node has more relations that could actually be drawn. If you want to investigate by yourself, you find the code block in charge beginning at line 160 of org.tm4j.tmnav.renderer.tg. TMOTouchgraphNode. Otherwise you can enter a bug report. This would assert that I don't miss the bug, when I will be able to work on tmnav again. Unfortunately this won't be before mid of june. Hope that helps a bit c Am Mittwoch, den 09.03.2005, 14:00 -0500 schrieb Wang, Dandan: > Hi all, > I am using tmnav-0.2.8_1 and I found a problem but not quite sure > if it is a bug , need your help. > > After I load a xtm file, in the "Indexes" frame , I choose > "Occurrence Types" and I got a topic named "definition", when click > this topic, see in the Tree-View frame, topic "definition" with more > than 20 occurrence instances are listed( tree structure). > > At this time, when you view Grahp-View frame ( have > to choose Touchgraph Renderer), it shows only the centernode > "definition" and a Dummy-node, between these two nodes is an arc with > labeled "instances". > > My question is Why all those more than 20 occurrence instances are not > showed here? they should be connnected with this dummy- node, > becuase with this Dummy-node , they could display 1:N relationships. > > Again I tried to using Hypergrah Renderer, it works good and show all > instances. > > So I wonder when using Touchgraph Renderer, if there exsits a fixed > number N, when number of instances is greater than N, they will not be > displayed ,becuase they are too many to display. > > > Thanks so much. > > > Dandan -- Christoph Froehlich <cf...@fo...> |
From: Wang, D. <dwa...@ws...> - 2005-03-09 19:00:32
|
Hi all, I am using tmnav-0.2.8_1 and I found a problem but not quite sure if it = is a bug , need your help. =20 After I load a xtm file, in the "Indexes" frame , I choose "Occurrence = Types" and I got a topic named "definition", when click this topic, see = in the Tree-View frame, topic "definition" with more than 20 occurrence = instances are listed( tree structure). =20 At this time, when you view Grahp-View frame ( have to choose = Touchgraph Renderer), it shows only the centernode "definition" and a = Dummy-node, between these two nodes is an arc with labeled "instances". =20 My question is Why all those more than 20 occurrence instances are not = showed here? they should be connnected with this dummy- node, becuase = with this Dummy-node , they could display 1:N relationships. =20 Again I tried to using Hypergrah Renderer, it works good and show all = instances. =20 So I wonder when using Touchgraph Renderer, if there exsits a fixed = number N, when number of instances is greater than N, they will not be = displayed ,becuase they are too many to display. =20 =20 Thanks so much. =20 =20 Dandan |
From: Christoph F. <cf...@fo...> - 2005-03-08 08:45:29
|
Hi Richard You are using TM's that are 50MB and over? Wow, I'm really impressed. Is it possible to tell us something about your environement? Do you process them with tm4j? If so, which backend do you use? Is speed ok? What are you doing with them, besides of tolog-querying? Sorry for being curios. But if your time (and non-disclosure agreements) allow, it would be great if you could share some of your experiences with us. Thanks c Am Montag, den 07.03.2005, 19:51 +0000 schrieb Richard Gregory: > Hi Kal, > > Thanks for the prompt reply, as ever. > > I have a small 2.5MB TM (compared with my other TM's which are 50MB and over) which I can send you > tomorrow, and which was produced for the same project these queries were generated for. If that is > still too large, let me know what size you are after and I'll generate one for you tomorrow. > > Cheers, > > Richard. > > > --- Kal Ahmed <ka...@te...> wrote: > > Hi Richard, > > > > Some of these NPEs probably are bugs in the tolog code. I don't think > > that the parser currently supports the = operator, but it should > > support /=. That said, the changes that were introduced to tolog 1.2 > > may have caused the implementation of /= to break. Biggest problem in > > implementing this query language is that Ontopia hadn't produced a > > formal language specification when I wrote the code, so a lot was my > > guess work based on what documentation was available. I don't know if > > that is changed now or not. > > > > Anyway, thanks for your detailed report. Its going to take me some time > > to get through all of these, but if you have time to make a minimum > > test set (small TM and a set of queries which work on Omnigator and > > fail in TM4J), then it would really help me out in sorting out "bugs" > > from *ahem* "features" :-). If you don't have time, don't worry - I'll > > get on to it and let you know how things go. > > > > Cheers, > > > > Kal > > > > On 7 Mar 2005, at 15:46, Richard Gregory wrote: > > > > > Hi All, > > > > > > I'm trying to execute a tolog query in a TM4J program, and I've > > > encountered a number of problems. > > > Apologies for the length of this mail, but it seemed that whichever > > > way I tried to solve the > > > problem I hit another one which confused me. > > > > > > The query I want to execute, which works fine in the Omnigator, is: > > > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > "$RESULT /= t-go-0000004, " + > > > "$RESULT /= t-go-0000006, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c " + > > > "order by $PROTEIN?"); > > > > > > This give an NullPointerException > > > > > > Exception caught: java.lang.NullPointerException > > > java.lang.NullPointerException > > > at org.tm4j.tologx.parser.Variable.equals(Variable.java:31) > > > at java.util.ArrayList.indexOf(ArrayList.java:220) > > > at java.util.ArrayList.contains(ArrayList.java:201) > > > at > > > org.tm4j.tologx.parser.ClauseList.addVariable(ClauseList.java:156) > > > at > > > org.tm4j.tologx.parser.ClauseList.addClause(ClauseList.java:165) > > > at > > > org.tm4j.tologx.parser.TologParser.opclause(TologParser.java:1134) > > > at > > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:789) > > > at > > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > > at > > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > > pl.java:151) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > > va:165) > > > at > > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > > > > > > I think the source of the problem is the lines: > > > > > > "$RESULT /= t-go-0000004, " + > > > "$RESULT /= t-go-0000006, " + > > > > > > If I comment these out, as below, it works fine, even with the similar > > > "$PROTEIN /= > > > t-protein-ydl101c " still in the query. Both these topics exist in the > > > topic map. so I know that > > > isn't the problem. From the testing I've done with various quries, I > > > get the same excpetion if I > > > use a statement like this in a query, except when it's the last > > > statement (apart from an "order > > > by"), so could there be a problem with the comma after a topic id, > > > used in this way is parsed? > > > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > //"$RESULT /= t-go-0000004, " + > > > //"$RESULT /= t-go-0000006, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c " + > > > "order by $PROTEIN?"); > > > > > > Having encountered this problem, I looked for other ways to formulate > > > the query. First I tried > > > using "not" statements with an "=", instead of using the "/=". > > > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > "not($RESULT = t-go-0000004), " + > > > "not($RESULT = t-go-0000006), " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c " + > > > "order by $PROTEIN?"); > > > > > > Again, this query works fine in the omnigator, but I get an excpetion > > > with TM4J. > > > > > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > > > query string. > > > org.tm4j.tologx.TologParserException: Error parsing query string. > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > > pl.java:155) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > > va:165) > > > at > > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > > > Caused by: line 1:103: unexpected char: '=' > > > at > > > org.tm4j.tologx.parser.TologLexer.nextToken(TologLexer.java:212) > > > at antlr.TokenBuffer.fill(TokenBuffer.java:69) > > > at antlr.TokenBuffer.LA(TokenBuffer.java:80) > > > at antlr.LLkParser.LA(LLkParser.java:52) > > > at antlr.Parser.match(Parser.java:212) > > > at > > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:776) > > > at > > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) > > > at > > > org.tm4j.tologx.parser.TologParser.notclause(TologParser.java:851) > > > at > > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:734) > > > at > > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > > at > > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > > pl.java:151) > > > ... 2 more > > > > > > It seems the query parser is taking exception (excuse the pun) to the > > > "=". I did some more testing > > > with other query variations using the "=" comparator, such as > > > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > "$RESULT = t-go-0006468, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c " + > > > "order by $PROTEIN?"); > > > > > > String[] replacements = {"GO:0006468"}; > > > TologResultsSet results = queryEval.execute( > > > "select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > "topic-name($GO1, $GO1_NAME), " + > > > "value($GO1_NAME, %1), " + > > > "$RESULT = $GO1, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c" + > > > "order by $PROTEIN?", replacements); > > > > > > These give the same excpetion. > > > > > > I next looked at getting topics by name, and going back to using the > > > "/=" comparator. > > > > > > TologResultsSet results = queryEval.execute( > > > "select $PROTEIN from " + > > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > > "topic-name($GO1, $GO1_NAME), " + > > > "value($GO1_NAME, \"GO:0000004\"), " + > > > "topic-name($GO2, $GO2_NAME), " + > > > "value($GO2_NAME, \"GO:0000006\"), " + > > > "$RESULT /= $GO1, " + > > > "$RESULT /= $GO2, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= t-protein-ydl101c " + > > > "order by $PROTEIN?"); > > > > > > Again, this query worked fine in the omnigator, but I got an exception > > > with TM4J. > > > > > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > > > query string. > > > org.tm4j.tologx.TologParserException: Error parsing query string. > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > > pl.java:155) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > > va:165) > > > at > > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:120) > > > Caused by: line 1:128: unexpected token: "GO:0000004" > > > at > > > org.tm4j.tologx.parser.TologParser.expr(TologParser.java:1244) > > > at > > > org.tm4j.tologx.parser.TologParser.pair(TologParser.java:1151) > > > at > > > org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1085) > > > at > > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:786) > > > at > > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > > at > > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > > pl.java:151) > > > ... 2 more > > > > > > I next tried to pass the topic names in from an array. Because I > > > ultimately want to repeat the > > > query with other protein topic ID's, I tried to pass this in from the > > > array as well. > > > > > > String[] replacements = {"t-protein-ydl101c", "GO:0000004", > > > "GO:0000006"}; > > > TologResultsSet results = queryEval.execute( > > > "select $PROTEIN from " + > > > "at-has-go(%1 : tt-protein, $RESULT : tt-go), " + > > > "topic-name($GO1, $GO1_NAME), " + > > > "value($GO1_NAME, %2), " + > > > "topic-name($GO2, $GO2_NAME), " + > > > "value($GO2_NAME, %3), " + > > > "$RESULT /= $GO1, " + > > > "$RESULT /= $GO2, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= %1 " + > > > "order by $PROTEIN?", replacements); > > > > > > This gives yet another excpetion. > > > > > > Exception caught: org.tm4j.tologx.TologProcessingException: Type > > > mismatch in replacement %1. A > > > Topic was expected. > > > org.tm4j.tologx.TologProcessingException: Type mismatch in replacement > > > %1. A Topic was expected. > > > at > > > org.tm4j.tologx.parser.ClauseList.doReplacement(ClauseList.java:216) > > > at > > > org.tm4j.tologx.parser.TologQuery.execute(TologQuery.java:154) > > > at > > > org.tm4j.tologx.memory.PreparedQueryImpl.execute(PreparedQueryImpl.java > > > :56) > > > at > > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > > va:174) > > > at > > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:119) > > > > > > I did find away around it, creating a string variable to hold the > > > topic ID, and concatenating this > > > into the query string. > > > > > > String[] replacements = {"GO:0000004", "GO:0000006"}; > > > String proteinID = "t-protein-ydl101c"; > > > TologResultsSet results = queryEval.execute( > > > "select $PROTEIN from " + > > > "at-has-go(" + proteinID + " : tt-protein, $RESULT : tt-go), " + > > > "topic-name($GO1, $GO1_NAME), " + > > > "value($GO1_NAME, %2), " + > > > "topic-name($GO2, $GO2_NAME), " + > > > "value($GO2_NAME, %3), " + > > > "$RESULT /= $GO1, " + > > > "$RESULT /= $GO2, " + > > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > > "$PROTEIN /= " + proteinID + " " + > > > "order by $PROTEIN?", replacements); > > > > > > This now works, and gives me the functionality I want, but I've no > > > idea why the earleir queries > > > gave the exceptions they did. > > > > > > Has anyone else experienced anything like these problems, or can > > > anyone explain them? I'm really > > > confused by these, especially when the queries worked in the > > > omnigator, so if anyone can offer an > > > explanation, even "tm4j bug" (sorry, Kal) I'd be grateful. > > > > > > Cheers, > > > > > > Richard. > > > > > > Send instant messages to your online friends > > > http://uk.messenger.yahoo.com > > > > > > > > > ------------------------------------------------------- > > > SF email is sponsored by - The IT Product Guide > > > Read honest & candid reviews on hundreds of IT Products from real > > > users. > > > Discover which products truly live up to the hype. Start reading now. > > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > > _______________________________________________ > > > Tm4j-users mailing list > > > Tm4...@li... > > > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > > > > > > > > Send instant messages to your online friends http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users -- Christoph Froehlich <cf...@fo...> |
From: Kal A. <ka...@te...> - 2005-03-07 21:11:47
|
Hi Richard, Lets try with the 2.5MB file to start with - if its a real pain, I'll yell ;-) Cheers, Kal On 7 Mar 2005, at 19:51, Richard Gregory wrote: > Hi Kal, > > Thanks for the prompt reply, as ever. > > I have a small 2.5MB TM (compared with my other TM's which are 50MB > and over) which I can send you > tomorrow, and which was produced for the same project these queries > were generated for. If that is > still too large, let me know what size you are after and I'll generate > one for you tomorrow. > > Cheers, > > Richard. > > > --- Kal Ahmed <ka...@te...> wrote: >> Hi Richard, >> >> Some of these NPEs probably are bugs in the tolog code. I don't think >> that the parser currently supports the = operator, but it should >> support /=. That said, the changes that were introduced to tolog 1.2 >> may have caused the implementation of /= to break. Biggest problem in >> implementing this query language is that Ontopia hadn't produced a >> formal language specification when I wrote the code, so a lot was my >> guess work based on what documentation was available. I don't know if >> that is changed now or not. >> >> Anyway, thanks for your detailed report. Its going to take me some >> time >> to get through all of these, but if you have time to make a minimum >> test set (small TM and a set of queries which work on Omnigator and >> fail in TM4J), then it would really help me out in sorting out "bugs" >> from *ahem* "features" :-). If you don't have time, don't worry - I'll >> get on to it and let you know how things go. >> >> Cheers, >> >> Kal >> >> On 7 Mar 2005, at 15:46, Richard Gregory wrote: >> >>> Hi All, >>> >>> I'm trying to execute a tolog query in a TM4J program, and I've >>> encountered a number of problems. >>> Apologies for the length of this mail, but it seemed that whichever >>> way I tried to solve the >>> problem I hit another one which confused me. >>> >>> The query I want to execute, which works fine in the Omnigator, is: >>> >>> TologResultsSet results = queryEval.execute("select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> "$RESULT /= t-go-0000004, " + >>> "$RESULT /= t-go-0000006, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c " + >>> "order by $PROTEIN?"); >>> >>> This give an NullPointerException >>> >>> Exception caught: java.lang.NullPointerException >>> java.lang.NullPointerException >>> at org.tm4j.tologx.parser.Variable.equals(Variable.java:31) >>> at java.util.ArrayList.indexOf(ArrayList.java:220) >>> at java.util.ArrayList.contains(ArrayList.java:201) >>> at >>> org.tm4j.tologx.parser.ClauseList.addVariable(ClauseList.java:156) >>> at >>> org.tm4j.tologx.parser.ClauseList.addClause(ClauseList.java:165) >>> at >>> org.tm4j.tologx.parser.TologParser.opclause(TologParser.java:1134) >>> at >>> org.tm4j.tologx.parser.TologParser.clause(TologParser.java:789) >>> at >>> org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) >>> at >>> org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluator >>> Im >>> pl.java:151) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl. >>> ja >>> va:165) >>> at >>> mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) >>> >>> I think the source of the problem is the lines: >>> >>> "$RESULT /= t-go-0000004, " + >>> "$RESULT /= t-go-0000006, " + >>> >>> If I comment these out, as below, it works fine, even with the >>> similar >>> "$PROTEIN /= >>> t-protein-ydl101c " still in the query. Both these topics exist in >>> the >>> topic map. so I know that >>> isn't the problem. From the testing I've done with various quries, I >>> get the same excpetion if I >>> use a statement like this in a query, except when it's the last >>> statement (apart from an "order >>> by"), so could there be a problem with the comma after a topic id, >>> used in this way is parsed? >>> >>> TologResultsSet results = queryEval.execute("select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> //"$RESULT /= t-go-0000004, " + >>> //"$RESULT /= t-go-0000006, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c " + >>> "order by $PROTEIN?"); >>> >>> Having encountered this problem, I looked for other ways to formulate >>> the query. First I tried >>> using "not" statements with an "=", instead of using the "/=". >>> >>> TologResultsSet results = queryEval.execute("select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> "not($RESULT = t-go-0000004), " + >>> "not($RESULT = t-go-0000006), " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c " + >>> "order by $PROTEIN?"); >>> >>> Again, this query works fine in the omnigator, but I get an excpetion >>> with TM4J. >>> >>> Exception caught: org.tm4j.tologx.TologParserException: Error parsing >>> query string. >>> org.tm4j.tologx.TologParserException: Error parsing query string. >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluator >>> Im >>> pl.java:155) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl. >>> ja >>> va:165) >>> at >>> mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) >>> Caused by: line 1:103: unexpected char: '=' >>> at >>> org.tm4j.tologx.parser.TologLexer.nextToken(TologLexer.java:212) >>> at antlr.TokenBuffer.fill(TokenBuffer.java:69) >>> at antlr.TokenBuffer.LA(TokenBuffer.java:80) >>> at antlr.LLkParser.LA(LLkParser.java:52) >>> at antlr.Parser.match(Parser.java:212) >>> at >>> org.tm4j.tologx.parser.TologParser.clause(TologParser.java:776) >>> at >>> org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) >>> at >>> org.tm4j.tologx.parser.TologParser.notclause(TologParser.java:851) >>> at >>> org.tm4j.tologx.parser.TologParser.clause(TologParser.java:734) >>> at >>> org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) >>> at >>> org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluator >>> Im >>> pl.java:151) >>> ... 2 more >>> >>> It seems the query parser is taking exception (excuse the pun) to the >>> "=". I did some more testing >>> with other query variations using the "=" comparator, such as >>> >>> TologResultsSet results = queryEval.execute("select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> "$RESULT = t-go-0006468, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c " + >>> "order by $PROTEIN?"); >>> >>> String[] replacements = {"GO:0006468"}; >>> TologResultsSet results = queryEval.execute( >>> "select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> "topic-name($GO1, $GO1_NAME), " + >>> "value($GO1_NAME, %1), " + >>> "$RESULT = $GO1, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c" + >>> "order by $PROTEIN?", replacements); >>> >>> These give the same excpetion. >>> >>> I next looked at getting topics by name, and going back to using the >>> "/=" comparator. >>> >>> TologResultsSet results = queryEval.execute( >>> "select $PROTEIN from " + >>> "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + >>> "topic-name($GO1, $GO1_NAME), " + >>> "value($GO1_NAME, \"GO:0000004\"), " + >>> "topic-name($GO2, $GO2_NAME), " + >>> "value($GO2_NAME, \"GO:0000006\"), " + >>> "$RESULT /= $GO1, " + >>> "$RESULT /= $GO2, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= t-protein-ydl101c " + >>> "order by $PROTEIN?"); >>> >>> Again, this query worked fine in the omnigator, but I got an >>> exception >>> with TM4J. >>> >>> Exception caught: org.tm4j.tologx.TologParserException: Error parsing >>> query string. >>> org.tm4j.tologx.TologParserException: Error parsing query string. >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluator >>> Im >>> pl.java:155) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl. >>> ja >>> va:165) >>> at >>> mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:120) >>> Caused by: line 1:128: unexpected token: "GO:0000004" >>> at >>> org.tm4j.tologx.parser.TologParser.expr(TologParser.java:1244) >>> at >>> org.tm4j.tologx.parser.TologParser.pair(TologParser.java:1151) >>> at >>> org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1085) >>> at >>> org.tm4j.tologx.parser.TologParser.clause(TologParser.java:786) >>> at >>> org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) >>> at >>> org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluator >>> Im >>> pl.java:151) >>> ... 2 more >>> >>> I next tried to pass the topic names in from an array. Because I >>> ultimately want to repeat the >>> query with other protein topic ID's, I tried to pass this in from the >>> array as well. >>> >>> String[] replacements = {"t-protein-ydl101c", "GO:0000004", >>> "GO:0000006"}; >>> TologResultsSet results = queryEval.execute( >>> "select $PROTEIN from " + >>> "at-has-go(%1 : tt-protein, $RESULT : tt-go), " + >>> "topic-name($GO1, $GO1_NAME), " + >>> "value($GO1_NAME, %2), " + >>> "topic-name($GO2, $GO2_NAME), " + >>> "value($GO2_NAME, %3), " + >>> "$RESULT /= $GO1, " + >>> "$RESULT /= $GO2, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= %1 " + >>> "order by $PROTEIN?", replacements); >>> >>> This gives yet another excpetion. >>> >>> Exception caught: org.tm4j.tologx.TologProcessingException: Type >>> mismatch in replacement %1. A >>> Topic was expected. >>> org.tm4j.tologx.TologProcessingException: Type mismatch in >>> replacement >>> %1. A Topic was expected. >>> at >>> org.tm4j.tologx.parser.ClauseList.doReplacement(ClauseList.java:216) >>> at >>> org.tm4j.tologx.parser.TologQuery.execute(TologQuery.java:154) >>> at >>> org.tm4j.tologx.memory.PreparedQueryImpl.execute(PreparedQueryImpl.ja >>> va >>> :56) >>> at >>> org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl. >>> ja >>> va:174) >>> at >>> mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:119) >>> >>> I did find away around it, creating a string variable to hold the >>> topic ID, and concatenating this >>> into the query string. >>> >>> String[] replacements = {"GO:0000004", "GO:0000006"}; >>> String proteinID = "t-protein-ydl101c"; >>> TologResultsSet results = queryEval.execute( >>> "select $PROTEIN from " + >>> "at-has-go(" + proteinID + " : tt-protein, $RESULT : tt-go), " + >>> "topic-name($GO1, $GO1_NAME), " + >>> "value($GO1_NAME, %2), " + >>> "topic-name($GO2, $GO2_NAME), " + >>> "value($GO2_NAME, %3), " + >>> "$RESULT /= $GO1, " + >>> "$RESULT /= $GO2, " + >>> "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + >>> "$PROTEIN /= " + proteinID + " " + >>> "order by $PROTEIN?", replacements); >>> >>> This now works, and gives me the functionality I want, but I've no >>> idea why the earleir queries >>> gave the exceptions they did. >>> >>> Has anyone else experienced anything like these problems, or can >>> anyone explain them? I'm really >>> confused by these, especially when the queries worked in the >>> omnigator, so if anyone can offer an >>> explanation, even "tm4j bug" (sorry, Kal) I'd be grateful. >>> >>> Cheers, >>> >>> Richard. >>> >>> Send instant messages to your online friends >>> http://uk.messenger.yahoo.com >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >>> users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >>> _______________________________________________ >>> Tm4j-users mailing list >>> Tm4...@li... >>> https://lists.sourceforge.net/lists/listinfo/tm4j-users >>> >>> >> >> > > Send instant messages to your online friends > http://uk.messenger.yahoo.com > > |
From: Richard G. <ric...@ya...> - 2005-03-07 19:52:02
|
Hi Kal, Thanks for the prompt reply, as ever. I have a small 2.5MB TM (compared with my other TM's which are 50MB and over) which I can send you tomorrow, and which was produced for the same project these queries were generated for. If that is still too large, let me know what size you are after and I'll generate one for you tomorrow. Cheers, Richard. --- Kal Ahmed <ka...@te...> wrote: > Hi Richard, > > Some of these NPEs probably are bugs in the tolog code. I don't think > that the parser currently supports the = operator, but it should > support /=. That said, the changes that were introduced to tolog 1.2 > may have caused the implementation of /= to break. Biggest problem in > implementing this query language is that Ontopia hadn't produced a > formal language specification when I wrote the code, so a lot was my > guess work based on what documentation was available. I don't know if > that is changed now or not. > > Anyway, thanks for your detailed report. Its going to take me some time > to get through all of these, but if you have time to make a minimum > test set (small TM and a set of queries which work on Omnigator and > fail in TM4J), then it would really help me out in sorting out "bugs" > from *ahem* "features" :-). If you don't have time, don't worry - I'll > get on to it and let you know how things go. > > Cheers, > > Kal > > On 7 Mar 2005, at 15:46, Richard Gregory wrote: > > > Hi All, > > > > I'm trying to execute a tolog query in a TM4J program, and I've > > encountered a number of problems. > > Apologies for the length of this mail, but it seemed that whichever > > way I tried to solve the > > problem I hit another one which confused me. > > > > The query I want to execute, which works fine in the Omnigator, is: > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > "$RESULT /= t-go-0000004, " + > > "$RESULT /= t-go-0000006, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c " + > > "order by $PROTEIN?"); > > > > This give an NullPointerException > > > > Exception caught: java.lang.NullPointerException > > java.lang.NullPointerException > > at org.tm4j.tologx.parser.Variable.equals(Variable.java:31) > > at java.util.ArrayList.indexOf(ArrayList.java:220) > > at java.util.ArrayList.contains(ArrayList.java:201) > > at > > org.tm4j.tologx.parser.ClauseList.addVariable(ClauseList.java:156) > > at > > org.tm4j.tologx.parser.ClauseList.addClause(ClauseList.java:165) > > at > > org.tm4j.tologx.parser.TologParser.opclause(TologParser.java:1134) > > at > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:789) > > at > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > at > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > pl.java:151) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > va:165) > > at > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > > > > I think the source of the problem is the lines: > > > > "$RESULT /= t-go-0000004, " + > > "$RESULT /= t-go-0000006, " + > > > > If I comment these out, as below, it works fine, even with the similar > > "$PROTEIN /= > > t-protein-ydl101c " still in the query. Both these topics exist in the > > topic map. so I know that > > isn't the problem. From the testing I've done with various quries, I > > get the same excpetion if I > > use a statement like this in a query, except when it's the last > > statement (apart from an "order > > by"), so could there be a problem with the comma after a topic id, > > used in this way is parsed? > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > //"$RESULT /= t-go-0000004, " + > > //"$RESULT /= t-go-0000006, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c " + > > "order by $PROTEIN?"); > > > > Having encountered this problem, I looked for other ways to formulate > > the query. First I tried > > using "not" statements with an "=", instead of using the "/=". > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > "not($RESULT = t-go-0000004), " + > > "not($RESULT = t-go-0000006), " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c " + > > "order by $PROTEIN?"); > > > > Again, this query works fine in the omnigator, but I get an excpetion > > with TM4J. > > > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > > query string. > > org.tm4j.tologx.TologParserException: Error parsing query string. > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > pl.java:155) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > va:165) > > at > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > > Caused by: line 1:103: unexpected char: '=' > > at > > org.tm4j.tologx.parser.TologLexer.nextToken(TologLexer.java:212) > > at antlr.TokenBuffer.fill(TokenBuffer.java:69) > > at antlr.TokenBuffer.LA(TokenBuffer.java:80) > > at antlr.LLkParser.LA(LLkParser.java:52) > > at antlr.Parser.match(Parser.java:212) > > at > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:776) > > at > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) > > at > > org.tm4j.tologx.parser.TologParser.notclause(TologParser.java:851) > > at > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:734) > > at > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > at > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > pl.java:151) > > ... 2 more > > > > It seems the query parser is taking exception (excuse the pun) to the > > "=". I did some more testing > > with other query variations using the "=" comparator, such as > > > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > "$RESULT = t-go-0006468, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c " + > > "order by $PROTEIN?"); > > > > String[] replacements = {"GO:0006468"}; > > TologResultsSet results = queryEval.execute( > > "select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > "topic-name($GO1, $GO1_NAME), " + > > "value($GO1_NAME, %1), " + > > "$RESULT = $GO1, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c" + > > "order by $PROTEIN?", replacements); > > > > These give the same excpetion. > > > > I next looked at getting topics by name, and going back to using the > > "/=" comparator. > > > > TologResultsSet results = queryEval.execute( > > "select $PROTEIN from " + > > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > > "topic-name($GO1, $GO1_NAME), " + > > "value($GO1_NAME, \"GO:0000004\"), " + > > "topic-name($GO2, $GO2_NAME), " + > > "value($GO2_NAME, \"GO:0000006\"), " + > > "$RESULT /= $GO1, " + > > "$RESULT /= $GO2, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= t-protein-ydl101c " + > > "order by $PROTEIN?"); > > > > Again, this query worked fine in the omnigator, but I got an exception > > with TM4J. > > > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > > query string. > > org.tm4j.tologx.TologParserException: Error parsing query string. > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > pl.java:155) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > va:165) > > at > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:120) > > Caused by: line 1:128: unexpected token: "GO:0000004" > > at > > org.tm4j.tologx.parser.TologParser.expr(TologParser.java:1244) > > at > > org.tm4j.tologx.parser.TologParser.pair(TologParser.java:1151) > > at > > org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1085) > > at > > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:786) > > at > > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > > at > > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > > pl.java:151) > > ... 2 more > > > > I next tried to pass the topic names in from an array. Because I > > ultimately want to repeat the > > query with other protein topic ID's, I tried to pass this in from the > > array as well. > > > > String[] replacements = {"t-protein-ydl101c", "GO:0000004", > > "GO:0000006"}; > > TologResultsSet results = queryEval.execute( > > "select $PROTEIN from " + > > "at-has-go(%1 : tt-protein, $RESULT : tt-go), " + > > "topic-name($GO1, $GO1_NAME), " + > > "value($GO1_NAME, %2), " + > > "topic-name($GO2, $GO2_NAME), " + > > "value($GO2_NAME, %3), " + > > "$RESULT /= $GO1, " + > > "$RESULT /= $GO2, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= %1 " + > > "order by $PROTEIN?", replacements); > > > > This gives yet another excpetion. > > > > Exception caught: org.tm4j.tologx.TologProcessingException: Type > > mismatch in replacement %1. A > > Topic was expected. > > org.tm4j.tologx.TologProcessingException: Type mismatch in replacement > > %1. A Topic was expected. > > at > > org.tm4j.tologx.parser.ClauseList.doReplacement(ClauseList.java:216) > > at > > org.tm4j.tologx.parser.TologQuery.execute(TologQuery.java:154) > > at > > org.tm4j.tologx.memory.PreparedQueryImpl.execute(PreparedQueryImpl.java > > :56) > > at > > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > > va:174) > > at > > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:119) > > > > I did find away around it, creating a string variable to hold the > > topic ID, and concatenating this > > into the query string. > > > > String[] replacements = {"GO:0000004", "GO:0000006"}; > > String proteinID = "t-protein-ydl101c"; > > TologResultsSet results = queryEval.execute( > > "select $PROTEIN from " + > > "at-has-go(" + proteinID + " : tt-protein, $RESULT : tt-go), " + > > "topic-name($GO1, $GO1_NAME), " + > > "value($GO1_NAME, %2), " + > > "topic-name($GO2, $GO2_NAME), " + > > "value($GO2_NAME, %3), " + > > "$RESULT /= $GO1, " + > > "$RESULT /= $GO2, " + > > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > > "$PROTEIN /= " + proteinID + " " + > > "order by $PROTEIN?", replacements); > > > > This now works, and gives me the functionality I want, but I've no > > idea why the earleir queries > > gave the exceptions they did. > > > > Has anyone else experienced anything like these problems, or can > > anyone explain them? I'm really > > confused by these, especially when the queries worked in the > > omnigator, so if anyone can offer an > > explanation, even "tm4j bug" (sorry, Kal) I'd be grateful. > > > > Cheers, > > > > Richard. > > > > Send instant messages to your online friends > > http://uk.messenger.yahoo.com > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real > > users. > > Discover which products truly live up to the hype. Start reading now. > > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > > _______________________________________________ > > Tm4j-users mailing list > > Tm4...@li... > > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > > > Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: Kal A. <ka...@te...> - 2005-03-07 19:20:15
|
Hi Richard, Some of these NPEs probably are bugs in the tolog code. I don't think that the parser currently supports the = operator, but it should support /=. That said, the changes that were introduced to tolog 1.2 may have caused the implementation of /= to break. Biggest problem in implementing this query language is that Ontopia hadn't produced a formal language specification when I wrote the code, so a lot was my guess work based on what documentation was available. I don't know if that is changed now or not. Anyway, thanks for your detailed report. Its going to take me some time to get through all of these, but if you have time to make a minimum test set (small TM and a set of queries which work on Omnigator and fail in TM4J), then it would really help me out in sorting out "bugs" from *ahem* "features" :-). If you don't have time, don't worry - I'll get on to it and let you know how things go. Cheers, Kal On 7 Mar 2005, at 15:46, Richard Gregory wrote: > Hi All, > > I'm trying to execute a tolog query in a TM4J program, and I've > encountered a number of problems. > Apologies for the length of this mail, but it seemed that whichever > way I tried to solve the > problem I hit another one which confused me. > > The query I want to execute, which works fine in the Omnigator, is: > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > "$RESULT /= t-go-0000004, " + > "$RESULT /= t-go-0000006, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c " + > "order by $PROTEIN?"); > > This give an NullPointerException > > Exception caught: java.lang.NullPointerException > java.lang.NullPointerException > at org.tm4j.tologx.parser.Variable.equals(Variable.java:31) > at java.util.ArrayList.indexOf(ArrayList.java:220) > at java.util.ArrayList.contains(ArrayList.java:201) > at > org.tm4j.tologx.parser.ClauseList.addVariable(ClauseList.java:156) > at > org.tm4j.tologx.parser.ClauseList.addClause(ClauseList.java:165) > at > org.tm4j.tologx.parser.TologParser.opclause(TologParser.java:1134) > at > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:789) > at > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > at > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > pl.java:151) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > va:165) > at > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > > I think the source of the problem is the lines: > > "$RESULT /= t-go-0000004, " + > "$RESULT /= t-go-0000006, " + > > If I comment these out, as below, it works fine, even with the similar > "$PROTEIN /= > t-protein-ydl101c " still in the query. Both these topics exist in the > topic map. so I know that > isn't the problem. From the testing I've done with various quries, I > get the same excpetion if I > use a statement like this in a query, except when it's the last > statement (apart from an "order > by"), so could there be a problem with the comma after a topic id, > used in this way is parsed? > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > //"$RESULT /= t-go-0000004, " + > //"$RESULT /= t-go-0000006, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c " + > "order by $PROTEIN?"); > > Having encountered this problem, I looked for other ways to formulate > the query. First I tried > using "not" statements with an "=", instead of using the "/=". > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > "not($RESULT = t-go-0000004), " + > "not($RESULT = t-go-0000006), " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c " + > "order by $PROTEIN?"); > > Again, this query works fine in the omnigator, but I get an excpetion > with TM4J. > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > query string. > org.tm4j.tologx.TologParserException: Error parsing query string. > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > pl.java:155) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > va:165) > at > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) > Caused by: line 1:103: unexpected char: '=' > at > org.tm4j.tologx.parser.TologLexer.nextToken(TologLexer.java:212) > at antlr.TokenBuffer.fill(TokenBuffer.java:69) > at antlr.TokenBuffer.LA(TokenBuffer.java:80) > at antlr.LLkParser.LA(LLkParser.java:52) > at antlr.Parser.match(Parser.java:212) > at > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:776) > at > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) > at > org.tm4j.tologx.parser.TologParser.notclause(TologParser.java:851) > at > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:734) > at > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > at > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > pl.java:151) > ... 2 more > > It seems the query parser is taking exception (excuse the pun) to the > "=". I did some more testing > with other query variations using the "=" comparator, such as > > TologResultsSet results = queryEval.execute("select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > "$RESULT = t-go-0006468, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c " + > "order by $PROTEIN?"); > > String[] replacements = {"GO:0006468"}; > TologResultsSet results = queryEval.execute( > "select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > "topic-name($GO1, $GO1_NAME), " + > "value($GO1_NAME, %1), " + > "$RESULT = $GO1, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c" + > "order by $PROTEIN?", replacements); > > These give the same excpetion. > > I next looked at getting topics by name, and going back to using the > "/=" comparator. > > TologResultsSet results = queryEval.execute( > "select $PROTEIN from " + > "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + > "topic-name($GO1, $GO1_NAME), " + > "value($GO1_NAME, \"GO:0000004\"), " + > "topic-name($GO2, $GO2_NAME), " + > "value($GO2_NAME, \"GO:0000006\"), " + > "$RESULT /= $GO1, " + > "$RESULT /= $GO2, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= t-protein-ydl101c " + > "order by $PROTEIN?"); > > Again, this query worked fine in the omnigator, but I got an exception > with TM4J. > > Exception caught: org.tm4j.tologx.TologParserException: Error parsing > query string. > org.tm4j.tologx.TologParserException: Error parsing query string. > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > pl.java:155) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > va:165) > at > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:120) > Caused by: line 1:128: unexpected token: "GO:0000004" > at > org.tm4j.tologx.parser.TologParser.expr(TologParser.java:1244) > at > org.tm4j.tologx.parser.TologParser.pair(TologParser.java:1151) > at > org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1085) > at > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:786) > at > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) > at > org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorIm > pl.java:151) > ... 2 more > > I next tried to pass the topic names in from an array. Because I > ultimately want to repeat the > query with other protein topic ID's, I tried to pass this in from the > array as well. > > String[] replacements = {"t-protein-ydl101c", "GO:0000004", > "GO:0000006"}; > TologResultsSet results = queryEval.execute( > "select $PROTEIN from " + > "at-has-go(%1 : tt-protein, $RESULT : tt-go), " + > "topic-name($GO1, $GO1_NAME), " + > "value($GO1_NAME, %2), " + > "topic-name($GO2, $GO2_NAME), " + > "value($GO2_NAME, %3), " + > "$RESULT /= $GO1, " + > "$RESULT /= $GO2, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= %1 " + > "order by $PROTEIN?", replacements); > > This gives yet another excpetion. > > Exception caught: org.tm4j.tologx.TologProcessingException: Type > mismatch in replacement %1. A > Topic was expected. > org.tm4j.tologx.TologProcessingException: Type mismatch in replacement > %1. A Topic was expected. > at > org.tm4j.tologx.parser.ClauseList.doReplacement(ClauseList.java:216) > at > org.tm4j.tologx.parser.TologQuery.execute(TologQuery.java:154) > at > org.tm4j.tologx.memory.PreparedQueryImpl.execute(PreparedQueryImpl.java > :56) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.ja > va:174) > at > mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:119) > > I did find away around it, creating a string variable to hold the > topic ID, and concatenating this > into the query string. > > String[] replacements = {"GO:0000004", "GO:0000006"}; > String proteinID = "t-protein-ydl101c"; > TologResultsSet results = queryEval.execute( > "select $PROTEIN from " + > "at-has-go(" + proteinID + " : tt-protein, $RESULT : tt-go), " + > "topic-name($GO1, $GO1_NAME), " + > "value($GO1_NAME, %2), " + > "topic-name($GO2, $GO2_NAME), " + > "value($GO2_NAME, %3), " + > "$RESULT /= $GO1, " + > "$RESULT /= $GO2, " + > "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + > "$PROTEIN /= " + proteinID + " " + > "order by $PROTEIN?", replacements); > > This now works, and gives me the functionality I want, but I've no > idea why the earleir queries > gave the exceptions they did. > > Has anyone else experienced anything like these problems, or can > anyone explain them? I'm really > confused by these, especially when the queries worked in the > omnigator, so if anyone can offer an > explanation, even "tm4j bug" (sorry, Kal) I'd be grateful. > > Cheers, > > Richard. > > Send instant messages to your online friends > http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Richard G. <ric...@ya...> - 2005-03-07 17:52:48
|
Hi All, I'm trying to execute a tolog query in a TM4J program, and I've encountered a number of problems. Apologies for the length of this mail, but it seemed that whichever way I tried to solve the problem I hit another one which confused me. The query I want to execute, which works fine in the Omnigator, is: TologResultsSet results = queryEval.execute("select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + "$RESULT /= t-go-0000004, " + "$RESULT /= t-go-0000006, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c " + "order by $PROTEIN?"); This give an NullPointerException Exception caught: java.lang.NullPointerException java.lang.NullPointerException at org.tm4j.tologx.parser.Variable.equals(Variable.java:31) at java.util.ArrayList.indexOf(ArrayList.java:220) at java.util.ArrayList.contains(ArrayList.java:201) at org.tm4j.tologx.parser.ClauseList.addVariable(ClauseList.java:156) at org.tm4j.tologx.parser.ClauseList.addClause(ClauseList.java:165) at org.tm4j.tologx.parser.TologParser.opclause(TologParser.java:1134) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:789) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) at org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:151) at org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java:165) at mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) I think the source of the problem is the lines: "$RESULT /= t-go-0000004, " + "$RESULT /= t-go-0000006, " + If I comment these out, as below, it works fine, even with the similar "$PROTEIN /= t-protein-ydl101c " still in the query. Both these topics exist in the topic map. so I know that isn't the problem. From the testing I've done with various quries, I get the same excpetion if I use a statement like this in a query, except when it's the last statement (apart from an "order by"), so could there be a problem with the comma after a topic id, used in this way is parsed? TologResultsSet results = queryEval.execute("select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + //"$RESULT /= t-go-0000004, " + //"$RESULT /= t-go-0000006, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c " + "order by $PROTEIN?"); Having encountered this problem, I looked for other ways to formulate the query. First I tried using "not" statements with an "=", instead of using the "/=". TologResultsSet results = queryEval.execute("select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + "not($RESULT = t-go-0000004), " + "not($RESULT = t-go-0000006), " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c " + "order by $PROTEIN?"); Again, this query works fine in the omnigator, but I get an excpetion with TM4J. Exception caught: org.tm4j.tologx.TologParserException: Error parsing query string. org.tm4j.tologx.TologParserException: Error parsing query string. at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:155) at org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java:165) at mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:150) Caused by: line 1:103: unexpected char: '=' at org.tm4j.tologx.parser.TologLexer.nextToken(TologLexer.java:212) at antlr.TokenBuffer.fill(TokenBuffer.java:69) at antlr.TokenBuffer.LA(TokenBuffer.java:80) at antlr.LLkParser.LA(LLkParser.java:52) at antlr.Parser.match(Parser.java:212) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:776) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) at org.tm4j.tologx.parser.TologParser.notclause(TologParser.java:851) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:734) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) at org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:151) ... 2 more It seems the query parser is taking exception (excuse the pun) to the "=". I did some more testing with other query variations using the "=" comparator, such as TologResultsSet results = queryEval.execute("select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + "$RESULT = t-go-0006468, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c " + "order by $PROTEIN?"); String[] replacements = {"GO:0006468"}; TologResultsSet results = queryEval.execute( "select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + "topic-name($GO1, $GO1_NAME), " + "value($GO1_NAME, %1), " + "$RESULT = $GO1, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c" + "order by $PROTEIN?", replacements); These give the same excpetion. I next looked at getting topics by name, and going back to using the "/=" comparator. TologResultsSet results = queryEval.execute( "select $PROTEIN from " + "at-has-go(t-protein-ydl101c : tt-protein, $RESULT : tt-go), " + "topic-name($GO1, $GO1_NAME), " + "value($GO1_NAME, \"GO:0000004\"), " + "topic-name($GO2, $GO2_NAME), " + "value($GO2_NAME, \"GO:0000006\"), " + "$RESULT /= $GO1, " + "$RESULT /= $GO2, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= t-protein-ydl101c " + "order by $PROTEIN?"); Again, this query worked fine in the omnigator, but I got an exception with TM4J. Exception caught: org.tm4j.tologx.TologParserException: Error parsing query string. org.tm4j.tologx.TologParserException: Error parsing query string. at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:155) at org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java:165) at mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:120) Caused by: line 1:128: unexpected token: "GO:0000004" at org.tm4j.tologx.parser.TologParser.expr(TologParser.java:1244) at org.tm4j.tologx.parser.TologParser.pair(TologParser.java:1151) at org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1085) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:786) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:443) at org.tm4j.tologx.parser.TologParser.query(TologParser.java:498) at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:151) ... 2 more I next tried to pass the topic names in from an array. Because I ultimately want to repeat the query with other protein topic ID's, I tried to pass this in from the array as well. String[] replacements = {"t-protein-ydl101c", "GO:0000004", "GO:0000006"}; TologResultsSet results = queryEval.execute( "select $PROTEIN from " + "at-has-go(%1 : tt-protein, $RESULT : tt-go), " + "topic-name($GO1, $GO1_NAME), " + "value($GO1_NAME, %2), " + "topic-name($GO2, $GO2_NAME), " + "value($GO2_NAME, %3), " + "$RESULT /= $GO1, " + "$RESULT /= $GO2, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= %1 " + "order by $PROTEIN?", replacements); This gives yet another excpetion. Exception caught: org.tm4j.tologx.TologProcessingException: Type mismatch in replacement %1. A Topic was expected. org.tm4j.tologx.TologProcessingException: Type mismatch in replacement %1. A Topic was expected. at org.tm4j.tologx.parser.ClauseList.doReplacement(ClauseList.java:216) at org.tm4j.tologx.parser.TologQuery.execute(TologQuery.java:154) at org.tm4j.tologx.memory.PreparedQueryImpl.execute(PreparedQueryImpl.java:56) at org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java:174) at mips.genre.topicmaps.TologBugTests.main(TologBugTests.java:119) I did find away around it, creating a string variable to hold the topic ID, and concatenating this into the query string. String[] replacements = {"GO:0000004", "GO:0000006"}; String proteinID = "t-protein-ydl101c"; TologResultsSet results = queryEval.execute( "select $PROTEIN from " + "at-has-go(" + proteinID + " : tt-protein, $RESULT : tt-go), " + "topic-name($GO1, $GO1_NAME), " + "value($GO1_NAME, %2), " + "topic-name($GO2, $GO2_NAME), " + "value($GO2_NAME, %3), " + "$RESULT /= $GO1, " + "$RESULT /= $GO2, " + "at-has-go($PROTEIN : tt-protein, $RESULT : tt-go), " + "$PROTEIN /= " + proteinID + " " + "order by $PROTEIN?", replacements); This now works, and gives me the functionality I want, but I've no idea why the earleir queries gave the exceptions they did. Has anyone else experienced anything like these problems, or can anyone explain them? I'm really confused by these, especially when the queries worked in the omnigator, so if anyone can offer an explanation, even "tm4j bug" (sorry, Kal) I'd be grateful. Cheers, Richard. Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: Kal A. <ka...@te...> - 2005-03-03 16:22:24
|
Hi Richard, Thanks for the bug-fix. I'll get it into CVS ASAP! Cheers, Kal Richard Gregory wrote: >Hi > >Back in December I posted as question about a NullPointerException I was getting when trying to >call the getTopic() method of a MergedTopicSubjectClashException. If igured it was probably >something I was doing wrong. > >http://sourceforge.net/mailarchive/message.php?msg_id=10254897 > >I didn't get any answers then, and left it, as I could get around it by preventing the name based >merge with. > >myProperties.put("tm4j.name.based.merge","false"); > >I've been back and another look at it, and had a look at the code for this exception class, and I >think I found the problem. The addition of the lines "this.ti=t1; this.t2=t2;" into the code, as >below, sorts it out. > >public class MergedTopicSubjectClashException > extends TopicMapProcessingException { > Topic t1; > Topic t2; > > /** Constructs a new merged topic subject clash exception. > * > * @param t1 the first topic included in the failed merge operation. > * @param t2 the other topic included in the failed merge operation. > */ > public MergedTopicSubjectClashException(Topic t1, Topic t2) { > super("Attempted to merge two topics with different subjects,"); > this.t1 = t1; > this.t2 = t2; > } > > /** Retrieves the two topics involved in the failed merge operation. > * > * @param ret A placeholder array of topics to be filled with the two > * topics involved in the failed merge operation. Note that if > * this is <code>null</code> or an array holding less than > * two {@link Topic}s, a new array will be created in its place. > * @return An array containing the two {@link Topic}s involved in the > * failed merge operation. > */ > public Topic[] getTopics(Topic[] ret) { > if ((ret == null) || (ret.length < 2)) { > ret = new Topic[2]; > } > > //System.out.println("Getting clashed topics"); > ret[0] = t1; > ret[1] = t2; > > return ret; > } >} > >Cheers, > >Richard. > >Send instant messages to your online friends http://uk.messenger.yahoo.com > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Tm4j-users mailing list >Tm4...@li... >https://lists.sourceforge.net/lists/listinfo/tm4j-users > > > > |
From: Richard G. <ric...@ya...> - 2005-03-03 16:08:19
|
Hi Back in December I posted as question about a NullPointerException I was getting when trying to call the getTopic() method of a MergedTopicSubjectClashException. If igured it was probably something I was doing wrong. http://sourceforge.net/mailarchive/message.php?msg_id=10254897 I didn't get any answers then, and left it, as I could get around it by preventing the name based merge with. myProperties.put("tm4j.name.based.merge","false"); I've been back and another look at it, and had a look at the code for this exception class, and I think I found the problem. The addition of the lines "this.ti=t1; this.t2=t2;" into the code, as below, sorts it out. public class MergedTopicSubjectClashException extends TopicMapProcessingException { Topic t1; Topic t2; /** Constructs a new merged topic subject clash exception. * * @param t1 the first topic included in the failed merge operation. * @param t2 the other topic included in the failed merge operation. */ public MergedTopicSubjectClashException(Topic t1, Topic t2) { super("Attempted to merge two topics with different subjects,"); this.t1 = t1; this.t2 = t2; } /** Retrieves the two topics involved in the failed merge operation. * * @param ret A placeholder array of topics to be filled with the two * topics involved in the failed merge operation. Note that if * this is <code>null</code> or an array holding less than * two {@link Topic}s, a new array will be created in its place. * @return An array containing the two {@link Topic}s involved in the * failed merge operation. */ public Topic[] getTopics(Topic[] ret) { if ((ret == null) || (ret.length < 2)) { ret = new Topic[2]; } //System.out.println("Getting clashed topics"); ret[0] = t1; ret[1] = t2; return ret; } } Cheers, Richard. Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: George T. <geo...@fr...> - 2005-02-07 21:21:54
|
Hello all, I would like to inform you that our Topic Map editor at http://sourceforge.net/projects/atop has a new binary release. With our new project file (.atop), you will be able to connect with Ozone database (in addition to XTM files), you can also use TOLOG rules using (.tl) files (the editor accepts the // type comment for .tl files) and you can execute and store TOLOG queries. Screenshot of the editor is available at: http://users.otenet.gr/~orangino/atop/screen.jpg I would be glad to have your comments and suggestions. Thank you George Tryfon (TA-KT research group) ____________________________________________________________________ http://www.freemail.gr - δωρεάν υπηρεσία ηλεκτρονικού ταχυδρομείου. http://www.freemail.gr - free email service for the Greek-speaking. |
From: Felipe M. A. <fm...@er...> - 2005-01-30 22:04:09
|
Hello all: Could you help me with locators? How can I reference topics in other Topic Map? Locator base = miProvider.getLocatorFactory().createLocator("URI", "topicmapbase"); tmBBDD = miProvider.createTopicMap(base); Topic t1 = tmBBDD.createTopic("topicbase1"); Topic t2 = tmBBDD.createTopic("topicbase2"); t2.addType(t1); Locator locProyecto = miProvider.getLocatorFactory().createLocator("URI", anagrama); TopicMap tmProy = miProvider.createTopicMap(locProyecto); Topic tActual = tmProy.createTopic("Prueba"); tActual.addType(t1); <?xml version="1.0" encoding="UTF-8"?> <topicMap id="x1kigidtb7-0" xml:base="topicmapbase" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink"> <topic id="topicbase1"/> <topic id="topicbase2"> <instanceOf> <topicRef xlink:href="#topicbase1"/> </instanceOf> </topic> </topicMap> <?xml version="1.0" encoding="UTF-8"?> <topicMap id="x1kigidtb7-1" xml:base="proyectoxxx" xmlns="http://www.topicmaps.org/xtm/1.0/" xmlns:xlink="http://www.w3.org/1999/xlink"> <topic id="Prueba"> <instanceOf> <topicRef xlink:href="#topicbase1"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="kkk"/> </subjectIdentity> </topic> </topicMap> and I want: <topic id="Prueba"> <instanceOf> <topicRef xlink:href="topicmapbase#topicbase1"/> </instanceOf> <subjectIdentity> <subjectIndicatorRef xlink:href="kkk"/> </subjectIdentity> </topic> I'am using tm4j-0.9.7 and hibernate backend. Thanks in advance. Felipe |
From: Kal A. <ka...@te...> - 2005-01-21 11:40:37
|
Hi Richard, I think that could be the problem - I'll take a look into it. Thanks for the bug report! Cheers, Kal On 20 Jan 2005, at 13:33, Richard Gregory wrote: > Hi again, > > Well, I got the FullTextSearch example working. I needed to insert the > following lines > > Properties props = new Properties(); > props.put("OPT_LUCENE_ANALYZER", > "org.tm4j.topicmap.index.lucene.analyzer"); > map.getIndexManager().registerIndexProvider(new > LuceneFullTextIndexProvider(props)); > > before the following line in the FullTextSearch() method. > > index = > (FullTextIndex)map.getIndexManager().getIndex(FullTextIndex.class); > > I'm just creating the index in memory, so I haven't set the > OPT_LUCENE_DIR property. > > However, what is still confusing me, i is that if I now call the > index.isOpen() method to it > returns 'true', but, unless I explicity call either the index.open() > or index.reindex() methods, I > still get a NullPointerException (stack trace below) when I try to use > the index with the line: > > QueryResult result = index.findByText(query, false); > > Exception in thread "main" java.lang.NullPointerException > at > org.apache.lucene.store.RAMInputStream.<init>(RAMDirectory.java:237) > at > org.apache.lucene.store.RAMDirectory.openFile(RAMDirectory.java:199) > at > org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:72) > at > org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:116) > at org.apache.lucene.store.Lock$With.run(Lock.java:148) > at > org.apache.lucene.index.IndexReader.open(IndexReader.java:111) > at > org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:80) > at > org.tm4j.topicmap.index.text.LuceneIndexBase.findByText(LuceneIndexBase > .java:113) > at > mips.genre.topicmaps.FullTextSearch.go(FullTextSearch.java:130) > at > mips.genre.topicmaps.FullTextSearch.main(FullTextSearch.java:96) > > > I'm note quite sure what's happening, but from looking at the > findByText() method in the > LuceneIndexBase class source, I would expect to get the message below > rather than a > NullPointerException > > if (dir == null) { > throw new IndexException( > "FullText index not created. Call open before usage"); > } > > Maybe the test 'if (dir == null)' which is also used in the > index.isOpen() method, isn't working > properly to check whether the index is open? > > Cheers, > > Richard. > > > --- Richard Gregory <ric...@ya...> wrote: >> Hi, >> >> I've been trying to run the full text search example provided with >> TM4J with one of my topic >> maps, >> but I just get a NullPointerException from the following line in the >> go() method: >> >> QueryResult result = index.findByText(query, false); >> >> The string that I'm searching for is the basename of a topic, which >> is successfully found by the >> BaseNameDataIndex search, so I know it is in the topic map. >> >> If anyone has any ideas what is going wrong I'd be grateful. >> >> Cheers, >> >> Richard. >> >> >> >> >> >> >> >> >> ___________________________________________________________ >> ALL-NEW Yahoo! Messenger - all new features - even more fun! >> http://uk.messenger.yahoo.com >> >> >> ------------------------------------------------------- >> The SF.Net email is sponsored by: Beat the post-holiday blues >> Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. >> It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt >> _______________________________________________ >> Tm4j-users mailing list >> Tm4...@li... >> https://lists.sourceforge.net/lists/listinfo/tm4j-users >> > > > > > > > > > > > ___________________________________________________________ > ALL-NEW Yahoo! Messenger - all new features - even more fun! > http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting > Tool for open source databases. Create drag-&-drop reports. Save time > by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. > Download a FREE copy at http://www.intelliview.com/go/osdn_nl > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Richard G. <ric...@ya...> - 2005-01-20 13:33:42
|
Hi again, Well, I got the FullTextSearch example working. I needed to insert the following lines Properties props = new Properties(); props.put("OPT_LUCENE_ANALYZER", "org.tm4j.topicmap.index.lucene.analyzer"); map.getIndexManager().registerIndexProvider(new LuceneFullTextIndexProvider(props)); before the following line in the FullTextSearch() method. index = (FullTextIndex)map.getIndexManager().getIndex(FullTextIndex.class); I'm just creating the index in memory, so I haven't set the OPT_LUCENE_DIR property. However, what is still confusing me, i is that if I now call the index.isOpen() method to it returns 'true', but, unless I explicity call either the index.open() or index.reindex() methods, I still get a NullPointerException (stack trace below) when I try to use the index with the line: QueryResult result = index.findByText(query, false); Exception in thread "main" java.lang.NullPointerException at org.apache.lucene.store.RAMInputStream.<init>(RAMDirectory.java:237) at org.apache.lucene.store.RAMDirectory.openFile(RAMDirectory.java:199) at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:72) at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:116) at org.apache.lucene.store.Lock$With.run(Lock.java:148) at org.apache.lucene.index.IndexReader.open(IndexReader.java:111) at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:80) at org.tm4j.topicmap.index.text.LuceneIndexBase.findByText(LuceneIndexBase.java:113) at mips.genre.topicmaps.FullTextSearch.go(FullTextSearch.java:130) at mips.genre.topicmaps.FullTextSearch.main(FullTextSearch.java:96) I'm note quite sure what's happening, but from looking at the findByText() method in the LuceneIndexBase class source, I would expect to get the message below rather than a NullPointerException if (dir == null) { throw new IndexException( "FullText index not created. Call open before usage"); } Maybe the test 'if (dir == null)' which is also used in the index.isOpen() method, isn't working properly to check whether the index is open? Cheers, Richard. --- Richard Gregory <ric...@ya...> wrote: > Hi, > > I've been trying to run the full text search example provided with TM4J with one of my topic > maps, > but I just get a NullPointerException from the following line in the go() method: > > QueryResult result = index.findByText(query, false); > > The string that I'm searching for is the basename of a topic, which is successfully found by the > BaseNameDataIndex search, so I know it is in the topic map. > > If anyone has any ideas what is going wrong I'd be grateful. > > Cheers, > > Richard. > > > > > > > > > ___________________________________________________________ > ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com |
From: Richard G. <ric...@ya...> - 2005-01-17 16:14:43
|
Hi, I've been trying to run the full text search example provided with TM4J with one of my topic maps, but I just get a NullPointerException from the following line in the go() method: QueryResult result = index.findByText(query, false); The string that I'm searching for is the basename of a topic, which is successfully found by the BaseNameDataIndex search, so I know it is in the topic map. If anyone has any ideas what is going wrong I'd be grateful. Cheers, Richard. ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com |
From: Kal A. <ka...@te...> - 2005-01-12 16:59:24
|
Hi Richard, You don't need the curly braces there in the rule. Does it parse ok with the braces removed ? Cheers, Kal On 12 Jan 2005, at 12:40, Richard Gregory wrote: > Hi, > > I have the following code which adds a tolog rule and then executes a > query using that rule, based > on example 8.2 of the tm4j development guide. > > queryEval.addRule( > "func-loc($PROTEIN, $LOCATION, $FUNCTION) :- { " + > "at-located-in($LOCATION : tt-loc, $PROTEIN : tt-protein), " + > "at-has-function($FUNCTION : tt-function, $PROTEIN : tt-protein) }."); > > > TologResultsSet results = queryEval.execute( > "select $PROTEIN, $FUNCTION, $LOCATION from { " + > "topic-name($FUNCTION, $FUNCTION_NAME), " + > "value($FUNCTION_NAME, \"11.06.01 rRNA modification\"), " + > "topic-name($LOCATION, $LOCATION_NAME), " + > "value($LOCATION_NAME, \"70.10.07 nucleolus\"), " + > "func-loc($PROTEIN, $LOCATION, $FUNCTION) } " + > "order by $PROTEIN? "); > > However, when I run the code I get a TologParserException message, > suggesting that it doesn't like > the closing '}' in my rule. > > Exception caught: org.tm4j.tologx.TologParserException: Parser error > in rule string. > org.tm4j.tologx.TologParserException: Parser error in rule string. > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.ja > va:136) > at mips.genre.topicmaps.TologTests.main(TologTests.java:71) > Caused by: line 1:169: unexpected token: } > at > org.tm4j.tologx.parser.TologParser.orclause(TologParser.java:828) > at > org.tm4j.tologx.parser.TologParser.clause(TologParser.java:729) > at > org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) > at > org.tm4j.tologx.parser.TologParser.rule(TologParser.java:314) > at > org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.ja > va:132) > > I also tried using the addRulesModule() method, but I get the same > exception generated by the same > part of the rule. > > I anyone can tell me where I'm going wrong here (as I'm sure it's > something I'm doing wrong), I'd > be grateful. > > Cheers, > > Richard. > > > > > > > ___________________________________________________________ > ALL-NEW Yahoo! Messenger - all new features - even more fun! > http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > > |
From: Richard G. <ric...@ya...> - 2005-01-12 16:43:01
|
To answer my own question, I simply had to delete the braces "}" from my query and rule and it solved that problem. I also had to use replacement values, rather than having topic names, such as \"11.06.01 rRNA modification\", in my query, as the escaped double quote gave me the same error. This particular query runs fine now, and I now what to do in the future. What seemed strange, and had me really confused, was that it was only the closing brace "}", rather than the opening brace earlier in the rule which was giving me the exception. I still don't know why that was. Cheers, Richard. --- Richard Gregory <ric...@ya...> wrote: > Hi, > > I have the following code which adds a tolog rule and then executes a query using that rule, > based > on example 8.2 of the tm4j development guide. > > queryEval.addRule( > "func-loc($PROTEIN, $LOCATION, $FUNCTION) :- { " + > "at-located-in($LOCATION : tt-loc, $PROTEIN : tt-protein), " + > "at-has-function($FUNCTION : tt-function, $PROTEIN : tt-protein) }."); > > > TologResultsSet results = queryEval.execute( > "select $PROTEIN, $FUNCTION, $LOCATION from { " + > "topic-name($FUNCTION, $FUNCTION_NAME), " + > "value($FUNCTION_NAME, \"11.06.01 rRNA modification\"), " + > "topic-name($LOCATION, $LOCATION_NAME), " + > "value($LOCATION_NAME, \"70.10.07 nucleolus\"), " + > "func-loc($PROTEIN, $LOCATION, $FUNCTION) } " + > "order by $PROTEIN? "); > > However, when I run the code I get a TologParserException message, suggesting that it doesn't > like > the closing '}' in my rule. > > Exception caught: org.tm4j.tologx.TologParserException: Parser error in rule string. > org.tm4j.tologx.TologParserException: Parser error in rule string. > at org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.java:136) > at mips.genre.topicmaps.TologTests.main(TologTests.java:71) > Caused by: line 1:169: unexpected token: } > at org.tm4j.tologx.parser.TologParser.orclause(TologParser.java:828) > at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:729) > at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) > at org.tm4j.tologx.parser.TologParser.rule(TologParser.java:314) > at org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.java:132) > > I also tried using the addRulesModule() method, but I get the same exception generated by the > same > part of the rule. > > I anyone can tell me where I'm going wrong here (as I'm sure it's something I'm doing wrong), > I'd > be grateful. > > Cheers, > > Richard. > > > > > > > ___________________________________________________________ > ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users > ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com |
From: Richard G. <ric...@ya...> - 2005-01-12 12:40:56
|
Hi, I have the following code which adds a tolog rule and then executes a query using that rule, based on example 8.2 of the tm4j development guide. queryEval.addRule( "func-loc($PROTEIN, $LOCATION, $FUNCTION) :- { " + "at-located-in($LOCATION : tt-loc, $PROTEIN : tt-protein), " + "at-has-function($FUNCTION : tt-function, $PROTEIN : tt-protein) }."); TologResultsSet results = queryEval.execute( "select $PROTEIN, $FUNCTION, $LOCATION from { " + "topic-name($FUNCTION, $FUNCTION_NAME), " + "value($FUNCTION_NAME, \"11.06.01 rRNA modification\"), " + "topic-name($LOCATION, $LOCATION_NAME), " + "value($LOCATION_NAME, \"70.10.07 nucleolus\"), " + "func-loc($PROTEIN, $LOCATION, $FUNCTION) } " + "order by $PROTEIN? "); However, when I run the code I get a TologParserException message, suggesting that it doesn't like the closing '}' in my rule. Exception caught: org.tm4j.tologx.TologParserException: Parser error in rule string. org.tm4j.tologx.TologParserException: Parser error in rule string. at org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.java:136) at mips.genre.topicmaps.TologTests.main(TologTests.java:71) Caused by: line 1:169: unexpected token: } at org.tm4j.tologx.parser.TologParser.orclause(TologParser.java:828) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:729) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:437) at org.tm4j.tologx.parser.TologParser.rule(TologParser.java:314) at org.tm4j.tologx.memory.QueryEvaluatorImpl.addRule(QueryEvaluatorImpl.java:132) I also tried using the addRulesModule() method, but I get the same exception generated by the same part of the rule. I anyone can tell me where I'm going wrong here (as I'm sure it's something I'm doing wrong), I'd be grateful. Cheers, Richard. ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com |
From: thomas <th...@st...> - 2005-01-05 21:05:58
|
hi, when trying to run runtmed.sh i get the following response (see below). it's mac os x 10.3.7, java 1.4.2 and the environment variables are set. does anyone have an idea? thanks, thomas mayfield:~/desktop thomas$ tm4l/runtmed.sh Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -jvm is a synonym for the "client" VM [deprecated] -hotspot is a synonym for the "client" VM [deprecated] The default VM is client. -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specified version to run -showversion print product version and continue -jre-restrict-search | -jre-no-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions -da[:<packagename>...|:<classname>] -disableassertions[:<packagename>...|:<classname>] disable assertions -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions --On Wednesday, January 5, 2005 1:12 PM -0500 "Dicheva, Darina" <dic...@ws...> wrote: > Hello all, > > We are developing a topic map editor for creating/structuring learning > resources (the Topic Maps for eLearning project - > http://gorams.wssu.edu/faculty/dichevad/iis/NSDL-home.htm). The editor > is based on TM4J. The work is still in progress, however, we released an > early binary distribution for trial and evaluation. You can download > our trial version from > http://www.wssu.edu/~dicheva/TopicMaps/tm4l_download.htm. > > We will appreciate any comments and suggestions. > > We would like to thank Kal for his support: > Kal, thanks a lot, you are amazing! We appreciate your willigness to > help, your availablility, and the promptness of your replies. > > Darina & Christo > > ------------------------------------------------------------------------ > - > Darina Dicheva > Winston-Salem State University > Department of Computer Science > 601 Martin Luther King, Jr. Drive > Winston Salem, N.C. 27110 > Phone: (336) 750-2484 Fax: (336) 750-2499 > Email: dic...@ws... > URL: http://www.wssu.edu/~dicheva > > Visit: > 2nd International Workshop on Applications of Semantic Web Technologies > for E-Learning > (http://www.win.tue.nl/~laroyo/SW-EL04/) > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Tm4j-users mailing list > Tm4...@li... > https://lists.sourceforge.net/lists/listinfo/tm4j-users ciao thomas th...@st... |
From: Lars H. <he...@se...> - 2005-01-05 18:28:46
|
Hi Darina, [...] > http://gorams.wssu.edu/faculty/dichevad/iis/NSDL-home.htm). The editor > is based on TM4J. The work is still in progress, however, we released an [...] > We will appreciate any comments and suggestions. Not directly related to the editor itself, but one question/suggestion: Are you using the TM4J API or TMAPI (http://tmapi.org/ ). Would be great if you're using TMAPI or switch to TMAPI (if it is not too late), because the editor would run with every TM processor that supports TMAPI and we'd have a first real application that uses TMAPI. :) Best regards, Lars |
From: Dicheva, D. <dic...@ws...> - 2005-01-05 18:12:54
|
Hello all, We are developing a topic map editor for creating/structuring learning resources (the Topic Maps for eLearning project - http://gorams.wssu.edu/faculty/dichevad/iis/NSDL-home.htm). The editor is based on TM4J. The work is still in progress, however, we released an early binary distribution for trial and evaluation. You can download our trial version from http://www.wssu.edu/~dicheva/TopicMaps/tm4l_download.htm. We will appreciate any comments and suggestions. We would like to thank Kal for his support: Kal, thanks a lot, you are amazing! We appreciate your willigness to help, your availablility, and the promptness of your replies.=20 Darina & Christo ------------------------------------------------------------------------ - Darina Dicheva Winston-Salem State University =09 Department of Computer Science =09 601 Martin Luther King, Jr. Drive =09 Winston Salem, N.C. 27110 =09 Phone: (336) 750-2484 Fax: (336) 750-2499 Email: dic...@ws... =09 URL: http://www.wssu.edu/~dicheva Visit: 2nd International Workshop on Applications of Semantic Web Technologies for E-Learning (http://www.win.tue.nl/~laroyo/SW-EL04/) =09 |
From: Lars H. <tm...@qu...> - 2004-12-28 12:35:43
|
Hi George, I try to answer your bug report here. > Summary: TMAPI "features" [...] > propsprops.setProperty > ("http://tmapi.org/features/readOnly", > "true"); > mapFeatures.put > ("http://tmapi.org/features/readOnly", Boolean.TRUE); > TMAPITopicMapSystemImpl tmApiSystImpl = new > TMAPITopicMapSystemImpl > (providerFactory.getClass().getName(), props, mapFeatures); This is not the way how you should work with TMAPI. You've to create an instance of the TopicMapSystemFactory first. import org.tmapi.core.*; TopicMapSystem tmSys = null; TopicMapSystemFactory tmSysFac = TopicMapSystemFactory.newInstance(); try { tmSysFac.setFeature("http://tmapi.org/features/readOnly", true); tmSys = tmSysFac.newTopicMapSystem(); catch (TMAPIException ex) { // Do something useful here. } It is a bad thing to use the TMAPITopicMapSystemImpl directly, because you cannot switch between the underlying topicmap processor and the one goal of TMAPI goes away. > URI uri = ... > InputStream is = uri.toURL().openStream (); > TopicMap tm = OpenXtmSupport.readXtm (is, [...] Here you've switched to the TM4J API again. You should not do it. You should only use the TMAPI. IMO the failure that the TopicMapSystem does not throw an UnsupportedOperationException if you try to change the readOnly TopicMapSystem instance goes back to the switching between TM4J API and TMAPI. You should only use TMAPI interfaces and not work with the wrapped TM4J objects directly (or if you have to work with them, do it carefully and only if really necessary). IMO the bug, that no exception is thrown if the TopicMapSystem is read only was fixed in 0.98 (Look into the source of the TMAPI objects, there must be something like a call to "checkIfReadOnly()" or something like that). > but still I don't get Exception when I change the TopicMap. > also I can't merge without TopicName (they merge > TopicNames) I'm not sure but I think disabling merging by TopicName is not supported by TM4J... . Best regards, Lars |