owlim-ruby 0.9.9.3 → 0.9.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.rdoc +10 -2
  2. data/bin/owlim +14 -3
  3. data/gemspec.rb +1 -1
  4. data/lib/owlim.rb +3 -3
  5. metadata +4 -24
@@ -75,14 +75,18 @@ If not specified, format will be guessed from the file name suffix for import.
75
75
 
76
76
  === Query commands
77
77
 
78
- Show list of prefixes which are automatically added to SPARQL.
78
+ Show a list of pre-defined prefixes
79
79
 
80
80
  owlim prefix
81
81
 
82
- SPARQL query against a repository.
82
+ SPARQL query against a repository without pre-defined prefixes
83
83
 
84
84
  owlim query repository "SPARQL" [format]
85
85
 
86
+ SPARQL query against a repository including pre-defined prefixes
87
+
88
+ owlim q repository "SPARQL" [format]
89
+
86
90
  Search for literal objects by a keyword.
87
91
 
88
92
  owlim find repository "keyword" [format]
@@ -116,6 +120,10 @@ Results will be printed in a tabular text format by default.
116
120
 
117
121
  owlim prefix
118
122
 
123
+ owlim q hoge 'select * where { ?s ?p ?o . } limit 1000'
124
+ owlim q hoge 'select * where { ?s ?p ?o . } limit 1000' json
125
+ owlim q hoge 'select * where { ?s ?p ?o . } limit 1000' xml
126
+
119
127
  owlim query hoge 'select * where { ?s ?p ?o . } limit 1000'
120
128
  owlim query hoge 'select * where { ?s ?p ?o . } limit 1000' json
121
129
  owlim query hoge 'select * where { ?s ?p ?o . } limit 1000' xml
data/bin/owlim CHANGED
@@ -57,12 +57,15 @@ Query commands:
57
57
  * "json" for "application/sparql-result+json"
58
58
  * "xml" for "application/sparql-result+xml".
59
59
 
60
- # Show list of prefixes which are automatically added to SPARQL
60
+ # Show a list of pre-defined prefixes
61
61
  > owlim prefix
62
62
 
63
- # SPARQL query against a repository
63
+ # SPARQL query against a repository without pre-defined prefixes
64
64
  > owlim query repository "SPARQL" [format]
65
65
 
66
+ # SPARQL query against a repository including default prefixes
67
+ > owlim q repository "SPARQL" [format]
68
+
66
69
  # Search for literal objects matching a keyword and return relevant triples
67
70
  > owlim find repository "keyword" [format]
68
71
 
@@ -103,6 +106,10 @@ Examples:
103
106
 
104
107
  > owlim prefix
105
108
 
109
+ > owlim q hoge 'select * where { ?s ?p ?o . } limit 1000'
110
+ > owlim q hoge 'select * where { ?s ?p ?o . } limit 1000' json
111
+ > owlim q hoge 'select * where { ?s ?p ?o . } limit 1000' xml
112
+
106
113
  > owlim query hoge 'select * where { ?s ?p ?o . } limit 1000'
107
114
  > owlim query hoge 'select * where { ?s ?p ?o . } limit 1000' json
108
115
  > owlim query hoge 'select * where { ?s ?p ?o . } limit 1000' xml
@@ -195,8 +202,12 @@ when "drop"
195
202
  $stderr.puts "> owlim drop repository"
196
203
  end
197
204
  when "prefix"
205
+ serv.prefix_default
198
206
  puts serv.prefix
199
- when "query"
207
+ when "query", "q"
208
+ if command == "q"
209
+ serv.prefix_default
210
+ end
200
211
  if repository
201
212
  if arguments.size > 1
202
213
  sparql = arguments.shift
data/gemspec.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'owlim-ruby'
3
- s.version = "0.9.9.3"
3
+ s.version = "0.9.9.4"
4
4
  s.license = "Ruby's"
5
5
 
6
6
  s.authors = ["Toshiaki Katayama", "Tatsuya Nishizawa"]
@@ -19,7 +19,7 @@ class OWLIM
19
19
  @port = uri.port
20
20
  @path = uri.path
21
21
 
22
- @prefix_hash = prefix_default
22
+ @prefix_hash = {}
23
23
 
24
24
  Net::HTTP.version_1_2
25
25
  end
@@ -192,8 +192,6 @@ class OWLIM
192
192
  query(repository, sparql, opts, &block)
193
193
  end
194
194
 
195
- private
196
-
197
195
  def prefix_default
198
196
  @prefix_hash = {
199
197
  "rdf" => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
@@ -221,6 +219,8 @@ class OWLIM
221
219
  }
222
220
  end
223
221
 
222
+ private
223
+
224
224
  def content_type(format)
225
225
  case format
226
226
  when "ttl", "turtle"
metadata CHANGED
@@ -1,14 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: owlim-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 37
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 9
9
- - 9
10
- - 3
11
- version: 0.9.9.3
4
+ prerelease:
5
+ version: 0.9.9.4
12
6
  platform: ruby
13
7
  authors:
14
8
  - Toshiaki Katayama
@@ -17,8 +11,7 @@ autorequire: owlim
17
11
  bindir: bin
18
12
  cert_chain: []
19
13
 
20
- date: 2012-06-02 00:00:00 +09:00
21
- default_executable: owlim
14
+ date: 2013-06-05 00:00:00 Z
22
15
  dependencies:
23
16
  - !ruby/object:Gem::Dependency
24
17
  name: uuid
@@ -28,9 +21,6 @@ dependencies:
28
21
  requirements:
29
22
  - - ">="
30
23
  - !ruby/object:Gem::Version
31
- hash: 3
32
- segments:
33
- - 0
34
24
  version: "0"
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,9 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ">="
44
34
  - !ruby/object:Gem::Version
45
- hash: 3
46
- segments:
47
- - 0
48
35
  version: "0"
49
36
  type: :runtime
50
37
  version_requirements: *id002
@@ -63,7 +50,6 @@ files:
63
50
  - lib/owlim/create_repository.xml.erb
64
51
  - lib/owlim/drop_repository.xml.erb
65
52
  - gemspec.rb
66
- has_rdoc: true
67
53
  homepage: https://github.com/ktym/owlim-ruby
68
54
  licenses:
69
55
  - Ruby's
@@ -77,23 +63,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
77
63
  requirements:
78
64
  - - ">="
79
65
  - !ruby/object:Gem::Version
80
- hash: 3
81
- segments:
82
- - 0
83
66
  version: "0"
84
67
  required_rubygems_version: !ruby/object:Gem::Requirement
85
68
  none: false
86
69
  requirements:
87
70
  - - ">="
88
71
  - !ruby/object:Gem::Version
89
- hash: 3
90
- segments:
91
- - 0
92
72
  version: "0"
93
73
  requirements: []
94
74
 
95
75
  rubyforge_project: owlim-ruby
96
- rubygems_version: 1.3.7
76
+ rubygems_version: 1.8.24
97
77
  signing_key:
98
78
  specification_version: 3
99
79
  summary: OWLIM client library for Ruby