Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tm:subject[. isa tm:name] delivers no result #56

Open
GoogleCodeExporter opened this issue Jun 1, 2015 · 2 comments
Open

tm:subject[. isa tm:name] delivers no result #56

GoogleCodeExporter opened this issue Jun 1, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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 [email protected] on 2 May 2011 at 12:36

@GoogleCodeExporter
Copy link
Author

No, tm:subject is a concept of topics, and cannot deliver name objects or 
anything else

Original comment by [email protected] on 12 May 2011 at 4:16

@GoogleCodeExporter
Copy link
Author

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 [email protected] on 14 May 2011 at 12:58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant