![Click to show exports only All predicates](/linkedpolitics/swish/pldoc/res/private.png)
user.pl -- Basic user (developer) interaction
This module contains the main front-end of ClioPatria. It notably provides the HTTP-handlers for / and /home:
- /
- This handler, with id=root, redirects either to /home (id=home) or to id=create_admin. The latter is issued if there is no initialised user-db.
- /home
- Provides the default welcome page of ClioPatria.
If one develops an application on top of ClioPatria, it is adviced to
redefine the handler for home
, as in:
:- http_handler('/welcome', home, []). home(Request) :- ...
If the application wants to provide a link to the generic ClioPatria administrative interface, it can do so by linking to the id=admin, as in:
..., { http_link_to_id(admin, [], AdminRef) }, html(a(href(AdminRef), admin)), ...
root(+Request)[private]
- Default ClioPatria handler for /. The default handler redirects to id=home, unless the use-info is not initialised. in that case it redirects to id=create_admin.
home(+Request)[private]
- Reply with the normal welcome page. The welcome page is a decorated version of html('welcome.html').
reply_decorated_file(+Alias, +Request) is det[private]
- Present an HTML file embedded using the server styling. This is achieved by parsing the HTML and passing the parsed DOM to reply_html_page/3.
statistics(+Request)[private]
- Provide elementary statistics on the server.
query_form(+Request)[private]
- Provide a page for issuing a
SELECT
query. load_file_form(+Request)[private]
- Provide a form for uploading triples from a local file.
load_url_form(+Request)[private]
- Provide a form for uploading triples from a URL.
load_library_rdf_form(+Request)[private]
- Provide a form for loading an ontology from the library.
Libraries are made available through the file search path
ontology
. Directories found through this alias are searched recursively for files namedManifest.ttl
. load_base_ontology_form(+Ontologies)//[private]
- HTML component that emits a form to load a base-ontology and its dependencies. Ontologies is a list of ontology-identifiers as used by rdf_load_library/1.
clear_repository_form(+Request)[private]
- HTTP handle presenting a form to clear the repository.
remove_statements_form(+Request)[private]
- HTTP handler providing a form to remove RDF statements.