One of the approaches that I've use it to use the Drupal CMS to create the 
content model using Drupals custom content types.  I suspect that most here are 
familiar with Drupal but for those that are not;  almost all content in Drupal 
is manifested as a "node".  A node might be analogous to a rdf class and the 
fields of the node to rdf properties.  Let's say I want to create a data model 
for a "Vehicle".  Using the Drupal "create content type" UI. I can create a 
"Vehicle" content type. Then I can add various fields such as an enumerated 
vehicletype (car, truck, motorcycle), color, year built, etc.  Each of those 
fields can have a type (String, int, date) and range, all specified using the 
UI.   Once the content type has been created, instances of a Vehicle can be 
created but using the "Create Content" link and specifying the "Vehicle" 
content type.  That will produce a form (produced automatically by Drupal) for 
entering data.   Once you've got a collection of Vehicles nodes in the system 
you can use the add on "Views" module with various views extensions to render a 
list of vehicles in formats more consumable by a system.  In fact, you can even 
assign RDF classes and properties to the Vehicle content type and all its 
fields and Drupal will produce the data model as RDF.  However, what I have 
done is use a module which produces the content type as Json,  harvest it as 
json then transform it to RDF for ingest into my triple store.  

Want to go the other direction?  Drupal also has a Feeds module which can fetch 
and parse content in a variety of formats (including RDF) and create or update 
instances of nodes.   I wrote some code that works with Feeds that allows you 
to write a sparql query that can run against a sparql endpoint and map the 
results to a Drupal content type.  



-----Original Message-----
From: Martynas Jusevicius [mailto:[email protected]] 
Sent: Thursday, February 02, 2012 8:20 AM
To: [email protected]
Subject: Re: to HTML froms

Hey Paolo,

generic HTML forms using RDF/POST encoding can be generated from Jena Model -- 
we do that simply by transforming RDF/XML-ABBREV with XSLT.
They can also be consumed using MessageBodyReader.

I'm just saying that Model roundtrip including HTML forms is possible, the 
layout and user interface is another matter :) I'm sure it will be hard to get 
right in the generic case, but we'll give it a shot.

Martynas
graphity.org

On Thu, Feb 2, 2012 at 2:03 PM, Paolo Castagna <[email protected]> 
wrote:
> Hi Martynas,
> interesting...
>
> Are you thinking/working on the problem of generating the HTML Form 
> automatically from a Jena Model or any other RDF graph stored somewhere?
>
> An 'inspiring' example could be the edit UI at Freebase:
> http://www.freebase.com/edit/topic/en/tron_legacy
> ... not easy to get it right and easy.
>
> Paolo
>
> Martynas Jusevicius wrote:
>> Hey all,
>>
>> generic RDF forms are totally doable using 
>> http://www.lsrn.org/semweb/rdfpost.html encoding.
>> We have successful applications of it running in a RDF-based content 
>> management system.
>>
>> I should be finished with a generic MessageBodyReader [1] 
>> implementation in a matter days.
>> So you can stay in touch or take a look at the current PHP implementation 
>> [2].
>>
>> [1] 
>> http://jsr311.java.net/nonav/javadoc/javax/ws/rs/ext/MessageBodyReade
>> r.html [2] 
>> https://github.com/Graphity/graphity-core/blob/master/src/main/php/Gr
>> aphity/Form/RDFForm.php
>>
>> Martynas
>> graphity.org
>>
>> On Thu, Feb 2, 2012 at 10:49 AM, Ghassan Alhamoud <[email protected]> 
>> wrote:
>>> Hi ,
>>> So Should I expect that there is not such library ?if this is the case . 
>>> could anyone suggest an alternative  scenario that did not come to my mind.
>>> with regards,Ghassan
>>>
>>>> Date: Wed, 1 Feb 2012 10:40:55 +0000
>>>> From: [email protected]
>>>> To: [email protected]
>>>> Subject: Re: to HTML froms
>>>>
>>>> Ghassan Alhamoud wrote:
>>>>> Hello ,
>>>>> Is there any library that can help me in generating HTML from from jena 
>>>>> model to fill  data of some class i need to use it as parameter later on .
>>>>> thanks for you help.
>>>>> Ghassan
>>>> Hi Ghassan,
>>>> I am sorry, I do not know any library that does that (this does not 
>>>> mean there isn't one! ;-))
>>>>
>>>> I just want to say that I'd like to have/use something similar 
>>>> myself... driving the UI for data entry directly from the RDF 
>>>> schemas/vocabularies/ontologies and/or instance data seems quite an 
>>>> useful and reasonable thing.
>>>>
>>>> Not trivial to get it right (= nice, clean and usable
>>>> forms) though.
>>>>
>>>> Paolo
>>>>
>>>>

Reply via email to