amalgame/commit

trying to get rid of opmv vocabulary in the strategies

authorJacco van Ossenbruggen
Thu Dec 13 10:04:52 2012 +0100
committerJacco van Ossenbruggen
Thu Dec 13 10:04:52 2012 +0100
commit22593b924e55420b9898569bd4500ac05d51874b
treec3529036ddbb3619f558223fb120c9065716a550
parentce4a21555e5a461f2dbe5d54cc828e16e9fda404
Diff style: patch stat
diff --git a/applications/equalizer/process.pl b/applications/equalizer/process.pl
index 4dae148..b547d4a 100644
--- a/applications/equalizer/process.pl
+++ b/applications/equalizer/process.pl
@@ -90,11 +90,11 @@ update_process(Process, Graph, Params) :-
 			)).
 
 is_dependent_chk(Mapping, Process, Strategy) :-
-	rdf_has(Mapping, opmv:wasGeneratedBy, Process, RP),
+	rdf_has(Mapping, amalgame:wasGeneratedBy, Process, RP),
 	rdf(Mapping, RP, Process, Strategy),
 	!.
 is_dependent_chk(Mapping, Process, Strategy) :-
-	rdf_has(Mapping, opmv:wasGeneratedBy, OtherProcess, RP1),
+	rdf_has(Mapping, amalgame:wasGeneratedBy, OtherProcess, RP1),
 	rdf(Mapping, RP1, OtherProcess, Strategy),
 	rdf_has(OtherProcess, opmv:used, OtherMapping, RP2),
 	rdf(OtherProcess, RP2, OtherMapping, Strategy),
@@ -125,7 +125,7 @@ new_process(Type, Alignment, Source, Target, Input, SecInputs, Params, Focus) :-
 	;   true).
 
 precompute(Process, Alignment) :-
-	rdf_has(Output, opmv:wasGeneratedBy, Process, RP),
+	rdf_has(Output, amalgame:wasGeneratedBy, Process, RP),
 	rdf(Output, RP, Process, Alignment),
 	thread_create( % Write debug output to server console, cannot write to client:
 	    (	set_stream(user_output, alias(current_output)),
@@ -180,7 +180,7 @@ assert_output(Process, Type, Strategy, Input, SecInputs, Strategy) :-
 	oset_power(SecInputs, [[]|PowSet]),
 	forall(member(InSet0, PowSet),
 	       (   sort(InSet0, InSet),
-		   new_output(OutputClass, Process, opmv:wasGeneratedBy, Input, Strategy, OutputUri),
+		   new_output(OutputClass, Process, amalgame:wasGeneratedBy, Input, Strategy, OutputUri),
 		   findall(Nick,
 			   (	member(Id, InSet),
 				nickname(Strategy,Id,Nick)
@@ -198,7 +198,7 @@ assert_output(Process, Type, Strategy, Input, SecInputs, Strategy) :-
 
 assert_output(Process, Type, Graph, Input, _, MainOutput) :-
 	output_type(Type, OutputClass),
-	new_output(OutputClass, Process, opmv:wasGeneratedBy, Input, Graph, MainOutput).
+	new_output(OutputClass, Process, amalgame:wasGeneratedBy, Input, Graph, MainOutput).
 
 new_output(Type, Process, P, Input, Strategy, OutputURI) :-
 	rdf(Strategy, amalgame:publish_ns, NS),
@@ -361,8 +361,8 @@ node_retract(URI, Strategy) :-
 	       node_retract(Subj, Strategy)).
 
 process_retract(URI, Strategy) :-
-	rdf_has(URI, opmv:wasGeneratedBy, P),
-	findall(S, rdf_has(S, opmv:wasGeneratedBy, P), [URI]),
+	rdf_has(URI, amalgame:wasGeneratedBy, P),
+	findall(S, rdf_has(S, amalgame:wasGeneratedBy, P), [URI]),
 	provenance_graph(Strategy, ProvGraph),
 	!,
 	rdf_retractall(P, _, _, Strategy),
diff --git a/lib/ag_drivers/exec_amalgame_process.pl b/lib/ag_drivers/exec_amalgame_process.pl
index 69c0a46..56142a9 100644
--- a/lib/ag_drivers/exec_amalgame_process.pl
+++ b/lib/ag_drivers/exec_amalgame_process.pl
@@ -33,7 +33,7 @@ select_result_mapping(_Id, select(Selected, Discarded, Undecided), OutputType, M
 
 select_result_mapping(Id, overlap(List), P, Mapping) :-
 	!,
-	rdf_equal(opmv:wasGeneratedBy, P),
+	rdf_equal(amalgame:wasGeneratedBy, P),
 	(   member(Id-Mapping, List)
 	->  true
 	;   Mapping=[]
@@ -41,7 +41,7 @@ select_result_mapping(Id, overlap(List), P, Mapping) :-
 
 select_result_mapping(_Id, Mapping, P, Mapping) :-
 	is_list(Mapping),
-	rdf_equal(opmv:wasGeneratedBy, P).
+	rdf_equal(amalgame:wasGeneratedBy, P).
 
 %%	exec_amalgame_process(+Type,+Process,+Strategy,+Module,-Result,-Time,+Options)
 %
@@ -72,7 +72,7 @@ exec_amalgame_process(Type, Process, Strategy, Module, Mapping, Time, Options) :
 
 exec_amalgame_process(Class, Process, Strategy, Module, Result, Time, Options) :-
 	rdfs_subclass_of(Class, amalgame:'VocExclude'),
-	rdf(NewVocab, opmv:wasGeneratedBy, Process, Strategy),
+	rdf(NewVocab, amalgame:wasGeneratedBy, Process, Strategy),
 	NewVocOption = new_scheme(NewVocab),
 	!,
 	once(rdf(Process, amalgame:input, Input, Strategy)),
diff --git a/lib/ag_modules/ag_overlap.pl b/lib/ag_modules/ag_overlap.pl
index e1526f4..84003cc 100644
--- a/lib/ag_modules/ag_overlap.pl
+++ b/lib/ag_modules/ag_overlap.pl
@@ -17,7 +17,7 @@ analyzer(Inputs, Process, Strategy, overlap(Results), _Options) :-
 	maplist(input_expander(Strategy), Inputs, ExpandedInputs),
 	overlap(ExpandedInputs, Overlaps),
 	findall(Id-_Mapping,
-		rdf(Id, opmv:wasGeneratedBy, Process, Strategy),
+		rdf(Id, amalgame:wasGeneratedBy, Process, Strategy),
 		Results),
 	maplist(output_expander(Results, Strategy), Overlaps).
 
diff --git a/lib/amalgame/ag_evaluation.pl b/lib/amalgame/ag_evaluation.pl
index a806e2b..0955207 100644
--- a/lib/amalgame/ag_evaluation.pl
+++ b/lib/amalgame/ag_evaluation.pl
@@ -36,7 +36,7 @@ evaluation_graph(Strategy, Mapping, EvalGraph) :-
 	rdf_assert(EvalGraph, rdf:type, amalgame:'EvaluatedMapping', Strategy),
 	rdf_assert(EvalGraph, rdfs:label, literal('Evaluation results'), Strategy),
 	rdf_assert(EvalGraph, rdfs:comment, literal(Comment), Strategy),
-	rdf_assert(EvalGraph, opmv:wasGeneratedBy, EvalProcess, Strategy),
+	rdf_assert(EvalGraph, amalgame:wasGeneratedBy, EvalProcess, Strategy),
 	rdf_assert(EvalGraph, amalgame:evaluationOf, Mapping, Strategy),
 	rdf_assert(EvalGraph, amalgame:status, amalgame:intermediate, Strategy),
 
@@ -47,7 +47,7 @@ evaluation_graph(Strategy, Mapping, EvalGraph) :-
 delete_eval_graph_admin(Strategy, Mapping, EvalGraph) :-
 	% Beware, this will delete all metadata about your manual evaluations!
 	rdf(EvalGraph, amalgame:evaluationOf, Mapping, Strategy),
-	rdf(EvalGraph, opmv:wasGeneratedBy, EvalProcess, Strategy),
+	rdf(EvalGraph, amalgame:wasGeneratedBy, EvalProcess, Strategy),
 	!,
 	rdf_retractall(EvalGraph, _, _, Strategy),
 	rdf_retractall(EvalProcess, _, _, Strategy).
diff --git a/lib/amalgame/ag_stats.pl b/lib/amalgame/ag_stats.pl
index 2da26b8..32ecde5 100644
--- a/lib/amalgame/ag_stats.pl
+++ b/lib/amalgame/ag_stats.pl
@@ -91,7 +91,7 @@ dyn_perc_round(P0, P, N) :-
 %	vocabularies of Mapping.
 
 mapping_sources(URL, Strategy, S, T) :-
-	rdf_has(URL, opmv:wasGeneratedBy, Process, RealProp),
+	rdf_has(URL, amalgame:wasGeneratedBy, Process, RealProp),
 	rdf(URL, RealProp, Process, Strategy),
 	!,
 	(   rdf(Process, amalgame:source, S0, Strategy),
@@ -103,7 +103,7 @@ mapping_sources(URL, Strategy, S, T) :-
 	).
 
 vocab_source(V, Strategy, S) :-
-	rdf_has(V, opmv:wasGeneratedBy, Process, Strategy),
+	rdf_has(V, amalgame:wasGeneratedBy, Process, Strategy),
 	rdf_has(Process, amalgame:input, Input, Strategy),
 	!,
 	vocab_source(Input, Strategy, S).
diff --git a/lib/amalgame/caching.pl b/lib/amalgame/caching.pl
index e3996ed..188cd28 100644
--- a/lib/amalgame/caching.pl
+++ b/lib/amalgame/caching.pl
@@ -86,7 +86,7 @@ cache_result_stats(Process, Strategy, SchemeSpec) :-
 	(   SchemeSpec = scheme(Id)
 	->  true
 	;   SchemeSpec = and(_,_)
-	->  rdf(Id, opmv:wasGeneratedBy, Process, Strategy)
+	->  rdf(Id, amalgame:wasGeneratedBy, Process, Strategy)
 	;   fail
 	),
 	!,
@@ -95,7 +95,7 @@ cache_result_stats(Process, Strategy, SchemeSpec) :-
 	assert(stats_cache(Id-Strategy, stats(Count))).
 
 cache_result_stats(Process, Strategy, Result) :-
-	rdf(D, opmv:wasGeneratedBy, Process, Strategy),
+	rdf(D, amalgame:wasGeneratedBy, Process, Strategy),
 	!,
 	flush_stats_cache(D, Strategy),
 	mapping_stats(D, Result, Strategy, Dstats),
@@ -177,7 +177,7 @@ del_materialized_vocs :-
 	findall(Voc,
 		(   rdfs_individual_of(Voc, skos:'ConceptScheme'),
 		    rdf_graph(Voc),
-		    rdf_has(Voc, opmv:wasGeneratedBy, _)
+		    rdf_has(Voc, amalgame:wasGeneratedBy, _)
 		), Vocs),
 	forall(member(V, Vocs),
 	       (   catch(rdf_unload(V), _, true),
@@ -192,7 +192,7 @@ del_materialized_vocs :-
 flush_dependent_caches(Process, Strategy, ProvGraph) :-
 	flush_expand_cache(Process, Strategy),
 	findall(Result,
-		(   rdf_has(Result, opmv:wasGeneratedBy, Process, RP),
+		(   rdf_has(Result, amalgame:wasGeneratedBy, Process, RP),
 		    rdf(Result, RP, Process, Strategy)
 		), Results),
 	forall(member(Result, Results),
diff --git a/lib/amalgame/expand_graph.pl b/lib/amalgame/expand_graph.pl
index 7c1ecae..0906dd2 100644
--- a/lib/amalgame/expand_graph.pl
+++ b/lib/amalgame/expand_graph.pl
@@ -48,7 +48,7 @@ expand_mapping(Strategy, Id, Mapping) :-
 	(   rdf_graph(Id)
 	;   rdfs_individual_of(Id, amalgame:'EvaluatedMapping')
 	;   rdfs_individual_of(Id, amalgame:'LoadedMapping')
-	;   rdf(Id, opmv:wasGeneratedBy, Process),
+	;   rdf(Id, amalgame:wasGeneratedBy, Process),
 	    rdf(Process, rdf:type, amalgame:'SelectPreloaded')
 	),
 	!,
@@ -59,7 +59,7 @@ expand_mapping(Strategy, Id, Mapping) :-
 
 
 expand_mapping(Strategy, Id, Mapping) :-
-	rdf_has(Id, opmv:wasGeneratedBy, Process, OutputType),
+	rdf_has(Id, amalgame:wasGeneratedBy, Process, OutputType),
 	rdf(Id, OutputType, Process, Strategy),
 	!,
 	with_mutex(Process,
@@ -79,7 +79,7 @@ expand_mapping(Strategy, Id, Mapping) :-
 %	of concepts derived by a vocabulary process,
 
 expand_vocab(Strategy, Id, Vocab) :-
-	rdf_has(Id, opmv:wasGeneratedBy, Process ,OutputType),
+	rdf_has(Id, amalgame:wasGeneratedBy, Process ,OutputType),
 	rdf(Id, OutputType, Process, Strategy),
 	!,
 	with_mutex(Process,
@@ -123,7 +123,7 @@ do_expand_process(Strategy, Process, Result, Time) :-
 	(   Result = scheme(_)   % Result is a single vocabulary
 	->  add_amalgame_opm(Strategy, Process, Result)
 	;   findall(URI-Mapping, % Result is one or more mappings
-		    (   rdf_has(URI, opmv:wasGeneratedBy, Process, OutputType),
+		    (   rdf_has(URI, amalgame:wasGeneratedBy, Process, OutputType),
 			rdf(URI, OutputType, Process, Strategy),
 			select_result_mapping(URI, Result, OutputType, Mapping)
 		    ),
@@ -148,7 +148,7 @@ do_expand_process(Strategy, Process, Result, Time) :-
 
 materialize_results_if_needed(Strategy, Process, Results) :-
 	findall(Id-RP,
-		(   rdf_has(Id, opmv:wasGeneratedBy, Process, RP),
+		(   rdf_has(Id, amalgame:wasGeneratedBy, Process, RP),
 		    rdf(Id, RP, Process, Strategy)
 		),
 		Ids),
diff --git a/rdf/tool/amalgame.ttl b/rdf/tool/amalgame.ttl
index 7ad63e3..3903c03 100644
--- a/rdf/tool/amalgame.ttl
+++ b/rdf/tool/amalgame.ttl
@@ -7,8 +7,6 @@
 @prefix     skos: <http://www.w3.org/2004/02/skos/core#> .
 @prefix     xsd: <http://www.w3.org/2001/XMLSchema#> .
 
-opmv:Process
-    rdfs:subClassOf amalgame:Process .
 amalgame:Process
     rdfs:label "process"@en ;
     skos:definition "Top class for all amalgame processes"@en ;
@@ -63,6 +61,9 @@ amalgame:secondary_input
 	rdfs:range  amalgame:Alignment ;
 	rdfs:subPropertyOf opmv:used .
 
+amalgame:wasGeneratedBy
+	rdfs:subPropertyOf opmv:wasGeneratedBy.
+
 amalgame:selectedBy
 	rdfs:domain  amalgame:Alignment ;
 	rdfs:range opmv:Process ;