amalgame/commit

ADDED: select/remove mode for type selecter

authorJacco van Ossenbruggen
Thu Aug 28 10:46:49 2014 +0200
committerJacco van Ossenbruggen
Thu Aug 28 10:46:49 2014 +0200
commitab6941e5463fe73c5d8c6b84a01b2120f763fd02
treee8640ba3bfa4143c59216a03db73ce22b57eaae5
parentaccdaeda480f54af94e0c73bd864689d6b7b5037
Diff style: patch stat
diff --git a/lib/ag_modules/type_select.pl b/lib/ag_modules/type_select.pl
index 2464b5f..2c84d07 100644
--- a/lib/ag_modules/type_select.pl
+++ b/lib/ag_modules/type_select.pl
@@ -8,9 +8,15 @@ amalgame_module(amalgame:'TypeSelect').
 
 parameter(class, uri, '',
 	  'rdfs:Class from which to select the concepts').
+parameter(mode, oneof([select, remove]), select,
+	  'select or remove concepts of this type').
 
 % a bit naive at the moment: we simply change the query that should be
 % done.
 
 selecter(Scheme, and((Scheme), type(Class)), Options) :-
+	option(mode(select), Options),
+	option(class(Class), Options).
+selecter(Scheme, and((Scheme), not(type(Class))), Options) :-
+	option(mode(remove), Options),
 	option(class(Class), Options).