user3019767
user3019767

Reputation: 1

read rdf file online using JENA

i have written this code for reading and rdf file online. but it doesn't work

final String uri = "http://data.linkedmdb.org/page/film/1437";
final Model model = ModelFactory.createDefaultModel();
model.read(uri);
model.write(System.out);

Any help please?

Upvotes: 0

Views: 579

Answers (2)

loopasam
loopasam

Reputation: 3146

Your URI does not point to a RDF resource, it's a HTML web page. Try to use http://data.linkedmdb.org/data/film/1437 instead.

Upvotes: 2

Vinod
Vinod

Reputation: 61

I am not finding any error in the above code try with some other URI if that is working then the problem is with the URI try with the URI: http://www.ivan-herman.net/foaf.rdf this is one of the random URI I found on-line working try with it. Or may be you are not explicitly specifying the rdf filename may be that.

Upvotes: 0

Related Questions