Permalink
Browse files

BaseURI+ compatible with SWI 5.10.x

New version of owl2_rl_rules(2)
  • Loading branch information...
1 parent 1ba0f39 commit bc9e86360b0812436454ca263d14ba8ade1c2778 Vangelis Vassiliadis committed May 5, 2010
Showing with 587 additions and 4 deletions.
  1. +5 −4 owl2_from_rdf.pl
  2. +14 −0 owl2_from_rdf.txt
  3. +568 −0 owl2_rl_rules2.pl
View
@@ -313,15 +313,16 @@
rdf_load_stream(RURL,Ontology,BaseURI,Imports).
rdf_load_stream(URL,Ontology,BaseURI,Imports) :-
+ BaseURI = URL,
( sub_string(URL,0,4,_,'http')
-> catch((http_open(URL,RDF_Stream,[]),
- rdf_load(RDF_Stream,[if(true),base_uri(BaseURI),blank_nodes(noshare),
- result(Action, Triples, MD5),register_namespaces(true)]),
- debug(owl_parser,' Loaded ~w stream: ~w Action: ~w Triples:~w MD5: ~w',[URL,RDF_Stream,Action,Triples,MD5]),
+ rdf_load(RDF_Stream,[if(true),base_uri(BaseURI),blank_nodes(noshare),
+ result(Action, Triples, MD5),register_namespaces(true)]),
+ debug(owl_parser,' Loaded ~w stream: ~w Action: ~w Triples:~w MD5: ~w',[URL,RDF_Stream,Action,Triples,MD5]),
close(RDF_Stream)),
Message,
throw(io_error(URL,'rdf_load/2 failed',Message))) % re-throw with more information
- ; RDF_Stream = URL, rdf_load(RDF_Stream,[blank_nodes(noshare),if(true),base_uri(BaseURI),register_namespaces(true)])
+ ; RDF_Stream = URL, rdf_load(RDF_Stream,[blank_nodes(noshare),if(true),base_uri(BaseURI),register_namespaces(true)])
),
% collect all imports directives
( rdf(Ontology,'http://www.w3.org/1999/02/22-rdf-syntax-ns#type','http://www.w3.org/2002/07/owl#Ontology',BaseURI:_)
View
@@ -0,0 +1,14 @@
+owl_parse(URL, RDF_Load_Mode, OWL_Parse_Mode,ImportFlag) :-
+ > If RDF_Load_Mode=complete Then retract all rdf/3, rdf/4, rdf_source/4
+ > If OWL_Parse_Mode=complete Then
+ owl_clear_as,
+ retractall(blanknode(_,_,_)), retractall(owl(_,_,_,_))
+ End if
+
+ owl_canonical_parse_2([URL],URL,ImportFlag,[],ProcessedIRIs),
+ >
+ owl2_model_init,
+ owl_canonical_parse_3(ProcessedIRIs).
+
+
+
Oops, something went wrong.

0 comments on commit bc9e863

Please sign in to comment.