Re: dbpedia lite

2010-05-20 Thread Fumihiro Kato
Hi Nicholas,

This is cool. Is there any plan to support other languages of Wikipedia?
I have tested your code with ja.wikipedia.org, and it looks working
well [1]. It may be a good start to provide dbpedia for each language.
For instance, a URI for a Japanese resource should be
http://ja.dbpedialite.org/things/ or something like that.

Fumi

[1] http://fumihiro.sakura.ne.jp:4567/

On Fri, May 14, 2010 at 9:55 PM, Nicholas Humfrey
 wrote:
> Hello,
>
> I have been working on a cut down version of dbpedia, called dbpedia lite:
>
> http://dbpedialite.org/
>
>
> "dbpedia lite takes some of the structured data in Wikipedia and presents it
> as Linked Data. It contains a small subset of the data that dbpedia
> contains; it does not attempt to extract data from the Wikipedia infoboxes.
> Data is fetched live from the Wikipedia API. It uses Wikipedia pageIds in
> its URIs to attempt to mitigate the problems of article titles changing over
> time."
>
> The reasons for building it are:
> - to try build a webapp with RDF.db, Spira, Sinatra and Heroku
> - to experiment with using Wikipedia page ids in URIs (instead of titles)
> - to create small (<10) number of triples per thing on a REST API
> - live data for all things in Wikipedia
> - fun!
>
> There is no query interface - only a RESTful interface that following the
> Linking Open Data principles.
>
> Source code is on GitHub:
> http://github.com/njh/dbpedialite
>
>
> nick.
>
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal 
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance 
> on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
>



Re: Java Framework for Content Negotiation

2010-05-20 Thread Richard Cyganiak


On 20 May 2010, at 13:38, Angelo Veltens wrote:
I might have a non-information resource http://example.org/resource/ 
foo


I could place a REST-Webservice there and do content negotiation  
with @GET / @Produces Annotations. But this seems not correct to me,  
because it is a non-information resource and not a html or rdf/xml  
document. So it should never return html or rdf/xml but do a 303  
redirect to an information resource instead, doesn't it?


I second Michael's recommendation to have a look at the Cool URIs for  
SemWeb document, in particular this section:

http://www.w3.org/TR/cooluris/#r303gendocument

But also:
http://www.w3.org/TR/cooluris/#hashuri
http://www.w3.org/TR/cooluris/#choosing

If you can build your site with hash URIs rather than 303 redirects, I  
highly recommend doing so.


Best,
Richard




Kind regards,
Angelo






Re: Java Framework for Content Negotiation

2010-05-20 Thread Richard Cyganiak

On 20 May 2010, at 10:49, Angelo Veltens wrote:

I am just looking for a framework to do content negotiation in java.


There's a reasonably stable and well-tested implementation that is  
used both in the Pubby and D2R Server codebases. See here:

http://d2rq-map.cvs.sourceforge.net/viewvc/d2rq-map/d2r-server/src/de/fuberlin/wiwiss/pubby/negotiation/

This just does the negotiation part (that is, matching an HTTP Accept  
header against a list of media types that the server supports,  
including support for q values). It only supports media type  
negotiation, there's nothing for language negotiation or encoding  
negotiation in there.


The package works like this: You configure a ContentTypeNegotiator  
with the media types supported by your app. Then you use its  
getBestMatch(...) method to determine the best response for a given  
request. The PubbyNegotiator class has a pre-configured negotiator for  
a server that supports HTML and various RDF syntaxes.


Best,
Richard


Currently I am checking the HttpServletRequest myself quick&dirty.  
Perhaps someone can recommend a framework/library that has solved  
this already.


Thanks in advance,
Angelo






Re: Java Framework for Content Negotiation

2010-05-20 Thread Michael Hausenblas
Angelo,

> I might have a non-information resource http://example.org/resource/foo
> 
> I could place a REST-Webservice there and do content negotiation with
> @GET / @Produces Annotations. But this seems not correct to me, because
> it is a non-information resource and not a html or rdf/xml document. So
> it should never return html or rdf/xml but do a 303 redirect to an
> information resource instead, doesn't it?

This is a recurring pattern and people tend to confuse things (conneg and
303), in my experience. I assume you've read [1], already ? ;)

Without more detailed knowledge about what you want to achieve it is hard
for me to tell you anything beyond what has been discussed in various
forums.

Can you give me a more concrete description of your setup and goals? How
does your data look like? What's the task you try to solve? Etc.

Cheers,
  Michael

[1] http://www.w3.org/TR/cooluris/

-- 
Dr. Michael Hausenblas
LiDRC - Linked Data Research Centre
DERI - Digital Enterprise Research Institute
NUIG - National University of Ireland, Galway
Ireland, Europe
Tel. +353 91 495730
http://linkeddata.deri.ie/
http://sw-app.org/about.html



> From: Angelo Veltens 
> Date: Thu, 20 May 2010 14:38:53 +0200
> To: Linked Data community 
> Subject: Re: Java Framework for Content Negotiation
> Resent-From: Linked Data community 
> Resent-Date: Thu, 20 May 2010 12:39:34 +
> 
> On 20.05.2010 12:18, Michael Hausenblas wrote:
>>> There's also Jersey [1]  ...
>>>  
>> +1 to Jersey - had overall very good experience with it. If you want to have
>> a quick look (not saying it's beautiful/exciting, but might helps to
>> kick-start things) see [1] for my hacking with it.
>> 
>> Cheers,
>>Michael
>> 
>> [1] http://bitbucket.org/mhausenblas/sparestfulql/
>>
> 
> Mmh, i have been thinking about using REST-Webservice already, but there
> is one thing i'm quite unsteady with:
> 
> I might have a non-information resource http://example.org/resource/foo
> 
> I could place a REST-Webservice there and do content negotiation with
> @GET / @Produces Annotations. But this seems not correct to me, because
> it is a non-information resource and not a html or rdf/xml document. So
> it should never return html or rdf/xml but do a 303 redirect to an
> information resource instead, doesn't it?
> 
> Kind regards,
> Angelo
> 




Re: Java Framework for Content Negotiation

2010-05-20 Thread Angelo Veltens

On 20.05.2010 12:18, Michael Hausenblas wrote:

There's also Jersey [1]  ...
 

+1 to Jersey - had overall very good experience with it. If you want to have
a quick look (not saying it's beautiful/exciting, but might helps to
kick-start things) see [1] for my hacking with it.

Cheers,
   Michael

[1] http://bitbucket.org/mhausenblas/sparestfulql/
   


Mmh, i have been thinking about using REST-Webservice already, but there 
is one thing i'm quite unsteady with:


I might have a non-information resource http://example.org/resource/foo

I could place a REST-Webservice there and do content negotiation with 
@GET / @Produces Annotations. But this seems not correct to me, because 
it is a non-information resource and not a html or rdf/xml document. So 
it should never return html or rdf/xml but do a 303 redirect to an 
information resource instead, doesn't it?


Kind regards,
Angelo



Re: Java Framework for Content Negotiation

2010-05-20 Thread Story Henry
On 20 May 2010, at 11:18, Michael Hausenblas wrote:
> 
>> There's also Jersey [1]  ...
> 
> +1 to Jersey - had overall very good experience with it. If you want to have
> a quick look (not saying it's beautiful/exciting, but might helps to
> kick-start things) see [1] for my hacking with it.

Since this is an RDF list, I wrote a blog post on how one could use Jersey to 
create
linked data using annotations on objects

http://blogs.sun.com/bblfish/entry/serialising_java_objects_to_rdf

Something that could be looked into in more detail I have not had time to
pursue it since then, but others are welcome to continue from there

Henry




> 
> Cheers,
>  Michael
> 
> [1] http://bitbucket.org/mhausenblas/sparestfulql/
> 
> -- 
> Dr. Michael Hausenblas
> LiDRC - Linked Data Research Centre
> DERI - Digital Enterprise Research Institute
> NUIG - National University of Ireland, Galway
> Ireland, Europe
> Tel. +353 91 495730
> http://linkeddata.deri.ie/
> http://sw-app.org/about.html
> 
> 
> 
>> From: Dave Reynolds 
>> Date: Thu, 20 May 2010 11:08:03 +0100
>> To: Angelo Veltens 
>> Cc: Linked Data community 
>> Subject: Re: Java Framework for Content Negotiation
>> Resent-From: Linked Data community 
>> Resent-Date: Thu, 20 May 2010 10:08:45 +
>> 
>> On 20/05/2010 11:03, Story Henry wrote:
>>> There is the RESTlet framework http://www.restlet.org/
>> 
>> There's also Jersey [1] and, for a minimalist solution to just the
>> content matching piece see Mimeparse [2].
>> 
>> Dave
>> 
>> [1] https://jersey.dev.java.net/
>> [2] http://code.google.com/p/mimeparse/
>> 
>>> On 20 May 2010, at 10:49, Angelo Veltens wrote:
>>> 
 Hello,
 
 I am just looking for a framework to do content negotiation in java.
 Currently I am checking the HttpServletRequest myself quick&dirty. Perhaps
 someone can recommend a framework/library that has solved this already.
 
 Thanks in advance,
 Angelo
 
>>> 
>>> 
>> 
>> 
> 
> 




Re: Java Framework for Content Negotiation

2010-05-20 Thread Michael Hausenblas

> There's also Jersey [1]  ...

+1 to Jersey - had overall very good experience with it. If you want to have
a quick look (not saying it's beautiful/exciting, but might helps to
kick-start things) see [1] for my hacking with it.

Cheers,
  Michael

[1] http://bitbucket.org/mhausenblas/sparestfulql/

-- 
Dr. Michael Hausenblas
LiDRC - Linked Data Research Centre
DERI - Digital Enterprise Research Institute
NUIG - National University of Ireland, Galway
Ireland, Europe
Tel. +353 91 495730
http://linkeddata.deri.ie/
http://sw-app.org/about.html



> From: Dave Reynolds 
> Date: Thu, 20 May 2010 11:08:03 +0100
> To: Angelo Veltens 
> Cc: Linked Data community 
> Subject: Re: Java Framework for Content Negotiation
> Resent-From: Linked Data community 
> Resent-Date: Thu, 20 May 2010 10:08:45 +
> 
> On 20/05/2010 11:03, Story Henry wrote:
>> There is the RESTlet framework http://www.restlet.org/
> 
> There's also Jersey [1] and, for a minimalist solution to just the
> content matching piece see Mimeparse [2].
> 
> Dave
> 
> [1] https://jersey.dev.java.net/
> [2] http://code.google.com/p/mimeparse/
> 
>> On 20 May 2010, at 10:49, Angelo Veltens wrote:
>> 
>>> Hello,
>>> 
>>> I am just looking for a framework to do content negotiation in java.
>>> Currently I am checking the HttpServletRequest myself quick&dirty. Perhaps
>>> someone can recommend a framework/library that has solved this already.
>>> 
>>> Thanks in advance,
>>> Angelo
>>> 
>> 
>> 
> 
> 




Re: Java Framework for Content Negotiation

2010-05-20 Thread Dave Reynolds

On 20/05/2010 11:03, Story Henry wrote:

There is the RESTlet framework http://www.restlet.org/


There's also Jersey [1] and, for a minimalist solution to just the 
content matching piece see Mimeparse [2].


Dave

[1] https://jersey.dev.java.net/
[2] http://code.google.com/p/mimeparse/


On 20 May 2010, at 10:49, Angelo Veltens wrote:


Hello,

I am just looking for a framework to do content negotiation in java. Currently I am 
checking the HttpServletRequest myself quick&dirty. Perhaps someone can 
recommend a framework/library that has solved this already.

Thanks in advance,
Angelo









Re: Java Framework for Content Negotiation

2010-05-20 Thread Niklas Lindström
Hi Angelo,

On Thu, May 20, 2010 at 11:49 AM, Angelo Veltens
 wrote:
> Hello,
>
> I am just looking for a framework to do content negotiation in java.
> Currently I am checking the HttpServletRequest myself quick&dirty. Perhaps
> someone can recommend a framework/library that has solved this already.

I suggest taking a look at Restlet [1], which has support for both the
client and server side of conneg (and a lot more).

Best regards,
Niklas

[1]: http://www.restlet.org/



Re: Java Framework for Content Negotiation

2010-05-20 Thread Story Henry
There is the RESTlet framework http://www.restlet.org/

Henry

On 20 May 2010, at 10:49, Angelo Veltens wrote:

> Hello,
> 
> I am just looking for a framework to do content negotiation in java. 
> Currently I am checking the HttpServletRequest myself quick&dirty. Perhaps 
> someone can recommend a framework/library that has solved this already.
> 
> Thanks in advance,
> Angelo
> 




Java Framework for Content Negotiation

2010-05-20 Thread Angelo Veltens

Hello,

I am just looking for a framework to do content negotiation in java. 
Currently I am checking the HttpServletRequest myself quick&dirty. 
Perhaps someone can recommend a framework/library that has solved this 
already.


Thanks in advance,
Angelo



Re: dbpedia lite

2010-05-20 Thread Ivan Herman

On May 20, 2010, at 10:51 , Nicholas Humfrey wrote:

> 
>> I also tried
>> 
>> curl -i -H "Accept: text/turtle" http://dbpedialite.org/things/52780
>> 
>> and it said: unsupported format: text/turtle
>> 
>> (text/turtle is the media type defined in [1])
>> 
>> But when running the RDFa distiller (or any similar service) on the URI,
>> regardless of media type, the content is correct.
> 
> Sorry Ivan. No Turtle support yet...
> 
> 

I understand, that is fine...

In the meantime what you can do is to add an .htaccess entry that redirect the 
turtle version to a call to an online RDFa extractor that produces turtle. This 
is not optimal at all, because it leads to another request somewhere else, but 
may be fine as a temporary measure... Just an idea!

Cheers

Ivan


> nick.
> 
> 
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal 
> views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance 
> on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>   



Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf







smime.p7s
Description: S/MIME cryptographic signature


Re: dbpedia lite

2010-05-20 Thread Nicholas Humfrey
> Nicholas Humfrey wrote:
>>> Re. , any chance that you could add >> rel="alternate" .../> links in  such that the HTML based
>>> Descriptor Docs are associated with alternative Descriptor Docs in
>>> different formats (JSON, N3 etc..).
>>> 
>> 
>> Yes, certainly. I have put this on my Todo list.
>> 
>>   
>>> In addition, would you consider adding RDFa into the HTML Descriptor
>>> docs such that they to becomes a machine readable structured Linked Data
>>> Sources for RDFa aware agents etc.
>>> 
>> 
>> There is RDFa already there for the Thing pages. Is there something missing?
>> Is it Void type stuff that you want me to add to the RDFa?
>>   
> 
> Hmm, I get:
> http://linkeddata.uriburner.com/about/html/http/dbpedialite.org/things/52780
> 
> Which returns:
> Unable to retrieve RDF data from "http://dbpedialite.org/things/52780":
> HTTP/1.0 400 Bad Request


Hi Kingsley,

No RDF/XML or proper content negotiation yet. Coming soon hopefully.

There is support for N-Triples and JSON:
curl -i -H "Accept: text/plain" http://dbpedialite.org/things/52780
curl -i -H "Accept: application/json" http://dbpedialite.org/things/52780


nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.




Re: dbpedia lite

2010-05-20 Thread Nicholas Humfrey
Hi Joe,

> I always assumed MediaWiki renames occurred by creating a new pageid
> with the old content and updating the old pageid's content like
> #REDIRECT [[newPageTitle]].

It looks like the pageids are stable(ish) and that a pageid doesn't change
after a rename.


> Do they actually retitle the old pageid
> and create a new pageid with the old title redirecting to the old
> pageid with the new title?

Yes, it does seem that way.


nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.




Re: dbpedia lite

2010-05-20 Thread Nicholas Humfrey

> I also tried
> 
> curl -i -H "Accept: text/turtle" http://dbpedialite.org/things/52780
> 
> and it said: unsupported format: text/turtle
> 
> (text/turtle is the media type defined in [1])
> 
> But when running the RDFa distiller (or any similar service) on the URI,
> regardless of media type, the content is correct.

Sorry Ivan. No Turtle support yet...


nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.




Re: dbpedia lite

2010-05-20 Thread Nicholas Humfrey
On 19/05/2010 13:25, "Ross Singer"  wrote:

> Nicholas,
> 
> Given that you're using Sinatra, you might want use
> http://github.com/mbklein/rack-conneg for your content negotiation
> (not sure why RDF.rb would be involved in that layer, anyway) and use
> either rdf-raptor or RdfContext to supply the various serializations.

The bit that would be valuable from RDF.rb is the list of supported MIME
types and associated q values. Arto has said that he is working on
something, so I am going to wait and see what that is.

I don't think rdf-raptor will work on Heroku, because of the lack of
libraptor. I am not sure how much work it would be to bundle raptor into the
rdf-raptor gem, but probably not worth it.

It would be great to use the RdfContext serialisers with RDF.rb.


nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.




Re: dbpedia lite

2010-05-20 Thread Nicholas Humfrey
> Nicholas:
> 
> Check out the MimeParse project on GoogleCode for a nice set of
> language bindings (including Ruby) that does a very good job of
> following the RFC2616 (sec 14.1) for content-negotiation:
> http://code.google.com/p/mimeparse/

Thanks,

I will keep that in mind.

nick.


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal 
views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on 
it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.