This project is the prototype implementation of Formulis, a purely data-driven interface to RDF based on forms and using intelligent suggestions. The Formulis Webapp is a war archive to be hosted in a web server. The Formulis application only works when interfaced with a SEWELIS RDF server.
To deploy Formulis once you have the archive, you need to edit the index.html file to write the address of your Sewelis server. The value to edit are in the js code in index.html:
var formulisSettings = {
serverAdress: "URL_TO_REPLACE",
uriBaseAdress: "http://www.irisa.fr/LIS/sewelis/",
};
Once configured, the Formulis web site should retrieve automatically the available stores at least at anonymous level and display them in the list of stores on top of the page. At each selection of a store, Formulis display the list of classes given by Sewelis. Once a class is selected, it display a empty form with the most commonly filled properties for the selected class.
Formulis is implemented as a JS application generated using GWT. It interface with a SEWELIS server using POST requests. It is implemented following a MVC designe pattern. It also use the GWT/Bootstrap library.
The control
package contains classes for the security and data management outside of the form of the application.
- The
Controller
class is the entry point of the GWT application (methodonModuleLoad()
). It contains methods for the interaction with the sewelis server using SEWELIS services, which names are all prefixed by "sewelis". It is also the main root of the chain of user events. - The
Crypto
class contains call to native code of the SJCL class for the security aspect of loging into SEWELIS and is related to theaccess
package.
The model
package content is separated into three categories:
- The elements corresponding to the data-structure extracted from the SEWELIS server answers:
Place
,Answers
,Statement
,Suggestions
and related sub-packages. - The basic elements shared by all data related classes such as URIs, etc. that were initially created according to the Statement XML syntax of SEWELIS.
- The
Form
elements containing the data-structures used to store forms (and nested forms) in the application.
The Place
, Answers
, Statement
, Suggestions
and the content of the ̀̀answers
and suggestions
packages reflect the data structure of the responses of a SEWELIS server to a query. These elements are converted to form
and basic
elements using functions from the DataUtils
class.
Basic element are the terminal elements and the logical operators appearing in the SEWELIS statements.
There is one main Form data element at the root of the application. Lines contain one fixed element (class ou property URI) and one variable element (field or basic element or Form). Forms contain lists of lines, relation lines can contain Forms as variable component.
The view elements generally follow the same structure as the data elements
The user events are triggered in the view following a chain of responsibility pattern rooted into the controller. All elements of a Form graph (Forms and lines) are connected by the FormEventChain using view.ViewUtils.connectFormEventChain(...)
. The FormEventChain event object all contain a callback object which will be called by the final event manager once the treatment of the event has been done.
View forms follow the same structure as data forms. Forms and relation lines are interconnected to transmit most events towards the Controller. There is one main Form at the root of the Formulis application
To obtain an usable .war, compile the GWT project and compress in a .zip all the elements of the war/
folder before renaming the archive as a .war. You must not compile the code using the debug mode of your IDE.
FORMULIS was developped by Pierre Maillot from the SemLIS team, IRISA, University of Rennes 1, Rennes, France (https://www-semlis.irisa.fr/) in the effort to make data more accessible to users. This work was partially supported by ANR project IDFRAud (ANR-14-CE28-0012).
This work is licensed under the GPL license (precisely, by its equivalent under french law CECILL v2.1)