lib/activerdf_rdflite/fetching.rb in activerdf_rdflite-1.1 vs lib/activerdf_rdflite/fetching.rb in activerdf_rdflite-1.2
- old
+ new
@@ -1,18 +1,10 @@
-#class String
-# alias _match match
-# def match(*args)
-# m = _match(args.first)
-# if m && m.length > 1
-# args[1..-1].each_with_index do |name, index|
-# m.instance_eval "def #{name}; self[#{index+1}] end"
-# end
-# end
-# m
-# end
-#end
+# Author:: Eyal Oren
+# Copyright:: (c) 2005-2006 Eyal Oren
+# License:: LGPL
+# FetchingAdapter is an extension to rdflite for fetching RDF from online sources.
class FetchingAdapter < RDFLite
ConnectionPool.register_adapter(:fetching,self)
# fetches RDF/XML data from given url and adds it to the datastore, using the
# source url as context identifier.
@@ -39,5 +31,19 @@
context = RDFS::Resource.new(url)
add_ntriples(triples, context)
end
end
+
+#class String
+# alias _match match
+# def match(*args)
+# m = _match(args.first)
+# if m && m.length > 1
+# args[1..-1].each_with_index do |name, index|
+# m.instance_eval "def #{name}; self[#{index+1}] end"
+# end
+# end
+# m
+# end
+#end
+