exported predicate for translating an existing rdf_db into owl

3 views
Skip to first unread message

Chris Mungall

unread,
Nov 14, 2010, 2:46:56 PM11/14/10
to thea-o...@googlegroups.com

I'm writing hooks for Clio that make use of thea. I'm adding a menu option for translating an existing rdf_db into owl. owl2_from_rdf currently allows you to call the full cycle - load into rdf, translate to owl - but not fine grained control of the last step. What's your recommendations here?

Vangelis

unread,
Nov 17, 2010, 7:03:14 AM11/17/10
to thea-owl-lib
Adding more fine grained predicates is not a bad idea.
In fact in owl_parse/4 there were 2 'complete' options, 1 for removing
all rdf_db triples before parsing and the other for removing the owl/
4.
so e.g. (if I remeber correctly)
false, true means keep all rdf/4 but wipe out all owl/4 but
false, false means incrementally load files (this will lead to
duplicates)
etc.

This comes from thea1 already and I'm not sure if it is bug-free since
int thea2 we re-wrote the load - import mechanism.
I know though that incremental loading ontologies work (I've used it
in Topos).

Unfortunately I don't have much time currenlty, expect to be more
available around end November.

Chris Mungall

unread,
Nov 17, 2010, 2:25:52 PM11/17/10
to thea-o...@googlegroups.com

One way to do it now would be to call owl_parse/4 with a dummy URL and RDF_Load_Mode = false, OWL_Parse_Mode=true -- but this is not very satisfactory

Actually I think it should be easy. I'll add a new predicate called something like

%% ranslate_rdf_db(+IRI)
% translates a graph in current rdf_db instance into an owl2_model.pl set of facts.
% assumes that IRI has already been loaded using the semweb package
translate_rdf_db(IRI) :-
rdf_2_owl,
owl2_model_init,
owl_canonical_parse_3(IRI).

Chris Mungall

unread,
Nov 17, 2010, 5:40:23 PM11/17/10
to thea-o...@googlegroups.com

As, I see there is already rdf_db_to_owl/1

Going in the reverse direction is trickier. If I have n owl ontologies in memory and I want to synchronize this with rdf_db make n rdf graphs then we need a new predicate.

This is hard because currently rdf_assert/3 is used, which places everything to the 'user' graph.

I think for now I will implement a workaround, that iterates over ontology/1, generates an rdf_db in user, copies that graph to the current base uri, ....

Reply all
Reply to author
Forward
0 new messages