You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Ghassan Alhamoud <gh...@hotmail.com> on 2012/02/01 10:42:15 UTC

to HTML froms

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   		 	   		  

Re: to HTML froms

Posted by Paolo Castagna <ca...@googlemail.com>.
Ghassan Alhamoud wrote:
> could anyone suggest an alternative scenario that did not come to my mind.

My alternative when I need to do some data entry manually or I need to ask
someone else to do that for me is: spreadsheets.
I give them (or I use) a template with columns I need and provide a couple
of examples.

Drawback is: UI isn't great, interaction isn't great nor real-time, no
check/radio buttons or easy way to select values from a list, etc.
But, don't under estimates spreadsheets (they are still around and people
are use to it).

This approach works only in an "intranet"/internal scenario, with partners
not in general on the Web with a larger audience. Although, some of the
data publishers allows you to upload tabular data (either CSV, spreadsheets,
etc.)


Another alternative I've used it the past is: usual HTML forms, you receive
a map of (key,value) pairs of what the user has entered then you use a template
engine (I use Apache Velocity) to render RDF data and load it behind the
scenes. Very ugly, I know... and it works on the input direction only.
No updates/edits, as you probably need.


Paolo



RE: to HTML froms

Posted by Ghassan Alhamoud <gh...@hotmail.com>.
Thank you all , 
Till now i did not a practical answer to my question , Martynas : Please give me a note when you finalize it;
Someone suggests  semantic web portal , do anybody try an open source  java one .
Regards,Ghassan


> From: jaf30@cornell.edu
> To: jena-users@incubator.apache.org
> Subject: RE: to HTML froms
> Date: Thu, 2 Feb 2012 16:34:35 +0000
> 
> Hi Judy,
> 
> I haven't packaged up my sparql_importer module such that it's really ready for public distribution.   I mostly did it as a proof of concept to demonstrate how we could import content from a semantic web application developed here at Cornell (Vivo:  http://vivoweb.org) into a Drupal site.    I ended up writing a java web application (sort of similar in functionality to Elda, but before the LDA spec was written) that manages sparql queries against a triple store then transforms the results into multiple formations (primarily xml and json).  On the Drupal site I have a simple module which connects to the sparql service in the webapp, retrieves the response as JSON, converts it to an associative array (using json_decode()) and passes that array to a theming function.  The sparql services has been used in production for a little over a year but the site consuming that data is actually a Cold Fusion based CMS and it's retrieving the data as XML.
> 
> You might want to take a look at a module one of my colleagues wrote for Drupal called Linked Data Import (http://drupal.org/sandbox/milesw/1085078).  Miles has done some really interesting things integrating our VIVO semantic web application with Drupal and we're currently working on a project together for FAO (Food and Agriculture Organization of U.N.).   Miles is in Bangkok, I'm in New York, and our FAO person is in Rome so we've made good use of Skype.
> 
> 
> -----Original Message-----
> From: judy [mailto:judy@riotsystems.com] 
> Sent: Thursday, February 02, 2012 10:36 AM
> To: jena-users@incubator.apache.org
> Subject: Re: to HTML froms
> 
> Hi John,
> 
> I'm Judy Hertz, I lurk on jena-users. I saw this:
> 
> On 2/2/12 8:40 AM, John Fereira wrote:
> >    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.
> >
> >
> >
> I'm an avid user of Drupal/SPARQL/RDF -- have you made your feeds code public or are you otherwise sharing it?
> 
> thanks!
> 
> judy
> 
 		 	   		  

RE: to HTML froms

Posted by John Fereira <ja...@cornell.edu>.
Hi Judy,

I haven't packaged up my sparql_importer module such that it's really ready for public distribution.   I mostly did it as a proof of concept to demonstrate how we could import content from a semantic web application developed here at Cornell (Vivo:  http://vivoweb.org) into a Drupal site.    I ended up writing a java web application (sort of similar in functionality to Elda, but before the LDA spec was written) that manages sparql queries against a triple store then transforms the results into multiple formations (primarily xml and json).  On the Drupal site I have a simple module which connects to the sparql service in the webapp, retrieves the response as JSON, converts it to an associative array (using json_decode()) and passes that array to a theming function.  The sparql services has been used in production for a little over a year but the site consuming that data is actually a Cold Fusion based CMS and it's retrieving the data as XML.

You might want to take a look at a module one of my colleagues wrote for Drupal called Linked Data Import (http://drupal.org/sandbox/milesw/1085078).  Miles has done some really interesting things integrating our VIVO semantic web application with Drupal and we're currently working on a project together for FAO (Food and Agriculture Organization of U.N.).   Miles is in Bangkok, I'm in New York, and our FAO person is in Rome so we've made good use of Skype.


-----Original Message-----
From: judy [mailto:judy@riotsystems.com] 
Sent: Thursday, February 02, 2012 10:36 AM
To: jena-users@incubator.apache.org
Subject: Re: to HTML froms

Hi John,

I'm Judy Hertz, I lurk on jena-users. I saw this:

On 2/2/12 8:40 AM, John Fereira wrote:
>    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.
>
>
>
I'm an avid user of Drupal/SPARQL/RDF -- have you made your feeds code public or are you otherwise sharing it?

thanks!

judy


Re: to HTML froms

Posted by judy <ju...@riotsystems.com>.
Hi John,

I'm Judy Hertz, I lurk on jena-users. I saw this:

On 2/2/12 8:40 AM, John Fereira wrote:
>    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.
>
>
>
I'm an avid user of Drupal/SPARQL/RDF -- have you made your feeds code 
public or are you otherwise sharing it?

thanks!

judy


RE: to HTML froms

Posted by John Fereira <ja...@cornell.edu>.
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:martynas@graphity.org] 
Sent: Thursday, February 02, 2012 8:20 AM
To: jena-users@incubator.apache.org
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 <ca...@googlemail.com> 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 <gh...@hotmail.com> 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: castagna.lists@googlemail.com
>>>> To: jena-users@incubator.apache.org
>>>> 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
>>>>
>>>>

Re: to HTML froms

Posted by Martynas Jusevicius <ma...@graphity.org>.
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
<ca...@googlemail.com> 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/MessageBodyReader.html
>> [2] https://github.com/Graphity/graphity-core/blob/master/src/main/php/Graphity/Form/RDFForm.php
>>
>> Martynas
>> graphity.org
>>
>> On Thu, Feb 2, 2012 at 10:49 AM, Ghassan Alhamoud <gh...@hotmail.com> 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: castagna.lists@googlemail.com
>>>> To: jena-users@incubator.apache.org
>>>> 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
>>>>
>>>>

Re: to HTML froms

Posted by Paolo Castagna <ca...@googlemail.com>.
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/MessageBodyReader.html
> [2] https://github.com/Graphity/graphity-core/blob/master/src/main/php/Graphity/Form/RDFForm.php
> 
> Martynas
> graphity.org
> 
> On Thu, Feb 2, 2012 at 10:49 AM, Ghassan Alhamoud <gh...@hotmail.com> 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: castagna.lists@googlemail.com
>>> To: jena-users@incubator.apache.org
>>> 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
>>>
>>>

Re: to HTML froms

Posted by Martynas Jusevicius <ma...@graphity.org>.
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/MessageBodyReader.html
[2] https://github.com/Graphity/graphity-core/blob/master/src/main/php/Graphity/Form/RDFForm.php

Martynas
graphity.org

On Thu, Feb 2, 2012 at 10:49 AM, Ghassan Alhamoud <gh...@hotmail.com> 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: castagna.lists@googlemail.com
>> To: jena-users@incubator.apache.org
>> 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
>>
>>
>

RE: to HTML froms

Posted by Ghassan Alhamoud <gh...@hotmail.com>.
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: castagna.lists@googlemail.com
> To: jena-users@incubator.apache.org
> 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
> 
> 
 		 	   		  

Re: to HTML froms

Posted by Paolo Castagna <ca...@googlemail.com>.
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