All predicatesShow sourcecliopatria.pl -- ClioPatria main module

This module loads the ClioPatria server as a library, providing the public predicates defined in the header. Before loading this file, the user should set up a the search path cliopatria. For example:

:- dynamic
        user:file_search_path/2.
:- multifile
        user:file_search_path/2.

user:file_search_path(cliopatria, '/usr/local/cliopatria').

:- use_module(cliopatria(cliopatria)).
See also
- http://cliopatria.swi-prolog.org
Sourcecp_server is det
Sourcecp_server(:Options) is det
Start the HTTP server. This predicate preforms the following steps:
  1. Load application settings from settings.db
  2. Load user-data from users.db
  3. Start the HTTP server
  4. Load the RDF persistent database from RDF-store
  5. Execute `after load' options registered using cp_after_load/1.

Defined options are:

port(Port)
Attach to Port instead of the port specified in the configuration file settings.db.
workers(+Count)
Number of worker threads to use. Default is the setting http:workers
prefix(+Prefix)
Rebase the server. See also the setting http:prefix.
store(+Store)
Directory to use as persistent store. See also the setting cliopatria:persistent_store.
settings(+Settings)
Settings file. Default is settings.db.
Sourceupdate_public_port(+Port, +DefPort)[private]
Update http:public_port if port is changed using --port=Port. Without this hack it is no longer to login after using the port option.
Sourceload_application(+Options)[private]
Load cpack and local configuration.
Sourcerdf_attach_store(+Options, :AfterLoad) is det[private]
Attach the RDF store using the setting cliopatria:persistent_store and call the `after-load' goals.
See also
- cp_after_load/1 for registering after-load goals.
Sourcesetup_indices is det[private]
Initialize maintenance of the full-text indices. These indices are created on first call and maintained dynamically as the RDF store changes. By initializing them before there is any RDF loaded, they will be built while the data is (re-)loaded, which avoids long delays on the first query. Note that most of the work is done in a separate thread.
Sourcecp_after_load(:Goal) is det
Register Goal to be executed after reloading the RDF persistent DB. Note that already registered goals are not duplicated. Running a goal after loading the database is commonly used to ensure presence of relevant schemas or build additional indices. Note that it is possible to start a thread for time-consuming tasks (see thread_create/3).
Sourcebusy_loading(+Request)[private]
This HTTP handler is pushed to overrule all actions of the server while the server is restoring its persistent state. It replies with the 503 (unavailable) response, indicating the progress of restoring the repository.
Sourceattach_account_info[private]
Set the registered user-database from the setting cliopatria:user_data.
Sourceset_session_options[private]
Initialise session timeout from http:max_idle_time.
Sourcecreate_log_directory[private]
Create the directory in which the log files reside.
Sourceprocess_argv(-Options)[private]
Processes the ClioPatria commandline options.
To be done
- Move most of this to the Prolog library
Sourceargv(-ProgramBaseName, -UserArgs)[private]
Sourcecpack_control(+Commands:list)[private]
Execute a CPACK configuration instruction. For example:
./run.pl cpack install swish
Sourcecp_welcome
Print welcome banner.
Sourcehttp:create_pool(+Pool) is semidet[multifile]
Create a thread-pool on-demand.
Sourcehttps_options(-Options) is det[private]
Fetch options for running an HTTPS server. HTTP is started if there is a directory https with these files:
server-cert.pem
Contains the server certificate. This may be omitted, in which case the server-key.pem is also passed using the key_file(+File) option.
server-key.pem
Contains the private key for the server. % passwd : Needs to hold the password if the private key is protected with a password.
Sourcecp_server is det
Sourcecp_server(:Options) is det
Start the HTTP server. This predicate preforms the following steps:
  1. Load application settings from settings.db
  2. Load user-data from users.db
  3. Start the HTTP server
  4. Load the RDF persistent database from RDF-store
  5. Execute `after load' options registered using cp_after_load/1.

Defined options are:

port(Port)
Attach to Port instead of the port specified in the configuration file settings.db.
workers(+Count)
Number of worker threads to use. Default is the setting http:workers
prefix(+Prefix)
Rebase the server. See also the setting http:prefix.
store(+Store)
Directory to use as persistent store. See also the setting cliopatria:persistent_store.
settings(+Settings)
Settings file. Default is settings.db.