amalgame/commit
more sorting stuff
author | Jacco van Ossenbruggen |
---|---|
Wed May 11 22:45:59 2011 +0200 | |
committer | Jacco van Ossenbruggen |
Wed May 11 22:45:59 2011 +0200 | |
commit | 50a9d703cfd57a3fbc222de64ba56c74413b4f88 |
tree | 4ac4690b98b76223fe8964788100873894d7cef4 |
parent | 8cce0d31a7d6a962137a48dec1afa56bcf7fc066 |
Diff style: patch stat
diff --git a/lib/ag_modules/ancestor_match.pl b/lib/ag_modules/ancestor_match.pl index feebdfb..e4f12c5 100644 --- a/lib/ag_modules/ancestor_match.pl +++ b/lib/ag_modules/ancestor_match.pl @@ -42,12 +42,13 @@ filter([_|Cs], Mappings, Options) :- % Target. matcher(Source, Target, Mappings, Options) :- - findall(M, align(Source, Target, M, Options), Mappings). + findall(M, align(Source, Target, M, Options), Mappings0), + sort(Mappings0, Mappings). align(Source, Target, Match, Options) :- vocab_member(S, Source), - match(align(S,T,[]), Match, Options), - vocab_member(T, Target). + vocab_member(T, Target), + match(align(S,T,[]), Match, Options). match(align(S, T, Prov0), align(S, T, [Prov|Prov0]), Options) :- diff --git a/lib/ag_modules/descendent_match.pl b/lib/ag_modules/descendent_match.pl index 723c0df..811fd5c 100644 --- a/lib/ag_modules/descendent_match.pl +++ b/lib/ag_modules/descendent_match.pl @@ -41,12 +41,13 @@ filter([_|Cs], Mappings, Options) :- % Target. matcher(Source, Target, Mappings, Options) :- - findall(M, align(Source, Target, M, Options), Mappings). + findall(M, align(Source, Target, M, Options), Mappings0), + sort(Mappings0, Mappings). align(Source, Target, Match, Options) :- vocab_member(S, Source), - match(align(S,T,[]), Match, Options), - vocab_member(T, Target). + vocab_member(T, Target), + match(align(S,T,[]), Match, Options). match(align(S, T, Prov0), align(S, T, [Prov|Prov0]), Options) :- diff --git a/lib/ag_modules/isub_match.pl b/lib/ag_modules/isub_match.pl index 43c3ae8..bd6a68e 100644 --- a/lib/ag_modules/isub_match.pl +++ b/lib/ag_modules/isub_match.pl @@ -4,10 +4,8 @@ :- use_module(library(semweb/rdf_db)). :- use_module(library(semweb/rdf_label)). :- use_module(library(isub)). - :- use_module(library(amalgame/vocabulary)). - :- public filter/3. :- public matcher/4. :- public parameter/4. @@ -56,12 +54,13 @@ filter([_|Cs], Mappings, Options) :- % Target. matcher(Source, Target, Mappings, Options) :- - findall(M, align(Source, Target, M, Options), Mappings). + findall(M, align(Source, Target, M, Options), Mappings0), + sort(Mappings0, Mappings). align(Source, Target, Match, Options) :- vocab_member(S, Source), - match(align(S,T,[]), Match, Options), - vocab_member(T, Target). + vocab_member(T, Target), + match(align(S,T,[]), Match, Options). match(align(Source, Target, Prov0), align(Source, Target, [Prov|Prov0]), Options) :- diff --git a/lib/ag_modules/related_match.pl b/lib/ag_modules/related_match.pl index 6508fb5..a47931d 100644 --- a/lib/ag_modules/related_match.pl +++ b/lib/ag_modules/related_match.pl @@ -42,12 +42,13 @@ filter([_|Cs], Mappings, Options) :- % Target. matcher(Source, Target, Mappings, Options) :- - findall(M, align(Source, Target, M, Options), Mappings). + findall(M, align(Source, Target, M, Options), Mappings0), + sort(Mappings0, Mappings). align(Source, Target, Match, Options) :- vocab_member(S, Source), - match(align(S,T,[]), Match, Options), - vocab_member(T, Target). + vocab_member(T, Target), + match(align(S,T,[]), Match, Options). match(align(S, T, Prov0), align(S, T, [Prov|Prov0]), Options) :-