This content has been marked as final.
Show 21 replies
-
15. Re: is it possible to query anonymous classes in oracle sem. tech.?
alwu-Oracle Mar 26, 2013 2:00 AM (in response to user571093)Hi,
Just so that I understand your problem. Are you saying that if you run the above Java code TestForum2512650, you will
get the following output?
Asserted triples count: 0
Thanks,
Zhe -
16. Re: is it possible to query anonymous classes in oracle sem. tech.?
user571093 Mar 26, 2013 2:22 AM (in response to alwu-Oracle)hi zhe,
running your code in the post and got the result saying:
Asserted triples count: 293
but after I checked the table in my database, I got nothing loaded in. thanks.
hong -
17. Re: is it possible to query anonymous classes in oracle sem. tech.?
alwu-Oracle Mar 26, 2013 4:42 AM (in response to user571093)Hi Hong,1 person found this helpful
Just add a "model.close();" before the end of the main method. It will commit the transaction for you.
Then if you login to SQLPlus, you will see something like:
SQL>
SQL> select count(1) from model91_tpl;
COUNT(1)
----------
306
SQL> select count(1) from mdsys.rdfm_model91;
COUNT(1)
----------
293
Zhe -
18. Re: is it possible to query anonymous classes in oracle sem. tech.?
user571093 Mar 26, 2013 6:01 AM (in response to alwu-Oracle)hi zhe,
excellent! it works. the triples are loaded and I can query the loaded triples. thanks a lot for your help.
hong -
19. Re: is it possible to query anonymous classes in oracle sem. tech.?
user571093 Mar 26, 2013 6:09 AM (in response to user571093)hi zhe,
what's wrong with the code in the dev. guide which can load the triples but cannot query them? is it the problem in the code which you didn't include in your new code:
OutputStream os = new FileOutputStream("./univ-bench2.nt");
model.write(os, "N-TRIPLE");
os.close();
-----------------------------------------------------------
OracleUtils.dropSemanticModel(oracle, szModelName);
------------------------------------------------------------
hong -
20. Re: is it possible to query anonymous classes in oracle sem. tech.?
alwu-Oracle Mar 26, 2013 3:33 PM (in response to user571093)Hi Hong,1 person found this helpful
I am not sure what you meant by "cannot query." That qexec.execSelect() API call returned results, right?
The following code in the example is to clean things up. You don't want this for your application.
OracleUtils.dropSemanticModel(oracle, szModelName);
Thanks,
Zhe -
21. Re: is it possible to query anonymous classes in oracle sem. tech.?
user571093 Mar 26, 2013 11:54 PM (in response to alwu-Oracle)hi zhe,
I mean the code for automatic loading ontology into the table provided in jena examples in the dev. guide. it can load the ontology into a table. but the query won't return results to me. in contrast, the new code you put in the previous posts can load ontology and the same query also can return the correct results to me. good work. thanks a lot for help.
hong