tm:subject[. isa tm:name] delivers no result
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
Input:
topic
- "Name";.
Query:
// tm:subject[. isa tm:name]
Result:
[]
Expected:
[<item-which-represents-the-topic-name]
Original issue reported on code.google.com by lars.he...@gmail.com
on 2 May 2011 at 12:36
Google Code Exporter commented
No, tm:subject is a concept of topics, and cannot deliver name objects or
anything else
Original comment by Sven.Kro...@googlemail.com
on 12 May 2011 at 4:16
Google Code Exporter commented
I think that's wrong
(a) //tm:subject / tm:subject [. isa tm:name]
(b) //tm:subject / tm:name
(a) and (b) should deliver the same results. (b) works with TMQL4J, (a) doesn't.
"tm:subject" is a kind of wildcard since everything is an instance of
tm:subject, so (a) should effectively do something like this:
for topic in topicmap.getTopics():
for child in topic.getChildren():
if (child instanceof tm:subject) and (child instanceof tm:name):
yield child
The query optimizer may remove the "child instanceof tm:subject" check since
everything is an instance of tm:subject, though.
Original comment by lars.he...@gmail.com
on 14 May 2011 at 12:58