From: Lars H. <he...@se...> - 2006-02-07 12:36:58
|
Hi Thomas, [...] > I tried another example from Ontopia's predicate reference, which should do > exactly what I want: > select $T from topic($T),source-locator($T,s"mybase#myid")? I suspect that this is a valid example. s"something" refers to a topic map construct and this shouldn't be a valid input for the source-locator predicate. [...] > But again I get 0 results with TM4J-Tolog... Is there any other way of > finding a topic by a given id or source locator? (It works if I use the Java > API, but I need to use Tolog in this case.) I identified the problem: All predicates that are able to handle URIs (such as baselocator, subject-identifier, subject-locator, source-locator) check if the URI part is a Locator instance. But this condition never evaluates to true because the TologParser never creates Locator instances as input for predicates. They should check for a String instance instead of a Locator instance. And all results they produce should also be String instances (Locator.getAddress()) instead of the Locator object instances. But that does not solve the whole problem, because the TologParser does not handle URIs / Strings as input very well. This needs also be fixed. In short: There is no way to fecth an object by its item identifier, subject identifier, or subject locator until the parser and predicates are fixed. I'll provide some patches in the next few days. Best regards, Lars -- http://semagia.com |