cluster_search_ui/commit

Start adding pengine enrichment code.

authorChris Dijkshoorn
Sat Dec 13 20:35:33 2014 +0100
committerChris Dijkshoorn
Sat Dec 13 20:35:33 2014 +0100
commit88a3391348b425446660ff6a6e433f82610903d9
tree04fb01368d9d72f203840c00009deefce3d0cc50
parent121e44f010d4676eeaff5836f067c728fd098e07
Diff style: patch stat
diff --git a/api/cluster_search_ui.pl b/api/cluster_search_ui.pl
index 12a130a..36dc73c 100644
--- a/api/cluster_search_ui.pl
+++ b/api/cluster_search_ui.pl
@@ -23,6 +23,7 @@ The ui variables are retrieved from rdf (e.g. rdf/rijksmuseum_ui.ttl).
 :- use_module(library(http/http_path)).
 :- use_module(library(http/http_parameters)).
 :- use_module(library(semweb/rdf_db)).
+:- use_module(library(pengines)).
 
 
 % construct url and define filesystem search paths
@@ -38,6 +39,10 @@ user:file_search_path(img, web(img)).
 :- http_handler(fonts('.'), serve_files_in_directory(fonts), [prefix]).
 :- http_handler(img('.'), serve_files_in_directory(img), [prefix]).
 
+%pengines try out
+:- pengine_application(enrichment).
+:- use_module(enrichment:'cpack/cluster_search_ui/lib/cluster_search_ui/enrichment.pl').
+
 :- set_setting_default(thumbnail:thumbnail_size, size(350,300)).
 :- set_setting_default(thumbnail:medium_size, size(1280,1024)).
 
@@ -98,3 +103,4 @@ reply_page(Page, Options) :-
 	\scripts(Page),
 	\content(Page, Options)
     ]).
+
diff --git a/lib/cluster_search_ui/enrichment.pl b/lib/cluster_search_ui/enrichment.pl
new file mode 100644
index 0000000..02ece60
--- /dev/null
+++ b/lib/cluster_search_ui/enrichment.pl
@@ -0,0 +1,12 @@
+:- module(enrichment, [
+	      uri_label/2,
+	      kipperdekip/1
+	  ]).
+
+:- use_module(library(semweb/rdf_label)).
+
+uri_label(Uri, Label) :-
+	rdf_display_label(Uri, _, Label).
+
+kipperdekip(X) :-
+	X = a.