- From: Franco Rondini <rondinif@yahoo.it>
- Date: Tue, 9 Aug 2011 20:49:18 +0200
- To: public-rdf-ruby@w3.org
- Cc: Gregg Kellogg <gregg@kellogg-assoc.com>, Marcel Otto <marcelotto@gmx.de>
- Message-Id: <459220AF-1C19-40C9-AC53-21F62ADD8BC4@yahoo.it>
excuse me if the problem may seem trivial but I'm still not able to load a Graph from a owl file directly stored on the local filesystem. Can you help me to point the right direction? ### attempt N.1 from /Users/ronda/.rvm/rubies/ruby-1.9.2-p290/bin/irb:16:in `<main>' ruby-1.9.2-p290 :038 > uri = RDF::URI.new(:scheme => 'file', :path => 'owl.owl', :host => '/Users/ronda/Downloads') => #<RDF::URI:0x80fc6004(file:///Users/ronda/Downloads/owl.owl)> ruby-1.9.2-p290 :039 > g2 = RDF::Graph.load( uri ) Errno::ENOENT: No such file or directory - file:///Users/ronda/Downloads/owl.owl ### attempt N.2 ruby-1.9.2-p290 :029 > g3 = RDF::Graph.load("/Users/ronda/Downloads/owl.owl") Ronda filename:/Users/ronda/Downloads/owl.owlRDF::FormatError: unknown RDF format: {:base_uri=>#<RDF::URI:0x82c96ae4(/Users/ronda/Downloads/owl.owl)>, :file_name=>"/Users/ronda/Downloads/owl.owl"} orks fine from http ruby-1.9.2-p290 :004 > g = RDF::Graph.load( RDF::OWL ) => #<RDF::Graph:0x81469084(http://www.w3.org/2002/07/owl#)> ruby-1.9.2-p290 :005 > g.count # => 450 the file used for the tests is obtaineid this way: [ 02:55:46 ] > cd ~/Downloads/ [ ronda@MacBook-di-Franco-Rondini.local ~/Downloads ] [ 08:37:31 ] > wget http://www.w3.org/2002/07/owl --2011-08-09 20:37:49-- http://www.w3.org/2002/07/owl Resolving www.w3.org... 128.30.52.37 Connecting to www.w3.org|128.30.52.37|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 31861 (31K) [application/rdf+xml] Saving to: `owl.1' 100%[==================================================================================================================>] 31,861 45.7K/s in 0.7s 2011-08-09 20:37:51 (45.7 KB/s) - `owl.1' saved [31861/31861] [ ronda@MacBook-di-Franco-Rondini.local ~/Downloads ] [ 08:38:31 ] > mv owl.1 owl.owl [ ronda@MacBook-di-Franco-Rondini.local ~/Downloads ] [ 08:38:47 ] > less owl.owl in the editor it looks good to me. thanks and greetings Franco Il giorno 08/ago/2011, alle ore 22.45, Marcel Otto ha scritto: > Works fine now. Also the dump seems ok to me. > > Thank you very much for the rapid fix > Marcel > > Am 08.08.2011 22:01, schrieb Gregg Kellogg: >> >> A simple matter of RTFM, to get Nokogiri to decode entities. >> >> Updated gem to version 0.3.4, update with "(sudo) gem update rdf-rdfxml" you should now see the following: >> >> require 'linked data' >> g = RDF::Graph.load( RDF::OWL ) >> g.count # => 450 >> >> Also, try the following: >> >> g.dump(:ttl, :standard_prefixes => true) >> >> Gregg >> >> >> On Aug 8, 2011, at 10:14 AM, Marcel Otto wrote: >> >>> g = RDF::Graph.load( RDF::OWL ) >> >
Received on Thursday, 11 August 2011 22:39:41 UTC