amalgame/commit

ADDED: default 'any' for prop/value vocab selector

authorJacco van Ossenbruggen
Wed Jul 10 14:29:14 2013 +0200
committerJacco van Ossenbruggen
Wed Jul 10 14:29:14 2013 +0200
commit431632085ed2dc33c6e5b82fef5ae1d1fe897e6a
treedf084e542f51566136cea648e450da875134bad9
parent66049cd649086efbaea3e8fb4aea2f6d413a5d97
Diff style: patch stat
diff --git a/lib/ag_modules/propvalue_select.pl b/lib/ag_modules/propvalue_select.pl
index 8dcaccd..a9707e0 100644
--- a/lib/ag_modules/propvalue_select.pl
+++ b/lib/ag_modules/propvalue_select.pl
@@ -6,11 +6,12 @@
 
 amalgame_module(amalgame:'PropertyValueSelect').
 
-parameter(property, uri, '',
+parameter(property, uri, any,
 	  'RDF property by which to select the concepts').
-parameter(value, uri, '',
+parameter(value, uri, any,
 	  'RDF object/property value by which to select the concepts').
-parameter(mode, oneof([select, remove]), select, 'select or remove concepts with this property/value pair').
+parameter(mode, oneof([select, remove]), select,
+	  'select or remove concepts with this property/value pair').
 
 % a bit naive at the moment: we simply change the query that should be
 % done.
@@ -18,9 +19,9 @@ parameter(mode, oneof([select, remove]), select, 'select or remove concepts with
 selecter(Scheme, and((Scheme), propvalue(Property, Value)), Options) :-
 	option(mode(select), Options),
 	option(property(Property), Options),
-	option(value(Value), Options).
+	option(value(Value),       Options).
 
 selecter(Scheme, and((Scheme), not(propvalue(Property, Value))), Options) :-
 	option(mode(remove), Options),
 	option(property(Property), Options),
-	option(value(Value), Options).
+	option(value(Value),       Options).
diff --git a/lib/amalgame/vocabulary.pl b/lib/amalgame/vocabulary.pl
index 71a0c4f..f4cdb25 100644
--- a/lib/amalgame/vocabulary.pl
+++ b/lib/amalgame/vocabulary.pl
@@ -29,8 +29,11 @@ vocab_member(E, type(Class)) :-
 vocab_member(E, graph(G)) :-
 	!,
 	rdf(E, rdf:type, _, G).
-vocab_member(E, propvalue(Property, Value)) :-
-	!,
+vocab_member(E, propvalue(any, Value)) :- !,
+	rdf(E, _Property, Value).
+vocab_member(E, propvalue(Property, any)) :- !,
+	rdf(E, Property, _Value).
+vocab_member(E, propvalue(Property, Value)) :- !,
 	rdf(E, Property, Value).
 vocab_member(E, subtree(Root)) :-
 	!,