rdf-virtuoso 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/active_rdf/persistence.rb +2 -2
- data/lib/active_rdf/version.rb +1 -1
- data/lib/rdf/virtuoso/repository.rb +11 -3
- data/lib/rdf/virtuoso/version.rb +1 -1
- metadata +2 -2
@@ -97,11 +97,11 @@ module ActiveRDF
|
|
97
97
|
|
98
98
|
# TODO: set baseurl via config
|
99
99
|
def subject_for(id)
|
100
|
-
RDF::URI('http://data.deichman.no') / self.name.downcase / "
|
100
|
+
RDF::URI('http://data.deichman.no') / self.name.downcase / "/id_" / id
|
101
101
|
end
|
102
102
|
|
103
103
|
def id_for(subject)
|
104
|
-
subject.to_s.split("
|
104
|
+
subject.to_s.split("/").last.gsub('id_', '')
|
105
105
|
end
|
106
106
|
|
107
107
|
def destroy_all
|
data/lib/active_rdf/version.rb
CHANGED
@@ -93,9 +93,17 @@ module RDF
|
|
93
93
|
end
|
94
94
|
|
95
95
|
def api_get(query, options = {})
|
96
|
-
|
97
|
-
|
98
|
-
|
96
|
+
# prefer sparul endpoint with auth if present to allow SELECT/CONSTRUCT access to protected graphs
|
97
|
+
if @sparul_endpoint
|
98
|
+
self.class.endpoint @sparul_endpoint
|
99
|
+
get '/', :extra_query => { :query => query }.merge(options),
|
100
|
+
:extra_request => extra_request_options,
|
101
|
+
:transform => RDF::Virtuoso::Parser::JSON
|
102
|
+
else
|
103
|
+
self.class.endpoint @sparql_endpoint
|
104
|
+
get '/', :extra_query => { :query => query }.merge(options),
|
105
|
+
:transform => RDF::Virtuoso::Parser::JSON
|
106
|
+
end
|
99
107
|
end
|
100
108
|
|
101
109
|
def api_post(query, options = {})
|
data/lib/rdf/virtuoso/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rdf-virtuoso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.15
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-
|
13
|
+
date: 2012-10-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|