owlcs/owlapi

Complex DL Query

Closed this issue · 1 comments

Hello all,

I would like to modify this example [DLQueryExample.java]
(https://github.com/owlcs/owlapi/blob/version5/contract/src/test/java/org/semanticweb/owlapi/examples/DLQueryExample.java) to query more complex class expressions. The below output illustrates the faced issue.


QUERY: Female

SuperClasses......................................

Person

EquivalentClasses.................................

[NONE]

SubClasses........................................

Sister
Grandmother
Daughter
Granddaughter
Mother

Instances.........................................

F2F28
F2F24
F2F26
F10F181
F10F186
F2F22
F10F185
F10F189
F6F72
F6F70
F9F140
F9F141
F9F143
F9F145
F9F148
F2F38
F4F58
F7F129
F2F36
F4F55
F2F30
F10F172
F10F175
F2F33
F6F79
F10F174
F4F56
F10F177
F6F76
F6F77
F10F179
F6F74
F6F83
F6F84
F6F82
F9F150
F7F126
F9F152
F9F154
F7F127
F9F156
F7F121
F7F124
F9F158
F6F89
F6F87
F10F201
F10F200
F6F86
F6F94
F6F93
F6F91
F6F101
F6F96
F6F97
F5F61
F3F46
F3F49
F3F48
F3F42
F5F67
F5F65
F5F62
F3F41
F7F119
F7F118
F3F53
F3F52
F9F160
F9F164
F7F114
F9F163
F7F116
F9F168
F7F111
F9F169
F2F17
F2F19
F10F191
F7F108
F2F12
F10F193
F2F14
F2F15
F10F192
F10F195
F8F133
F2F10
F8F137
F10F198
F8F135
F1F7
F7F103
F7F106
F7F105
F1F5
F1F3
F1F2

Please type a class expression in Manchester Syntax and press Enter (or press x to exit):

Sister


QUERY: Sister

SuperClasses......................................

Female
PersonWithASibling

EquivalentClasses.................................

[NONE]

SubClasses........................................

Nothing

Instances.........................................

F2F28
F7F119
F7F118
F10F181
F2F26
F3F53
F10F186
F6F87
F10F201
F3F52
F6F86
F6F94
F9F164
F9F141
F9F143
F9F145
F9F148
F2F17
F2F19
F7F108
F10F193
F2F36
F3F49
F10F192
F2F15
F10F195
F10F175
F2F33
F6F79
F10F177
F6F77
F6F96
F5F62
F10F179
F6F97
F6F84
F1F7
F9F150
F7F106
F7F127
F1F5
F7F121

Please type a class expression in Manchester Syntax and press Enter (or press x to exit):

Female AND Sister


QUERY: Female AND Sister

SuperClasses......................................

[NONE]

EquivalentClasses.................................

[NONE]

SubClasses........................................

[NONE]

Instances.........................................

[NONE]

Thank you

I haven't seen the comment in the code :)
Adding HermiT did the work