Skip to search.
jena-dev · Jena Users

Group Information

  • Members: 2057
  • Category: Software
  • Founded: Sep 19, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
Reading the FOAF ontology   Message List  
Reply Message #10108 of 48263 |
Re: [jena-dev] Reading the FOAF ontology

Dave Reynolds wrote:
> First, there is a bug in the Jena reader's content negotiation. The FOAF
> site is configured to return human readable HTML instead of RDF unless you
> get the content negotiation right. Going direct to the URL Libby gave gets
> round that.

If you're seeing this issue with more than just the foaf
schema and need a more generic solution, a workaround is to
open the stream yourself supplying the appropriate headers,
thus:

String u = "http://xmlns.com/foaf/0.1/"; // or whatever
URL url = new URL(u);

URLConnection urlc = url.openConnection();
urlc.setRequestProperty("Accept", "application/rdf+xml");
urlc.connect();

InputStream in = urlc.getInputStream();
model.read(inStream, u);
inStream.close();

_______________________________________________
rich rdfx.org



Tue Aug 24, 2004 1:27 pm

ear1grey
Offline Offline
Send Email Send Email

Message #10108 of 48263 |
Expand Messages Author Sort by Date

Hi, I'm having trouble reading the FOAF ontology (at http://xmlns.com/foaf/0.1)= into an OntModel. No matter which ModelOntSpec I use, it will either contain...
hrelloem Offline Send Email Aug 23, 2004
6:19 pm

This might be a problem with the version of the FOAF vocabulary at that url - we're working on the site at the moment. Try http://xmlns.com/foaf/0.1/index.rdf ...
Libby Miller
millibby Offline Send Email
Aug 23, 2004
6:27 pm

Two other things to watch out for. First, there is a bug in the Jena reader's content negotiation. The FOAF site is configured to return human readable HTML...
Dave Reynolds
derihy Offline Send Email
Aug 24, 2004
7:38 am

* Dave Reynolds <der@...> [2004-08-24 08:38+0100] ... Maybe we should lose the 'import' statements? They're experimental and optional as far as I'm...
Dan Brickley
danbri3 Offline Send Email
Aug 24, 2004
8:49 am

Hi Dan, ... I'd be inclined to lose them but don't think it is critical either way. ... I belive that most OWL vocabs don't import owl.owl but that's at least ...
Dave Reynolds
derihy Offline Send Email
Aug 24, 2004
9:25 am

* Dave Reynolds <der@...> [2004-08-24 10:25+0100] ... Maybe I'll change owl:imports to rdfs:seeAlso, which is a bit more "passive voice". I never...
Dan Brickley
danbri3 Offline Send Email
Aug 24, 2004
10:18 am

... If you're seeing this issue with more than just the foaf schema and need a more generic solution, a workaround is to open the stream yourself supplying the...
rich boakes
ear1grey Offline Send Email
Aug 24, 2004
1:27 pm

* rich boakes <rich.boakes@...> [2004-08-24 14:27+0100] ... Thanks for the code. The current approach used at the FOAF namespace was an experiment,...
Dan Brickley
danbri3 Offline Send Email
Aug 24, 2004
2:16 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help