cluster_search/commit
Added meta predicate to allow class_of to function and changed api name.
author | Chris Dijkshoorn |
---|---|
Mon Mar 9 11:21:42 2015 +0000 | |
committer | Chris Dijkshoorn |
Mon Mar 9 11:21:42 2015 +0000 | |
commit | e723224ddac0d9fab34194d8e53139e2bb4b0e4b |
tree | 81b09a11667294522cfc6f9d7b37bde38a18621b |
parent | 96176f8afe084113898ca96a65c92ff78b0653ed |
Diff style: patch stat
diff --git a/api/cluster_search.pl b/api/cluster_search.pl index 23d6c5f..c879dd8 100644 --- a/api/cluster_search.pl +++ b/api/cluster_search.pl @@ -6,6 +6,7 @@ :- use_module(library(http/http_parameters)). % util modules +:- use_module(library(semweb/rdf_db)). :- use_module(library(cluster_search/rdf_cluster)). :- use_module(library(cluster_search/rdf_search)). :- use_module(library(cluster_search/settings)). @@ -13,15 +14,18 @@ % search modules :- use_module(library(cluster_search/graph_search)). -:- http_handler(cliopatria(cluster_search), search_api, []). +:- http_handler(cliopatria(cluster_search_api), cluster_search_api, []). -%% search_api(+Request) +:- rdf_meta + iface_class_of(r,-). + +%% cluster_search_api(+Request) % % Retrieves clusters of search results, according to the query. % First it gets the url parameters, second it executes graph % search algorithm, after which the data is prepared for output and % outputted as json. -search_api(Request) :- +cluster_search_api(Request) :- get_parameters(Request, Options), cluster_search(Clusters, Options), reply_clusters(Clusters).