Skip to content
Jean-Marc Vanel edited this page Dec 12, 2015 · 24 revisions

Introduction

Semantic_forms is both a generic semantic web navigation and annotation application, and a framework to build business applications centered on forms (input and display only). All data and data model (ontologies) leverage on W3C's semantic web recommandations.

Regarding the implementation, Semantic_forms leverages on Jena TDB, Play! Framework and Scala.

Semantic_forms is fonctional out the box, once you've built it from sources. You can navigate in your RDF (Turtle, Json-LD) data loaded in Jena TDB as easily as navigating FOAF profiles on internet, or mixing both.

The code and how to build from sources is here : https://github.com/jmvanel/semantic_forms/tree/master/scala/forms_play

A sandbox is here: http://212.47.232.171:9111/

Navigating

Pasting into the field "URI to display" a downloadable URI, say <U1>, be it a dbpedia , or FOAF profile, or an ontology, displays the triples

<U1> ?P ?O .

as dbPedia web application itself does. Then, you can navigate from links to links, also like dbPedia.

Try dragging and dropping this URI in field "URI to display": http://dbpedia.org/resource/Bobby_Bland

There are some starting points in the input field "URI to display", click on the triangle on the right.

Loading semantic data

The next main thing to understand for using the app is that navigating and displaying a downloadable URI, also loads it into the Jena TDB database. And then, downloaded data is used for all application's purposes: displaying triples, forms, labels (from rdfs:label and other predicates), searching, ...

The RDF cache and database

The Jena TDB database acts as a cache for Internet RDF data, which means:

  • displaying the second time is much quicker;
  • taking into account HTTP headers, the data can be reloaded if the remote source is changed

Inside the RDF (SPARQL) database, the triples downloaded from URI <U1> are loaded into a named graph whose name is also <U1>.

You can have a look at the named graphs from the tools page here in the sandbox : http://212.47.232.171:9111/tools

Editing

Editing existing data

When displaying a subject URI, click on the link near "Properties for" to display an input form for this URI. You can modify any triple, create multiple values with "+" button. When finished editing, the SAVE button updates the database.

Creating a new resource of some RDF type

Once you've uploaded an ontology, you can paste a class URI in the "create instance" field , and the inferred form for the class will be displayed. You can also select in the nearby pulldown menu one a the pre-defined classes (FOAF classes, etc). Try looking for an RDF class in LOV or Swoogle search engines, and dragging and drop dropping it in the "create instance" field, exemple d'n'd this URL for creating a biological Species : http://dbpedia.org/ontology/Species

CAUTION: by default many useful ontologies are pre-loaded, like dbPedia ontology (see in README to load more ). In the case were the ontology is not pre-loaded, you can load it like any data from its URL/URI, as explained above in Navigating .

Literal (string) fields are entered according to their data type ( plain string, number, date, ... ) with HTML5 compliant input fields . The "EDIT" button nearby opens a popup window for entering a multi-line text.

Resource fields (semantic links) are entered either by:

  • pasting an URI from elsewhere,
  • choosing a possible URI value that is proposed near the field, and that has been inferred from rdfs:range and rdf:type triples,
  • entering any string, that will be added in the database as an URI, with spaces replaced by underscores; the rdf:type of this new URI is set according to the ontologies in database (upon saving the form).

Pay attention to the fields marked with "dbpedia completion", like competences and point of interest. There, one types a few letters, and it is completed with relevant concepts from Wikipedia. CAUTION: the completion widget works only on Firefox, not Chrome(Chromium).

Clone this wiki locally