From: SourceForge.net <no...@so...> - 2005-02-02 13:24:17
|
Bugs item #1114721, was opened at 2005-02-02 15:22 Message generated for change (Settings changed) made by gtryfon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1114721&group_id=27895 Category: In-Memory Impl Group: TM4J 0.9.7 Status: Open Resolution: None Priority: 5 Submitted By: George Tryfon (gtryfon) >Assigned to: Kal Ahmed (kal_ahmed) Summary: query with Association type Initial Comment: Hello, I am using XTM and TMAPI, but I call Tolog queries with TM4J When I call a tolog query, let's say: aType($T:$TType)? and there is no "aType" topic, I receive the following Exception: org.tm4j.tologx.TologParserException: Unable to create a new dynamic association predicate from class org.tm4j.tologx.predicates.DynamicAssociationPredicate. at org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1034) at org.tm4j.tologx.parser.TologParser.clause(TologParser.java:800) at org.tm4j.tologx.parser.TologParser.clauselist(TologParser.java:451) at org.tm4j.tologx.parser.TologParser.query(TologParser.java:512) at org.tm4j.tologx.memory.QueryEvaluatorImpl.prepareQuery(QueryEvaluatorImpl.java:152) at org.tm4j.tologx.memory.QueryEvaluatorImpl.execute(QueryEvaluatorImpl.java:166) at org.atop.ui.tolog.AtopQueryAndResults.getTologResultsSet(AtopQueryAndResults.java:145) at org.atop.ui.tolog.AtopQueryAndResults.execute(AtopQueryAndResults.java:115) at org.atop.ui.tolog.PanQueryEdit.actionPerformed(PanQueryEdit.java:83) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3093) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1766) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Caused by: org.tm4j.tologx.TologParserException: No object in topic map with source locator /c:/documents%20and%20settings/administrator/τα%20έγγραφά%20μου/topicmaps/occur.xtm#aType4 at org.tm4j.tologx.parser.TologParser.getObjectByIdent(TologParser.java:125) at org.tm4j.tologx.parser.TologParser.predclause(TologParser.java:1032) ... 32 more When I open a Topic Map that contains an "aType" topic but not as an "Association Type", the query gives me an empty result. (I like this more) When I open a Topic Map that contains an "aType" topic that is also an "Association Type", I get the correct result. Now, when I have a topic map without an "aType" topic If I create the "aType" and then call the query, the query gives me the first Exception!. Even if I create an "Association" with "Association Type" the "aType", the query continues to give me the first Exception!. The query "topic($T)?" shows to me that the "aType" topic is there. I need to save and re-load the topic map (I use XTM) in order for the query to work. I created the "aType" with both the two ways String id = txtID.getText().trim (); if (id.length() > 0) { org.tm4j.topicmap.TopicMap _tm = Wrapper.unwrap (tm); org.tm4j.topicmap.Topic _t = _tm.createTopic (id); t = Wrapper.wrap (_t, (TMAPITopicMapImpl)tm); } else t = tm.createTopic (); Thank you George Tryfon (TA-KT research group) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1114721&group_id=27895 |