BREG DCAT CREATOR

Creator logo

 

 

The Creator tool provides a set of web forms that may be used to create datasets of base registries and export these descriptions in BREG DCAT compliant machine-readable formats (i.e. serialised as RDF/XML).

USE-CASES

The tool covers the following use-cases:

ID

Use case

UC1

Create a BREG DCAT description.

UC2

Edit a BREG DCAT description.

UC3

Download BREG DCAT description RDF.

More details on use-cases see here.

HIGH-LEVEL VIEW OF ARCHITECTURE

Creator architecture

Figure 1: Creator - High-level architecture

The user interface is a Web page whose basic task is to define the DOM required by RDForms and initialise the library based on the data model template that was crafted during the development process.

TECHNOLOGIES

The tool is based on RDForms 4.1 by MetaSolutionsAB. The configuration mechanism of RDForms eliminates the need for programming once the library has been deployed into an environment. The main task of this library is to make it easy to construct form-based RDF editors in a web environment. To accomplish this, RDForms relies on a templating mechanism that both describes how to generate a HTML-form and how to map specific expressions in an RDF graph to corresponding fields. Simply put, RDForm uses a template to construct the input-form for the user and its transformation to RDF.

Multiple dependencies and technologies are involved in this architecture:

  • NPM and Bower are used as JavaScript package and dependency managers;
  • RDForms provides most of the functionality (RDForms is written in JavaScript).
  • HTML is used to define the Web page structure.
  • CSS is used to define the Web page style.
  • The data model template is serialised in JSON format.

The Creator tool does not interact with any database nor implement persistence in any fashion, thus, there is no dependency for any database service. Users are expected to export and externally store the RDF files when they finish using the tool.

SOURCE-CODE

The source code of the tool is provisionally available on GitHub here: https://github.com/BRegDCAT-AP-Tools/breg-dcat-creator

DEPLOYMENT

The BREG DCAT Creator uses RDForms 4.1 by MetaSolutionsAB, a JavaScript library that provides a way to declarative describe how the editor and presentation views of RDF should look like. Before a user can use the editor, he/she needs to make sure all the dependencies for RDForms are loaded and RDForms is build. To load the dependencies, simply run:

$ cd path_to_creator

$ npm   install

$ bower install

This requires that the user has NodeJSnpm and bower installed. Note: npm installs NodeJS libraries used by converters and a small webserver used by the formulator (to be introduced below), while bower installs the client libraries, such as dojo and rdfjson that RDForms builds upon.

After having installed the dependencies, build RDForms. This is done by:

$ cd path_to_creator/build

$ ./build.sh

ADAPTABILITY

The RDForm is allocated in template folder names as DCATtemplate.json. It can be edited to adapt the generated form is linked in DCAT.html webpage:

  <script type="text/javascript">

        require([

            'rdfjson/Graph',             //Rdfjson Graph API

            'rdforms/template/ItemStore', //Stores all the RDForm templates

            'rdforms/apps/Experiment',        //The editor User interface

            'dojo/json',

            'dojo/text!./samples/emptyRDF.json',

            'dojo/text!./template/DCATtemplate.json',

            'dojo/domReady!'             //Wait until the dom is ready.

        ], function (Graph, ItemStore, Experiment, json, emptyRDF, DCAT2) {

 

Table of contents