1:- module(conf_cpack_repository, []).    2:- use_module(cpack_repository(applications/cpack_submit)).    3:- use_module(cpack_repository(applications/cpack_home)).    4:- use_module(library(http/http_path)).    5:- use_module(user(user_db)).    6:- use_module(cliopatria(hooks)).    7:- use_module(library(semweb/rdf_db)).    8:- use_module(library(semweb/rdf_library)).    9
   10:- use_module(library(http/http_dispatch)).

CPACK repository interface

*/

   15http:location(cpack, root(cpack), []).
   16
   17cliopatria:menu_popup_order(cpack, 250).
   18cliopatria:menu_label(cpack, 'CPACK').
   19
   20cliopatria:menu_item( 50=cpack/cpack_home,	 	   'Home').
   21cliopatria:menu_item(100=cpack/cpack_list_packages,	   'List packs').
   22cliopatria:menu_item(200=cpack/cpack_submit_form,	   'Submit pack').
   23cliopatria:menu_item(300=cpack/cpack_clone_server_form,	   'Clone server') :-
   24	logged_on(admin).
   25cliopatria:menu_item(400=cpack/cpack_refresh_metadata_api, 'Refresh metadata') :-
   26	logged_on(_).
   27cliopatria:menu_item(275=current_user/cpack_my_packages,   'My CPACKs') :-
   28	logged_on(_).
   29
   30:- rdf_attach_library(cliopatria(rdf)).   31:- rdf_load_library(cpack).   32:- rdf_load_library(owl).   33:- rdf_load_library(dcterms).   34:- rdf_load_library(graphviz).   35
   36% Hack, make submittedBy work for rdf_has/3.
   37
   38:- rdf_set_predicate(cpack:submitted,   inverse_of(cpack:submittedBy)).   39:- rdf_set_predicate(cpack:submittedBy, inverse_of(cpack:submitted)).   40:- rdf_set_predicate(cpack:resolves,    inverse_of(cpack:resolvesAs)).   41:- rdf_set_predicate(cpack:resolvesAs,  inverse_of(cpack:resolves)).   42
   43% CPACK is an extension of ClioPatria and uses the ClioPatria skin.
   44
   45:- multifile
   46	user:body//2.   47
   48user:body(user(Style), Body) -->
   49	user:body(cliopatria(Style), Body).
   50
   51% Tailor the package =isearch= (it is recommented to load that)
   52
   53:- rdf_meta
   54	exclude_property(r).
   55
   56cliopatria:facet_exclude_property(P) :-
   57	exclude_property(P).
   58
   59exclude_property(cpack:repository).
   60exclude_property(cpack:base).
   61exclude_property(cpack:path).
   62exclude_property(cpack:size)