activerdf_rdflite 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/activerdf_rdflite/rdflite.rb +34 -19
- data/test/test_data.nt +18 -18
- data/test/test_fetching.rb +1 -1
- data/test/test_rdflite.rb +13 -1
- metadata +56 -98
- data/doc/rdoc/classes/FetchingAdapter.html +0 -150
- data/doc/rdoc/classes/FetchingAdapter.src/M000015.html +0 -36
- data/doc/rdoc/classes/RDFLite.html +0 -390
- data/doc/rdoc/classes/RDFLite.src/M000001.html +0 -55
- data/doc/rdoc/classes/RDFLite.src/M000002.html +0 -18
- data/doc/rdoc/classes/RDFLite.src/M000003.html +0 -20
- data/doc/rdoc/classes/RDFLite.src/M000004.html +0 -18
- data/doc/rdoc/classes/RDFLite.src/M000005.html +0 -45
- data/doc/rdoc/classes/RDFLite.src/M000006.html +0 -32
- data/doc/rdoc/classes/RDFLite.src/M000007.html +0 -20
- data/doc/rdoc/classes/RDFLite.src/M000008.html +0 -24
- data/doc/rdoc/classes/RDFLite.src/M000009.html +0 -36
- data/doc/rdoc/classes/RDFLite.src/M000010.html +0 -33
- data/doc/rdoc/classes/RDFLite.src/M000011.html +0 -19
- data/doc/rdoc/classes/RDFLite.src/M000012.html +0 -27
- data/doc/rdoc/classes/SuggestingAdapter.html +0 -190
- data/doc/rdoc/classes/SuggestingAdapter.src/M000013.html +0 -23
- data/doc/rdoc/classes/SuggestingAdapter.src/M000014.html +0 -46
- data/doc/rdoc/created.rid +0 -1
- data/doc/rdoc/files/LICENSE.html +0 -756
- data/doc/rdoc/files/README.html +0 -127
- data/doc/rdoc/files/lib/activerdf_rdflite/fetching_rb.html +0 -115
- data/doc/rdoc/files/lib/activerdf_rdflite/init_rb.html +0 -116
- data/doc/rdoc/files/lib/activerdf_rdflite/rdflite_rb.html +0 -127
- data/doc/rdoc/files/lib/activerdf_rdflite/suggesting_rb.html +0 -115
- data/doc/rdoc/fr_class_index.html +0 -30
- data/doc/rdoc/fr_file_index.html +0 -32
- data/doc/rdoc/fr_method_index.html +0 -42
- data/doc/rdoc/index.html +0 -24
- data/doc/rdoc/rdoc-style.css +0 -208
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== activerdf_rdflite (1.4) ???
|
2
|
+
* caching subproperty reasoning
|
3
|
+
* added adapter.close method (TODO: not finished)
|
4
|
+
|
1
5
|
== activerdf_rdflite (1.3) Tue, 27 Feb 2007 20:53:21 +0000
|
2
6
|
* fixed literals with escape characters rdflite
|
3
7
|
* fixed parsing of content-encoded (HTML) literals
|
@@ -46,6 +46,7 @@ class RDFLite < ActiveRdfAdapter
|
|
46
46
|
@keyword_search &= @@have_ferret
|
47
47
|
|
48
48
|
@reasoning = params[:reasoning] || false
|
49
|
+
@subprops = {} if @reasoning
|
49
50
|
|
50
51
|
if keyword_search?
|
51
52
|
# we initialise the ferret index, either as a file or in memory
|
@@ -89,6 +90,12 @@ class RDFLite < ActiveRdfAdapter
|
|
89
90
|
@db.execute('delete from triple')
|
90
91
|
end
|
91
92
|
|
93
|
+
# close adapter and remove it from the ConnectionPool
|
94
|
+
def close
|
95
|
+
ConnectionPool.remove_data_source(self)
|
96
|
+
# TODO: close rdflite data source
|
97
|
+
end
|
98
|
+
|
92
99
|
# deletes triple(s,p,o,c) from datastore
|
93
100
|
# symbol parameters match anything: delete(:s,:p,:o) will delete all triples
|
94
101
|
# you can specify a context to limit deletion to that context:
|
@@ -251,12 +258,15 @@ class RDFLite < ActiveRdfAdapter
|
|
251
258
|
|
252
259
|
# sort query results on variable clause (optionally)
|
253
260
|
def construct_sort(query)
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
261
|
+
if not query.sort_clauses.empty?
|
262
|
+
sort = query.sort_clauses.collect { |term| variable_name(query, term) }
|
263
|
+
" order by (#{sort.join(',')})"
|
264
|
+
elsif not query.reverse_sort_clauses.empty?
|
265
|
+
sort = query.reverse_sort_clauses.collect { |term| variable_name(query, term) }
|
266
|
+
" order by (#{sort.join(',')}) DESC"
|
267
|
+
else
|
268
|
+
""
|
269
|
+
end
|
260
270
|
end
|
261
271
|
|
262
272
|
# construct join clause
|
@@ -368,7 +378,7 @@ class RDFLite < ActiveRdfAdapter
|
|
368
378
|
end
|
369
379
|
|
370
380
|
# if keyword clause given, convert it using keyword index
|
371
|
-
if query.keyword?
|
381
|
+
if query.keyword? && keyword_search?
|
372
382
|
subjects = []
|
373
383
|
select_subject = query.keywords.collect {|subj,key| subj}.uniq
|
374
384
|
raise ActiveRdfError, "cannot do keyword search over multiple subjects" if select_subject.size > 1
|
@@ -412,16 +422,21 @@ class RDFLite < ActiveRdfAdapter
|
|
412
422
|
end
|
413
423
|
|
414
424
|
def subproperties(resource)
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
+
# compute and store subproperties of this resource
|
426
|
+
# or use earlier computed value if available
|
427
|
+
unless @subprops[resource]
|
428
|
+
subproperty = Namespace.lookup(:rdfs,:subPropertyOf)
|
429
|
+
children_query = Query.new.distinct(:sub).where(:sub, subproperty, resource)
|
430
|
+
children_query.reasoning = false
|
431
|
+
children = children_query.execute
|
432
|
+
|
433
|
+
if children.empty?
|
434
|
+
@subprops[resource] = [resource]
|
435
|
+
else
|
436
|
+
@subprops[resource] = [resource] + children.collect{|c| subproperties(c)}.flatten.compact
|
437
|
+
end
|
438
|
+
end
|
439
|
+
@subprops[resource]
|
425
440
|
end
|
426
441
|
|
427
442
|
# returns sql variable name for a queryterm
|
@@ -446,7 +461,7 @@ class RDFLite < ActiveRdfAdapter
|
|
446
461
|
if query.keywords.keys.include?(term)
|
447
462
|
return "t0.s"
|
448
463
|
else
|
449
|
-
raise ActiveRdfError,
|
464
|
+
raise ActiveRdfError, "unbound variable :#{term.to_s} in select of #{query.to_sp}"
|
450
465
|
end
|
451
466
|
end
|
452
467
|
|
@@ -490,7 +505,7 @@ class RDFLite < ActiveRdfAdapter
|
|
490
505
|
@db.execute('create index if not exists pidx on triple(p)') if pidx
|
491
506
|
@db.execute('create index if not exists oidx on triple(o)') if oidx
|
492
507
|
@db.execute('create index if not exists spidx on triple(s,p)') if spidx
|
493
|
-
@db.execute('create index if not exists soidx on triple(s,
|
508
|
+
@db.execute('create index if not exists soidx on triple(s,o)') if soidx
|
494
509
|
@db.execute('create index if not exists poidx on triple(p,o)') if poidx
|
495
510
|
@db.execute('create index if not exists opidx on triple(o,p)') if opidx
|
496
511
|
end
|
data/test/test_data.nt
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
<http://activerdf.org/test/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
2
|
+
<http://activerdf.org/test/Person> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
2
3
|
<http://activerdf.org/test/Person> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
3
|
-
<http://activerdf.org/test/eyal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://activerdf.org/test/Person> .
|
4
|
-
<http://activerdf.org/test/eyal> <http://activerdf.org/test/age> "27" .
|
5
|
-
<http://activerdf.org/test/eyal> <http://activerdf.org/test/name> "Eyal Oren" .
|
6
|
-
<http://activerdf.org/test/eyal> <http://activerdf.org/test/eye> "blue" .
|
7
|
-
<http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
8
|
-
<http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
9
|
-
<http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
10
4
|
<http://activerdf.org/test/age> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
11
|
-
<http://activerdf.org/test/
|
12
|
-
<http://activerdf.org/test/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
5
|
+
<http://activerdf.org/test/age> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
13
6
|
<http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
|
7
|
+
<http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
14
8
|
<http://activerdf.org/test/age> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
|
15
|
-
<http://activerdf.org/test/
|
16
|
-
<http://activerdf.org/test/
|
9
|
+
<http://activerdf.org/test/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
10
|
+
<http://activerdf.org/test/car> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
17
11
|
<http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
|
12
|
+
<http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
18
13
|
<http://activerdf.org/test/car> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
|
19
|
-
<http://activerdf.org/test/
|
20
|
-
<http://activerdf.org/test/
|
14
|
+
<http://activerdf.org/test/eyal> <http://activerdf.org/test/age> "27" .
|
15
|
+
<http://activerdf.org/test/eyal> <http://activerdf.org/test/eye> "blue" .
|
16
|
+
<http://activerdf.org/test/eyal> <http://activerdf.org/test/name> "Eyal Oren" .
|
17
|
+
<http://activerdf.org/test/eyal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://activerdf.org/test/Person> .
|
21
18
|
<http://activerdf.org/test/eyal> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
22
|
-
<http://activerdf.org/test/
|
23
|
-
<http://activerdf.org/test/
|
24
|
-
<http://
|
25
|
-
<http://
|
19
|
+
<http://activerdf.org/test/eye> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
|
20
|
+
<http://activerdf.org/test/eye> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
21
|
+
<http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#domain> <http://activerdf.org/test/Person> .
|
22
|
+
<http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
23
|
+
<http://activerdf.org/test/eye> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal> .
|
26
24
|
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
27
25
|
<http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
28
26
|
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#domain> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
29
27
|
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
30
|
-
|
28
|
+
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Class> .
|
29
|
+
<http://www.w3.org/2000/01/rdf-schema#Class> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Resource> .
|
31
30
|
_:#1 <http://activerdf.org/test/age> "29" .
|
32
31
|
_:#1 <http://activerdf.org/test/name> "Another Person" .
|
32
|
+
_:#1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://activerdf.org/test/Person> .
|
data/test/test_fetching.rb
CHANGED
data/test/test_rdflite.rb
CHANGED
@@ -40,7 +40,6 @@ class TestRdfLiteAdapter < Test::Unit::TestCase
|
|
40
40
|
assert_equal adapter1.object_id, adapter2.object_id
|
41
41
|
end
|
42
42
|
|
43
|
-
|
44
43
|
def test_simple_query
|
45
44
|
adapter = ConnectionPool.add_data_source(:type => :rdflite)
|
46
45
|
|
@@ -260,4 +259,17 @@ class TestRdfLiteAdapter < Test::Unit::TestCase
|
|
260
259
|
query.where(:Mary, :p, :Anne)
|
261
260
|
assert_equal 1, query.execute.size
|
262
261
|
end
|
262
|
+
|
263
|
+
def test_limit_and_offset
|
264
|
+
adapter = ConnectionPool.add_data_source :type => :rdflite
|
265
|
+
adapter.load(File.dirname(File.expand_path(__FILE__)) + '/test_data.nt')
|
266
|
+
Namespace.register(:test, 'http://activerdf.org/test/')
|
267
|
+
|
268
|
+
assert_equal 7, RDFS::Resource.find(:all).size
|
269
|
+
assert_equal 5, RDFS::Resource.find(:all, :limit => 5).size
|
270
|
+
assert_equal 4, RDFS::Resource.find(:all, :limit => 4, :offset => 3).size
|
271
|
+
assert RDFS::Resource.find(:all, :limit => 4, :offset => 3) != RDFS::Resource.find(:all, :limit => 4)
|
272
|
+
|
273
|
+
assert_equal [TEST::eyal, TEST::age, TEST::car], RDFS::Resource.find(:all, :limit => 3, :order => RDF::type)
|
274
|
+
end
|
263
275
|
end
|
metadata
CHANGED
@@ -1,130 +1,88 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.2
|
3
|
-
specification_version: 1
|
4
|
-
name: activerdf_rdflite
|
5
|
-
version: !ruby/object:Gem::Version
|
6
|
-
version: "1.3"
|
7
|
-
date: 2007-02-27 00:00:00 +00:00
|
8
|
-
summary: an RDF database for usage in ActiveRDF (based on sqlite3)
|
9
|
-
require_paths:
|
10
|
-
- lib
|
11
|
-
email:
|
1
|
+
--- !ruby/object:Gem::Specification
|
12
2
|
homepage:
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
bindir: bin
|
18
|
-
has_rdoc: true
|
19
|
-
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 0.0.0
|
24
|
-
version:
|
25
|
-
platform: ruby
|
26
|
-
signing_key:
|
27
|
-
cert_chain:
|
3
|
+
extensions: []
|
4
|
+
executables: []
|
5
|
+
version: !ruby/object:Gem::Version
|
6
|
+
version: !str 1.4
|
28
7
|
post_install_message:
|
29
|
-
|
30
|
-
- Eyal Oren <eyal.oren@deri.org
|
8
|
+
date: 2007-09-01 22:00:00 +00:00
|
31
9
|
files:
|
32
10
|
- LICENSE
|
33
11
|
- README
|
34
12
|
- CHANGELOG
|
35
|
-
- doc/rdoc/created.rid
|
36
|
-
- doc/rdoc/rdoc-style.css
|
37
|
-
- doc/rdoc/files
|
38
|
-
- doc/rdoc/classes
|
39
|
-
- doc/rdoc/fr_file_index.html
|
40
|
-
- doc/rdoc/fr_class_index.html
|
41
|
-
- doc/rdoc/fr_method_index.html
|
42
|
-
- doc/rdoc/index.html
|
43
|
-
- doc/rdoc/files/README.html
|
44
|
-
- doc/rdoc/files/LICENSE.html
|
45
|
-
- doc/rdoc/files/lib
|
46
|
-
- doc/rdoc/files/lib/activerdf_rdflite
|
47
|
-
- doc/rdoc/files/lib/activerdf_rdflite/fetching_rb.html
|
48
|
-
- doc/rdoc/files/lib/activerdf_rdflite/init_rb.html
|
49
|
-
- doc/rdoc/files/lib/activerdf_rdflite/rdflite_rb.html
|
50
|
-
- doc/rdoc/files/lib/activerdf_rdflite/suggesting_rb.html
|
51
|
-
- doc/rdoc/classes/RDFLite.src
|
52
|
-
- doc/rdoc/classes/SuggestingAdapter.src
|
53
|
-
- doc/rdoc/classes/FetchingAdapter.src
|
54
|
-
- doc/rdoc/classes/RDFLite.html
|
55
|
-
- doc/rdoc/classes/SuggestingAdapter.html
|
56
|
-
- doc/rdoc/classes/FetchingAdapter.html
|
57
|
-
- doc/rdoc/classes/RDFLite.src/M000001.html
|
58
|
-
- doc/rdoc/classes/RDFLite.src/M000002.html
|
59
|
-
- doc/rdoc/classes/RDFLite.src/M000003.html
|
60
|
-
- doc/rdoc/classes/RDFLite.src/M000004.html
|
61
|
-
- doc/rdoc/classes/RDFLite.src/M000005.html
|
62
|
-
- doc/rdoc/classes/RDFLite.src/M000006.html
|
63
|
-
- doc/rdoc/classes/RDFLite.src/M000007.html
|
64
|
-
- doc/rdoc/classes/RDFLite.src/M000008.html
|
65
|
-
- doc/rdoc/classes/RDFLite.src/M000009.html
|
66
|
-
- doc/rdoc/classes/RDFLite.src/M000010.html
|
67
|
-
- doc/rdoc/classes/RDFLite.src/M000011.html
|
68
|
-
- doc/rdoc/classes/RDFLite.src/M000012.html
|
69
|
-
- doc/rdoc/classes/SuggestingAdapter.src/M000013.html
|
70
|
-
- doc/rdoc/classes/SuggestingAdapter.src/M000014.html
|
71
|
-
- doc/rdoc/classes/FetchingAdapter.src/M000015.html
|
72
13
|
- test/test_bnode_data.nt
|
73
14
|
- test/test_data.nt
|
15
|
+
- test/test_escaped_data.nt
|
74
16
|
- test/test_fetching.rb
|
75
17
|
- test/test_rdflite.rb
|
76
|
-
- test/test_escaped_data.nt
|
77
18
|
- lib/activerdf_rdflite
|
78
19
|
- lib/activerdf_rdflite/fetching.rb
|
79
20
|
- lib/activerdf_rdflite/init.rb
|
80
21
|
- lib/activerdf_rdflite/rdflite.rb
|
81
22
|
- lib/activerdf_rdflite/suggesting.rb
|
82
|
-
|
83
|
-
|
23
|
+
rubygems_version: 0.9.4
|
84
24
|
rdoc_options: []
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
25
|
+
signing_key:
|
26
|
+
cert_chain:
|
27
|
+
name: activerdf_rdflite
|
28
|
+
has_rdoc: true
|
29
|
+
platform: ruby
|
30
|
+
summary: an RDF database for usage in ActiveRDF (based on sqlite3)
|
31
|
+
default_executable:
|
32
|
+
bindir: bin
|
33
|
+
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
34
|
+
version:
|
35
|
+
requirements:
|
36
|
+
- - '>'
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: 0.0.0
|
39
|
+
require_paths:
|
40
|
+
- lib
|
41
|
+
specification_version: 1
|
42
|
+
test_files: []
|
94
43
|
dependencies:
|
95
|
-
- !ruby/object:Gem::Dependency
|
44
|
+
- !ruby/object:Gem::Dependency
|
96
45
|
name: gem_plugin
|
97
46
|
version_requirement:
|
98
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
47
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
48
|
+
version:
|
99
49
|
requirements:
|
100
|
-
- -
|
101
|
-
- !ruby/object:Gem::Version
|
50
|
+
- - '>='
|
51
|
+
- !ruby/object:Gem::Version
|
102
52
|
version: 0.2.1
|
103
|
-
|
104
|
-
- !ruby/object:Gem::Dependency
|
53
|
+
- !ruby/object:Gem::Dependency
|
105
54
|
name: uuidtools
|
106
55
|
version_requirement:
|
107
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
56
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
57
|
+
version:
|
108
58
|
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
59
|
+
- - '>'
|
60
|
+
- !ruby/object:Gem::Version
|
111
61
|
version: 0.0.0
|
112
|
-
|
113
|
-
- !ruby/object:Gem::Dependency
|
62
|
+
- !ruby/object:Gem::Dependency
|
114
63
|
name: activerdf
|
115
64
|
version_requirement:
|
116
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
117
|
-
requirements:
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: "1.2"
|
65
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
121
66
|
version:
|
122
|
-
|
67
|
+
requirements:
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 1.6.4
|
71
|
+
- !ruby/object:Gem::Dependency
|
123
72
|
name: sqlite3-ruby
|
124
73
|
version_requirement:
|
125
|
-
version_requirements: !ruby/object:Gem::Version::Requirement
|
74
|
+
version_requirements: !ruby/object:Gem::Version::Requirement
|
75
|
+
version:
|
126
76
|
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
77
|
+
- - '>='
|
78
|
+
- !ruby/object:Gem::Version
|
129
79
|
version: 1.2.1
|
130
|
-
|
80
|
+
description: an RDF database for usage in ActiveRDF (based on sqlite3)
|
81
|
+
authors:
|
82
|
+
- Eyal Oren <eyal.oren@deri.org
|
83
|
+
email:
|
84
|
+
extra_rdoc_files:
|
85
|
+
- README
|
86
|
+
requirements: []
|
87
|
+
rubyforge_project:
|
88
|
+
autorequire:
|
@@ -1,150 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Class: FetchingAdapter</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Class</strong></td>
|
53
|
-
<td class="class-name-in-header">FetchingAdapter</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../files/lib/activerdf_rdflite/fetching_rb.html">
|
59
|
-
lib/activerdf_rdflite/fetching.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
</td>
|
63
|
-
</tr>
|
64
|
-
|
65
|
-
<tr class="top-aligned-row">
|
66
|
-
<td><strong>Parent:</strong></td>
|
67
|
-
<td>
|
68
|
-
<a href="RDFLite.html">
|
69
|
-
RDFLite
|
70
|
-
</a>
|
71
|
-
</td>
|
72
|
-
</tr>
|
73
|
-
</table>
|
74
|
-
</div>
|
75
|
-
<!-- banner header -->
|
76
|
-
|
77
|
-
<div id="bodyContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<div id="contextContent">
|
82
|
-
|
83
|
-
<div id="description">
|
84
|
-
<p>
|
85
|
-
<a href="FetchingAdapter.html">FetchingAdapter</a> is an extension to
|
86
|
-
rdflite for fetching RDF from online sources.
|
87
|
-
</p>
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
|
92
|
-
</div>
|
93
|
-
|
94
|
-
<div id="method-list">
|
95
|
-
<h3 class="section-bar">Methods</h3>
|
96
|
-
|
97
|
-
<div class="name-list">
|
98
|
-
<a href="#M000015">fetch</a>
|
99
|
-
</div>
|
100
|
-
</div>
|
101
|
-
|
102
|
-
</div>
|
103
|
-
|
104
|
-
|
105
|
-
<!-- if includes -->
|
106
|
-
|
107
|
-
<div id="section">
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
<!-- if method_list -->
|
117
|
-
<div id="methods">
|
118
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
119
|
-
|
120
|
-
<div id="method-M000015" class="method-detail">
|
121
|
-
<a name="M000015"></a>
|
122
|
-
|
123
|
-
<div class="method-heading">
|
124
|
-
<a href="FetchingAdapter.src/M000015.html" target="Code" class="method-signature"
|
125
|
-
onclick="popupCode('FetchingAdapter.src/M000015.html');return false;">
|
126
|
-
<span class="method-name">fetch</span><span class="method-args">(url)</span>
|
127
|
-
</a>
|
128
|
-
</div>
|
129
|
-
|
130
|
-
<div class="method-description">
|
131
|
-
<p>
|
132
|
-
fetches RDF/XML data from given url and adds it to the datastore, using the
|
133
|
-
source url as context identifier.
|
134
|
-
</p>
|
135
|
-
</div>
|
136
|
-
</div>
|
137
|
-
|
138
|
-
|
139
|
-
</div>
|
140
|
-
|
141
|
-
|
142
|
-
</div>
|
143
|
-
|
144
|
-
|
145
|
-
<div id="validator-badges">
|
146
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
147
|
-
</div>
|
148
|
-
|
149
|
-
</body>
|
150
|
-
</html>
|