# File lib/activerdf_rdflite/fetching.rb, line 13
13:   def fetch url
14:     # check if url starts with http://
15:                 return unless url.match(/http:\/\/(.*)/)
16: 
17:                 $activerdflog.debug "fetching from #{url}"
18: 
19:                 #model = Redland::Model.new
20:                 #parser = Redland::Parser.new('rdfxml')
21:                 #scan = Redland::Uri.new('http://feature.librdf.org/raptor-scanForRDF')
22:                 #enable = Redland::Literal.new('1')
23:                 #Redland::librdf_parser_set_feature(parser, scan.uri, enable.node)
24:                 #parser.parse_into_model(model, url)
25:                 #triples = Redland::Serializer.ntriples.model_to_string(nil, model)
26: 
27:                 triples = `rapper --scan --quiet "#{url}"`
28:                 lines = triples.split($/)
29:                 $activerdflog.debug "found #{lines.size} triples"
30: 
31:                 context = RDFS::Resource.new(url)
32:                 add_ntriples(triples, context)
33:   end