Florian Kleedorfer
2017-02-22 18:04:14 UTC
Hi!
I am trying to use schemagen (jena 2.12.1) on three ontologies found
here: http://ontology.tno.nl/
namely
a) http://ontology.tno.nl/logico.ttl,
b) http://ontology.tno.nl/logiserv.ttl
c) http://ontology.tno.nl/transport.ttl
using these options (through maven in the example below, but I get the
same results from the command line)
-i [file] \
-e TTL \
--package won.transport.ont \
-o ${project.build.directory}/generated-sources/java \
-n [classname]
With these settings, no object properties are to be found in the
resulting files, which is not what I want.
If I add the '--inference' option, generating the class works for c) and
I get the properties - but neither for a) nor b): in both cases, the
program seems to hang, probably indefinitely. I thread-debugged and it
seems to me that the program hangs in the writeRDFProperties() method
(schemagen:926 in jena 2.12.1) - iterating over the statements iterator
never ends. Code execution hangs in the loop in
com.hp.hpl.jena.reasoner.rulesys.impl.LPBRuleEngine#pump (line 304).
There are 3 generators in the collection called 'batch', and their ready
flag never seems to change to true.
I tried to load the ontology files using a normal OntModel with the same
Reasoner that is used by schemagen( OWL_MEM_RULE_INF) and I can print
out the model after reasoning (which I suspect should do the same as
above: iterating over the statements in the model).
Using binary search (deleting the bottom half of the logico.ttl file
until schemagen would not show this behaviour any more) I found that in
this part
https://gist.github.com/fkleedorfer/866e0bdfb90a1621a865c5879c02a734
(original file until line 191), the problem still persists, but if the
last restriction is removed, the problem goes away (of course, not
leaving me with any useful result).
Any help is appreciated, thanks in advance!
Best
Florian
I am trying to use schemagen (jena 2.12.1) on three ontologies found
here: http://ontology.tno.nl/
namely
a) http://ontology.tno.nl/logico.ttl,
b) http://ontology.tno.nl/logiserv.ttl
c) http://ontology.tno.nl/transport.ttl
using these options (through maven in the example below, but I get the
same results from the command line)
-i [file] \
-e TTL \
--package won.transport.ont \
-o ${project.build.directory}/generated-sources/java \
-n [classname]
With these settings, no object properties are to be found in the
resulting files, which is not what I want.
If I add the '--inference' option, generating the class works for c) and
I get the properties - but neither for a) nor b): in both cases, the
program seems to hang, probably indefinitely. I thread-debugged and it
seems to me that the program hangs in the writeRDFProperties() method
(schemagen:926 in jena 2.12.1) - iterating over the statements iterator
never ends. Code execution hangs in the loop in
com.hp.hpl.jena.reasoner.rulesys.impl.LPBRuleEngine#pump (line 304).
There are 3 generators in the collection called 'batch', and their ready
flag never seems to change to true.
I tried to load the ontology files using a normal OntModel with the same
Reasoner that is used by schemagen( OWL_MEM_RULE_INF) and I can print
out the model after reasoning (which I suspect should do the same as
above: iterating over the statements in the model).
Using binary search (deleting the bottom half of the logico.ttl file
until schemagen would not show this behaviour any more) I found that in
this part
https://gist.github.com/fkleedorfer/866e0bdfb90a1621a865c5879c02a734
(original file until line 191), the problem still persists, but if the
last restriction is removed, the problem goes away (of course, not
leaving me with any useful result).
Any help is appreciated, thanks in advance!
Best
Florian