Git Product home page Git Product logo

semantic_forms's People

Contributors

amauryvanespen avatar arie-benichou avatar balessan avatar gitter-badger avatar jmvanel avatar septentrion avatar sylvainlb avatar tristanmattei avatar weeger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

semantic_forms's Issues

RDF HTTP messages

Currently we use the HTML + HTTP form encoding for sending the user data to server.
This is fragile, not elegant, not semantic. The user is actually editing triples, we should send triples. Here is an example of the current situation:

<div>  <input 
    class="form-control"
    value="http://jmvanel.free.fr/images/jmv_id.jpg"
    name="RES-http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fimg">
  </input>
  <input 
    value="http://jmvanel.free.fr/images/jmv_id.jpg"
    name="ORIG-RES-http%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2Fimg" type="hidden">
  </input>
</div>

We are transmitting these elements:

  • the basic triple type: resource (URI) , literal, blank node
  • the original value

We will need:

  • the literal datatype
  • the possible enumerated values

merge FOAF duplicates

Write a main() to merge FOAF persons having same givenName and familyName.
The kept subject URI will be in a given named graph,
and all triples

?DUP_URI ?P ?O .

will be removed and corresponding triples

?KEPT_URI ?P ?O .

will be created.

A single SPARQL update should do the job.

Use case "Create Form by forms"

It is convenient for non Turtle experts to be able to create forms by a specific UI. In fact we will reuse and extend the existing form generator.

There is a small vocabulary for form specifications here:
https://github.com/jmvanel/semantic_forms/blob/master/vocabulary/forms.owl.ttl
So the feature amount to use a specific form specification for creating form specifications, kind of eating our own dog food https://en.wikipedia.org/wiki/Eating_your_own_dog_food .

More than that, there is a step to pre-populate the desired form specification from the associated OWL class, After selection of an OWL class, the possible properties obtained by existing algorithm for form inference are added to the edited form specification.

This feature depends on feature "Edit an RDF list" #22 , because fields in a form are essentially ordered, which are copied hereafter:

  • choice from those available properties
  • (re) order by d 'n' d
  • add properties by d' n 'd from another view

IN FRENCH:
Cas d'utilisation créer formulaire :

  • après choix d'une classe OWL, ajout des propriétés possibles par l'inférence actuelle: rediriger vers la page en édition car il y a eu inférence
  • choix parmi les propriétés possibles utiliser le bouton "-"
  • ( re) ordonner par d' n ' d
  • pouvoir ajouter des propriétés par d' n ' d depuis une autre vue

Add a "like" check box to each item

Add a "like" check box to each item in logged mode.
Counting the triples

?S form:like true .

will allow to order search results.

Contrary to normal domain predicates, the "like" triples from other users will not be displayed.

Compose forms by expanding selected properties

The use case is to display sub-forms as tabs or in place with HTML5 popup.
The typical case in RDF data modeling is the adress associated to a Person.
The adress will generally not be reused by another Person.
In the ontology, this is detectable by the property being owl:FonctionalProperty.

For instance, VIE seems to do the job
https://github.com/bergie/VIE
but :

  • there is no RDF vocabulary for constructed forms
  • limited to http://schema.org ontology
  • not clear if it's a demo or really usable for application building
  • not clear if properties' data like label, range are used
  • the resulting JSON fragment for form specification does not seem to be JSON-LD ; it's not recognized by http://json-ld.org/playground/

Make an input field based on DBPedia lookup

DBPedia lookup is a nice Web service with completion plugged on dbpedia.

An input field based on DBPedia lookup would be well suited for foaf:interest, and many others.
Indeed most subjects of interest to people are in dbPedia encyclopedia !
DBPedia lookup in fact is a nice entrance Door to Linked Data.
It both disambiguates concepts and provides a well known URI for them.

DBPedia lookup is already used in EulerGUI here:
http://svn.code.sf.net/p/eulergui/code/trunk/eulergui/src/main/scala/deductions/runtime/dbpedia/Lookup.scala
but probably the implementation in semantic_forms will be purely in JavaScript.

Refine the Search

Search also by going through URI's

that is, search for "jazz" must also find:

<a> <p> <http://mysite.com/x#jazz>
# and 
<a> <p> <http://mysite.com/x/jazz>

multi-user access control

One use case is switching to a classical CMS workflow, where article proposals are only visible by content managers.

User U1 must not be able to access data of user U2. We don't need for now a complete Access Control mechanism, like in Virtuoso. A simple API must give access to a Banana-RDF graph store ( dataset ) that contains only data of user U1, and contains also background knowledge and ontologies. This way, it is not possible that a badly writen SPARQL query accesses data of other users. This API could leverage on this utility to create such an in-memory graph store:

trait DatasetUtils[Rdf <: RDF]
    extends DatasetFactory
    with RDFOpsModule {

  /** merge given datasets */
  def merge(datasets: Seq[Dataset]) : GraphStore[Rdf, Try, Dataset]= {

This API could be:

    def makeUserDataset( userURI:string ) : GraphStore[Rdf, Try, Dataset]

Enhance labels for URI instances

They should be updated when the URI is edited.
The class label should be in last choice.

The labels of referenced URI's should be scanned for labels.
But that does not necessarily load them in main TDB .
Rather put these graphs in a secondary TDB.

Later there can be an optimization: when users clicks on a referenced URI, the graph in secondary TDB is transfered to main TDB , thus saving a download .

Add basic login

Add basic login for simple authentication and access control

View SPARQL select & construct results

Possibly add FlintSPARQLEditor, but this implies to launch SPARQL HTTP server like Fuseki, or BigData, or to use the SPARQL protocol in the semantic_forms server

bootstrap JS library is downloaded from Internet

As a consequence,
when doing a demonstration on localhost,
and internet is slow or not accessible,
the application becomes slow,
because there is a timeout and
the bootstrap JS library is not found from Internet.

The bootstrap JS library should be copied in
scala/forms_play/public/javascripts

connect application to a SPARQL HTTP server

instead of using the embedded TDB SPARQL engine.

This will enable easy combination with other applications backed by an SPARQL HTTP server.
It may need a new capability in Banana-RDF: wrap a SPARQL HTTP server as a graph store.

Edit an RDF list

RDF list are the default RDF way of specifying ordered lists.

The HTML form generation mechanism already has the ability to display and save user edits for triples that do not necessarily have the same subject.

Mainly what is needed for editing an RDF list inside a larger form:

  1. to actually generate the Scala data structure (FormSyntax) for an existing RDF list (display it)
  2. in edit mode, allow user to move ( maybe by D'n'D ) a list item within the list
  3. in edit mode, allow user to delete a list item within the list
  4. in edit mode, allow user to add a list item to the list

Error on fresh install when trying to run the app

I cannot get semantic_forms to work on a new machine, because after having cloned the repository plus the banana-rdf associated one (and executed the publishLocal on banana-rdf), I only get the following information from the 'run' command execution:

[semantic_forms_play] $ run
[info] Compiling 70 Scala sources to /home/balessan/workspace/semantic_forms/scala/forms/target/scala-2.11/classes...
[error] File name too long
[error] one error found
error Compilation failed
[error] Total time: 7 s, completed 9-Nov-2015 6:37:36 PM

Do you have any idea what's going on based on that ? I am kind of stuck...

store and retrieve non semantic files

Use cases:

  • upload personal image when creating a FOAF profile
  • upload and download files in a file depot , for example courses for a training site

This seems a job for an auxiliary LDP server, se implementations here:
http://www.w3.org/wiki/LDP_Implementations
We need something in Scala at least for JVM, so that the installing procedure is not too complex.

This one seems suitable
http://www.w3.org/wiki/LDP_Implementations#Fedora_Commons_Repository_.28Client_and_Server.29
But this is probably a J2EE web server, but with Play! we are not J2EE .
Or this one, which is simple, but also J2EE:
https://github.com/regestaexe/bygle-ldp
Marmotta is well know http://marmotta.apache.org/ , but it's also J2EE, and I doubt it's modular enough; we have already the LDP+SPARQL stuff.

Or using RWW_Play_Server http://www.w3.org/wiki/LDP_Implementations#RWW_Play_Server could be a solution, but again it seems not very modular. However, it has the advantage to be backed by a simple file based storage. We would need this , and this alone.

Some object properties could trigger a file upload

This is the case for foaf:img,
that would give the user 2 choices:

  1. upload an image file
  2. enter or paste or D'n'drop an URL of an image

In case 1, the binary file should somehow be stored:

  • in TDB as a base64 blob
  • elsewhere, in some key-value store

CSS classes configurable via RDF

Currently CSS classes for labels and fields are hard coded;
they should be configurable via RDF in the database.

HTML generation occurs in Forms2HTML .

Dashboard: Statistics

What to display ?

Statistics

  1. local for the current document:
  • number of Triples (literal or URI), of Resource URI's, in the current focus URI (DONE)
  • Resources of each type class, in the current document
  1. same items for the global RDF store

User history

What I created, displayed, modified;
either in a table view sorted by timestamp, or in a timeline leveraging on http://visjs.org
( CHAP Links Library http://almende.github.com/chap-links-library/timeline.html
has a successor and is no longer actively developed. The successor of the library is vis.js )

Pre-requisite: currently what a user displays is not recorded.

Manage RDF prefixes

Be able to enter prefixed URI e.g.
foaf:Project
in several places:

  • display / edit input field
  • creation input field
  • object value in SF form

Ideally, there should be completion .

Leverage on http://prefix.cc ,
either the web service or the TTL file ;
EulerGUI already does that.

NOTE: there is currently no API in Banana for Managing RDF prefixes,
but Jena TDB has one.

enhance usability of multi-value fields

After having chosen an URI in the pulldown menu,
and clicking on the + button,
it is not possible to add another URI from the pulldown menu.

The chosen value should be put in the nearby input field,
and the pulldown menu reset to no value.

integer intervals

Be able to check in the browser user input for integer intervals.
An example of corresponding OWL declaration is:

:interval-1-5 a  rdfs:Datatype;
  owl:onDatatype  xsd:integer;
  owl:withRestrictions (
    [xsd:minInclusive 1] [xsd:maxInclusive 5] ) .

form config: class for creation of object URI can be different from rdfs:range

Consider this property définition in Turtle:

av:contributes a owl:ObjectProperty ;
    rdfs:label "contribue"@fr ;
    rdfs:domain av:Actor ;
    rdfs:range foaf:Project .
# ...
av:Project rdfs:subClassOf foaf:Project.

We need the rdfs:range foaf:Project , so that the application will propose all foaf:Project instances to the user for choosing as values of av:contributes .
However, when creating from scratch a value for av:contributes in the context of a new instance of av:Actor, we would like to be specific , and create an instance of av:Project , not foaf:Project.

To specify this in the form config, I propose this syntax:

<personForm>
  form:classDomain av:Person ;
  form:showProperties (
        foaf:givenName foaf:familyName
        # ...
        [ form:property av:contributes ;
          form:creationClass av:Project ]
) .

RDF cache with SPARQL: use HTTP Etag

In method RDFCacheAlgo.lastModified() ,
we use only the headers
"Last-Modified" and "Date" ,
when we should also use Etag (and store it), for the case when other headers are not present.

Etag per se does not give any information about the date, but used in conjunction with "Last-Modified" that is stored in database,
a notion of "last accessed" can be computed.

See https://en.wikipedia.org/wiki/HTTP_ETag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.