sparql 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eabf23290e66c519d04a3903fb9c10cab87236c5
4
+ data.tar.gz: ccf93905bff11c897f0fb00b01113095c527aa9e
5
+ SHA512:
6
+ metadata.gz: de063e0c1d091dcb541f43d00942db7636c1e931f1504337cb9b0c8648085e30856bfbb332b08cfc392aece68c62595c1f6bd2924be9f715bc1fb2574b3b75a6
7
+ data.tar.gz: d03282b7ed8ae2edadbd9050d8101a9195df45844baa4cf126fefefef38c0b5089a07a67f75902e6a54d3a8404a86358ab13445a161f0b9fdc7fd0ad10aa9ac1
data/AUTHORS CHANGED
@@ -1,3 +1,2 @@
1
1
  * Gregg Kellogg <gregg@greggkellogg.net>
2
2
  * Arto Bendiken <arto.bendiken@gmail.com>
3
- * Pius Uzamere <pius@alum.mit.edu>
data/CREDITS CHANGED
@@ -0,0 +1 @@
1
+ * Pius Uzamere <pius@alum.mit.edu>
data/README.md CHANGED
@@ -51,6 +51,26 @@ The SPARQL gem now implements the following [SPARQL 1.1][] operations:
51
51
  * Support for all [functions](http://www.w3.org/TR/sparql11-query/#SparqlOps).
52
52
  * Support for [BIND](http://www.w3.org/TR/sparql11-query/#bind)
53
53
 
54
+ ### SPARQL Extension Functions
55
+ Extension functions may be defined, which will be invoked during query evaluation. For example:
56
+
57
+ # Register a function using the IRI <http://rubygems.org/gems/sparql#crypt>
58
+ crypt_iri = RDF::URI("http://rubygems.org/gems/sparql#crypt")
59
+ SPARQL::Algebra::Expression.register_extension(crypt_iri) do |literal|
60
+ raise TypeError, "argument must be a literal" unless literal.literal?
61
+ RDF::Literal(literal.to_s.crypt)
62
+ end
63
+
64
+ Then, use the function in a query:
65
+
66
+ PREFIX rsp: <http://rubygems.org/gems/sparql#>
67
+ PREFIX schema: <http://schema.org/>
68
+ SELECT ?crypted
69
+ {
70
+ [ schema:email ?email]
71
+ BIND(rsp:crypt(?email) AS ?crypted)
72
+ }
73
+
54
74
  ### Middleware
55
75
 
56
76
  `Rack::SPARQL` is a superset of [Rack::LinkedData][] to allow content negotiated results
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.7
1
+ 1.0.8
@@ -125,6 +125,69 @@ module SPARQL; module Algebra
125
125
  operator.new(*operands)
126
126
  end
127
127
 
128
+ ##
129
+ # Register an extension function.
130
+ #
131
+ # Extension functions take zero or more arguments of type `RDF::Term`
132
+ # and return an argument of type `RDF::Term`, or raise `TypeError`.
133
+ #
134
+ # Functions are identified using the `uri` parameter and specified using a block.
135
+ #
136
+ # Arguments are evaluated, and the block is called with argument values (if a variable was unbound, an error will have been generated).
137
+ #
138
+ # It is possible to get unevaluated arguments but care must be taken not to violate the rules of function evaluation.
139
+ #
140
+ # Normally, block should be a pure evaluation based on it's arguments. It should not access a graph nor return different values for the same arguments (to allow expression optimization). Blocks can't bind a variables.
141
+ #
142
+ # @example registering a function definition applying the Ruby `crypt` method to its unary argument.
143
+ # SPARQL::Algebra::Expression.register_extension(RDF::URI("http://example/crypt") do |literal|
144
+ # raise TypeError, "argument must be a literal" unless literal.literal?
145
+ # RDF::Literal(literal.to_s.crypt("salt"))
146
+ # end
147
+ #
148
+ # @param [RDF::URI] uri
149
+ # @yield *args
150
+ # @yieldparam [Array<RDF::Term>] *args
151
+ # @yieldreturn [RDF::Term]
152
+ # @param [Proc] function
153
+ # @return [void]
154
+ # @raise [TypeError] if `uri` is not an RDF::URI or no block is given
155
+ def self.register_extension(uri, &block)
156
+ raise TypeError, "uri must be an IRI" unless uri.is_a?(RDF::URI)
157
+ raise TypeError, "must pass a block" unless block_given?
158
+ self.extensions[uri] = block
159
+ end
160
+
161
+ ##
162
+ # Registered extensions
163
+ #
164
+ # @return [Hash{RDF::URI => Proc}]
165
+ def self.extensions
166
+ @extensions ||= {}
167
+ end
168
+
169
+ ##
170
+ # Invoke an extension function.
171
+ #
172
+ # Applies a registered extension function, if registered.
173
+ # Otherwise, if it is an XSD Constructor function, apply
174
+ # that.
175
+ #
176
+ # @param [RDF::URI] function
177
+ # @param [Array<RDF::Term>] *args
178
+ # @return [RDF::Term]
179
+ # @see http://www.w3.org/TR/sparql11-query/#extensionFunctions
180
+ # @see http://www.w3.org/TR/sparql11-query/#FunctionMapping
181
+ def self.extension(function, *args)
182
+ if function.to_s.start_with?(RDF::XSD.to_s)
183
+ self.cast(function, args.first)
184
+ elsif extension_function = self.extensions[function]
185
+ extension_function.call(*args)
186
+ else
187
+ raise TypeError, "Extension function #{function} not recognized"
188
+ end
189
+ end
190
+
128
191
  ##
129
192
  # Casts operand as the specified datatype
130
193
  #
@@ -134,8 +197,8 @@ module SPARQL; module Algebra
134
197
  # @param [RDF::Term] value
135
198
  # Value, which should be a typed literal, where the type must be that specified
136
199
  # @raise [TypeError] if datatype is not a URI or value cannot be cast to datatype
137
- # @return [Boolean]
138
- # @see http://www.w3.org/TR/rdf-sparql-query/#FunctionMapping
200
+ # @return [RDF::Term]
201
+ # @see http://www.w3.org/TR/sparql11-query/#FunctionMapping
139
202
  def self.cast(datatype, value)
140
203
  case datatype
141
204
  when RDF::XSD.dateTime
@@ -149,8 +212,10 @@ module SPARQL; module Algebra
149
212
  end
150
213
  when RDF::XSD.float, RDF::XSD.double
151
214
  case value
152
- when RDF::Literal::Numeric, RDF::Literal::Boolean
153
- RDF::Literal.new(value, :datatype => datatype)
215
+ when RDF::Literal::Boolean
216
+ RDF::Literal.new(value.object ? 1 : 0, :datatype => datatype)
217
+ when RDF::Literal::Numeric
218
+ RDF::Literal.new(value.to_f, :datatype => datatype)
154
219
  when RDF::Literal::DateTime, RDF::Literal::Date, RDF::Literal::Time, RDF::URI, RDF::Node
155
220
  raise TypeError, "Value #{value.inspect} cannot be cast as #{datatype}"
156
221
  else
@@ -161,7 +226,7 @@ module SPARQL; module Algebra
161
226
  when RDF::Literal::Boolean
162
227
  value
163
228
  when RDF::Literal::Numeric
164
- RDF::Literal::Boolean.new(value.value != 0)
229
+ RDF::Literal::Boolean.new(value.object != 0)
165
230
  when RDF::Literal::DateTime, RDF::Literal::Date, RDF::Literal::Time, RDF::URI, RDF::Node
166
231
  raise TypeError, "Value #{value.inspect} cannot be cast as #{datatype}"
167
232
  else
@@ -169,7 +234,9 @@ module SPARQL; module Algebra
169
234
  end
170
235
  when RDF::XSD.decimal, RDF::XSD.integer
171
236
  case value
172
- when RDF::Literal::Integer, RDF::Literal::Decimal, RDF::Literal::Boolean
237
+ when RDF::Literal::Boolean
238
+ RDF::Literal.new(value.object ? 1 : 0, :datatype => datatype)
239
+ when RDF::Literal::Integer, RDF::Literal::Decimal
173
240
  RDF::Literal.new(value, :datatype => datatype)
174
241
  when RDF::Literal::DateTime, RDF::Literal::Date, RDF::Literal::Time, RDF::URI, RDF::Node
175
242
  raise TypeError, "Value #{value.inspect} cannot be cast as #{datatype}"
@@ -179,7 +246,7 @@ module SPARQL; module Algebra
179
246
  when RDF::XSD.string
180
247
  RDF::Literal.new(value, :datatype => datatype)
181
248
  else
182
- raise TypeError, "Expected datatype (#{datatype}) to be an XSD type"
249
+ raise TypeError, "Expected datatype (#{datatype}) to be a recognized XPath function"
183
250
  end
184
251
  rescue
185
252
  raise TypeError, $!.message
@@ -42,7 +42,21 @@ class Array
42
42
  # @return [RDF::Term]
43
43
  def evaluate(bindings)
44
44
  dt, val = self.map {|o| o.evaluate(bindings)}
45
- SPARQL::Algebra::Expression.cast(*self.map {|o| o.evaluate(bindings)})
45
+ SPARQL::Algebra::Expression.extension(*self.map {|o| o.evaluate(bindings)})
46
+ end
47
+
48
+ ##
49
+ # If `#execute` is invoked, it implies that a non-implemented Algebra operator
50
+ # is being invoked
51
+ #
52
+ # @param [RDF::Queryable] queryable
53
+ # the graph or repository to query
54
+ # @param [Hash{Symbol => Object}] options
55
+ # @raise [NotImplementedError]
56
+ # If an attempt is made to perform an unsupported operation
57
+ # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
58
+ def execute(queryable, options = {})
59
+ raise NotImplementedError, "SPARQL::Algebra '#{first}' operator not implemented"
46
60
  end
47
61
  end
48
62
 
@@ -4,11 +4,11 @@ module SPARQL; module Algebra
4
4
  # A SPARQL `concat` operator.
5
5
  #
6
6
  # @example
7
- # (concat ?a ?b)
7
+ # (concat ?a ?b ...)
8
8
  #
9
9
  # @see http://www.w3.org/TR/sparql11-query/#func-concat
10
10
  # @see http://www.w3.org/TR/xpath-functions/#func-concat
11
- class Concat < Operator::Binary
11
+ class Concat < Operator
12
12
  include Evaluatable
13
13
 
14
14
  NAME = :concat
@@ -24,24 +24,23 @@ module SPARQL; module Algebra
24
24
  # concat("foo"@en, "bar") #=> "foobar"
25
25
  # concat("foo"@en, "bar"^^xsd:string) #=> "foobar"
26
26
  #
27
- # @param [RDF::Literal] left
28
- # a literal
29
- # @param [RDF::Literal] right
30
- # a literal
31
- # @return [RDF::Literal]
32
- # @raise [TypeError] if either operand is not a literal
33
- def apply(left, right)
34
- case
35
- when !left.literal? || !right.literal?
36
- raise TypeError, "expected two plain literal operands, but got #{left.inspect} and #{right.inspect}"
37
- when ![left.datatype, right.datatype].compact.all? {|dt| dt == RDF::XSD.string}
38
- raise TypeError, "expected two plain literal operands, but got #{left.inspect} and #{right.inspect}"
39
- when left.datatype == RDF::XSD.string && right.datatype == RDF::XSD.string
40
- RDF::Literal.new("#{left}#{right}", :datatype => RDF::XSD.string)
41
- when left.has_language? && left.language == right.language
42
- RDF::Literal.new("#{left}#{right}", :language => left.language)
43
- else
44
- RDF::Literal.new("#{left}#{right}")
27
+ # @param [RDF::Query::Solution, #[]] bindings
28
+ # @return [RDF::Term]
29
+ # @raise [TypeError] if any operand is not a literal
30
+ def evaluate(bindings = {})
31
+ ops = operands.map {|op| op.evaluate(bindings)}
32
+
33
+ raise TypeError, "expected all plain literal operands" unless ops.all? {|op| op.literal? && op.plain?}
34
+
35
+ ops.inject do |memo, op|
36
+ case
37
+ when memo.datatype == RDF::XSD.string && op.datatype == RDF::XSD.string
38
+ RDF::Literal.new("#{memo}#{op}", :datatype => RDF::XSD.string)
39
+ when memo.has_language? && memo.language == op.language
40
+ RDF::Literal.new("#{memo}#{op}", :language => memo.language)
41
+ else
42
+ RDF::Literal.new("#{memo}#{op}")
43
+ end
45
44
  end
46
45
  end
47
46
  end # Concat
@@ -31,7 +31,8 @@ module SPARQL; module Algebra
31
31
  # @raise [TypeError] if the operand is not a simple literal
32
32
  def apply(literal)
33
33
  raise TypeError, "expected an simple literal, but got #{literal.inspect}" unless literal.literal? && literal.simple?
34
- Operator.base_uri.join(literal.to_s)
34
+ base = Operator.base_uri || RDF::URI("")
35
+ base.join(literal.to_s)
35
36
  end
36
37
 
37
38
  Operator::URI = IRI
@@ -85,6 +85,11 @@ module SPARQL; module Algebra
85
85
  !failed?
86
86
  end
87
87
 
88
+ # Determine if this is an empty query, having no operands
89
+ def empty?
90
+ self.operands.empty?
91
+ end
92
+
88
93
  ##
89
94
  # Enumerates over each matching query solution.
90
95
  #
@@ -99,6 +99,14 @@ module RDF::Queryable
99
99
  end
100
100
  end
101
101
 
102
+ class RDF::Query
103
+ # Determine if this is an empty query, having no patterns
104
+ def empty?
105
+ self.patterns.empty?
106
+ end
107
+ end
108
+
109
+
102
110
  ##
103
111
  # Extensions for `RDF::Query::Solutions`.
104
112
  class RDF::Query::Solutions
@@ -232,7 +232,7 @@ module SPARQL::Grammar
232
232
  add_prod_datum(:PrefixDecl, prefix_op)
233
233
  end
234
234
  end
235
-
235
+
236
236
  # [7] SelectQuery ::= SelectClause DatasetClause* WhereClause SolutionModifier
237
237
  production(:SelectQuery) do |input, data, callback|
238
238
  query = merge_modifiers(data)
@@ -356,59 +356,9 @@ module SPARQL::Grammar
356
356
  # [54] GroupGraphPatternSub ::= TriplesBlock?
357
357
  # ( GraphPatternNotTriples '.'? TriplesBlock? )*
358
358
  production(:GroupGraphPatternSub) do |input, data, callback|
359
- query_list = data[:query_list]
360
- debug("GroupGraphPatternSub") {"ql #{query_list.to_a.inspect}"}
361
- debug("GroupGraphPatternSub") {"q #{data[:query] ? data[:query].first.inspect : 'nil'}"}
362
-
363
- if query_list
364
- lhs = data[:query].to_a.first
365
-
366
- # Bind terminates the TriplesBlock?
367
- if data[:extend]
368
- lhs ||= SPARQL::Algebra::Operator::BGP.new
369
- # query should be nil
370
- lhs = SPARQL::Algebra::Operator::Extend.new(data.delete(:extend), lhs)
371
- end
372
-
373
- while !query_list.empty?
374
- rhs = query_list.shift
375
- # Make the right-hand-side a Join with only a single operand, if it's not already and Operator
376
- rhs = SPARQL::Algebra::Expression.for(:join, :placeholder, rhs) unless rhs.is_a?(SPARQL::Algebra::Operator)
377
- debug("GroupGraphPatternSub") {"<= q: #{rhs.inspect}"}
378
- debug("GroupGraphPatternSub") {"<= lhs: #{lhs ? lhs.inspect : 'nil'}"}
379
- lhs ||= SPARQL::Algebra::Operator::BGP.new if rhs.is_a?(SPARQL::Algebra::Operator::LeftJoin)
380
- if lhs
381
- if rhs.operand(0) == :placeholder
382
- rhs.operands[0] = lhs
383
- else
384
- rhs = SPARQL::Algebra::Operator::Join.new(lhs, rhs)
385
- end
386
- end
387
- lhs = rhs
388
- lhs = lhs.operand(1) if lhs.operand(0) == :placeholder
389
- debug("GroupGraphPatternSub(itr)") {"=> lhs: #{lhs.inspect}"}
390
- end
391
- # Trivial simplification for :join or :union of one query
392
- case lhs
393
- when SPARQL::Algebra::Operator::Join, SPARQL::Algebra::Operator::Union
394
- if lhs.operand(0) == :placeholder
395
- lhs = lhs.operand(1)
396
- debug("GroupGraphPatternSub(simplify)") {"=> lhs: #{lhs.inspect}"}
397
- end
398
- end
399
- res = lhs
400
- elsif data[:query]
401
- res = data[:query].first
402
- end
403
-
404
- debug("GroupGraphPatternSub(pre-extend)") {"res: #{res.inspect}"}
405
-
406
- if data[:extend]
407
- res ||= SPARQL::Algebra::Operator::BGP.new
408
- # query should be nil
409
- res = SPARQL::Algebra::Operator::Extend.new(data[:extend], res)
410
- end
359
+ debug("GroupGraphPatternSub") {"q #{data[:query].inspect}"}
411
360
 
361
+ res = data[:query].first
412
362
  debug("GroupGraphPatternSub(pre-filter)") {"res: #{res.inspect}"}
413
363
 
414
364
  if data[:filter]
@@ -420,29 +370,17 @@ module SPARQL::Grammar
420
370
  add_prod_datum(:query, res)
421
371
  end
422
372
 
423
- # _GroupGraphPatternSub_2 ::= ( GraphPatternNotTriples '.'? TriplesBlock? )
424
- # Create a stack of GroupQuerys having a single graph element and resolve in GroupGraphPattern
425
- production(:_GroupGraphPatternSub_2) do |input, data, callback|
426
- lhs = data[:query_list]
427
- [data[:query]].flatten.compact.each do |rhs|
428
- rhs = SPARQL::Algebra::Expression.for(:join, :placeholder, rhs) if rhs.is_a?(RDF::Query)
429
- add_prod_data(:query_list, rhs)
430
- end
431
- add_prod_datum(:query_list, lhs)
432
- add_prod_datum(:extend, data[:extend])
433
- add_prod_datum(:filter, data[:filter])
434
- end
435
-
436
- # _GroupGraphPatternSub_3
437
-
438
373
  # [55] TriplesBlock ::= TriplesSameSubjectPath
439
374
  # ( '.' TriplesBlock? )?
440
375
  production(:TriplesBlock) do |input, data, callback|
441
376
  query = SPARQL::Algebra::Operator::BGP.new
442
377
  data[:pattern].to_a.each {|p| query << p}
443
-
378
+
444
379
  # Append triples from ('.' TriplesBlock? )?
445
380
  data[:query].to_a.each {|q| query += q}
381
+ if (lhs = (input.delete(:query) || []).first) && !lhs.empty?
382
+ query = SPARQL::Algebra::Expression.for(:join, lhs, query)
383
+ end
446
384
  add_prod_datum(:query, query)
447
385
  end
448
386
 
@@ -452,28 +390,44 @@ module SPARQL::Grammar
452
390
  # | GraphGraphPattern
453
391
  # | ServiceGraphPattern
454
392
  # | Filter | Bind
393
+ start_production(:GraphPatternNotTriples) do |input, data, callback|
394
+ # Modifies previous graph
395
+ data[:input_query] = input.delete(:query) || [SPARQL::Algebra::Operator::BGP.new]
396
+ end
455
397
  production(:GraphPatternNotTriples) do |input, data, callback|
456
- add_prod_datum(:extend, data[:extend])
398
+ lhs = data[:input_query].first
399
+
400
+ # Filter trickls up to GroupGraphPatternSub
457
401
  add_prod_datum(:filter, data[:filter])
458
402
 
459
- if data[:query]
460
- res = data[:query].to_a.first
461
- add_prod_data(:query, res)
403
+ if data[:extend] && lhs.is_a?(SPARQL::Algebra::Operator::Extend)
404
+ # Coalesce extensions
405
+ lhs = lhs.dup
406
+ lhs.operands.first.concat(data[:extend])
407
+ add_prod_datum(:query, lhs)
408
+ elsif data[:extend]
409
+ add_prod_datum(:query, SPARQL::Algebra::Expression.for(:extend, data[:extend], lhs))
410
+ elsif data[:leftjoin]
411
+ add_prod_datum(:query, SPARQL::Algebra::Expression.for(:leftjoin, lhs, *data[:leftjoin]))
412
+ elsif data[:query] && !lhs.empty?
413
+ add_prod_datum(:query, SPARQL::Algebra::Expression.for(:join, lhs, *data[:query]))
414
+ elsif data[:query]
415
+ add_prod_datum(:query, data[:query])
416
+ else
417
+ add_prod_datum(:query, lhs)
462
418
  end
463
419
  end
464
420
 
465
421
  # [57] OptionalGraphPattern ::= 'OPTIONAL' GroupGraphPattern
466
422
  production(:OptionalGraphPattern) do |input, data, callback|
467
- if data[:query]
468
- expr = nil
469
- query = data[:query].first
470
- if query.is_a?(SPARQL::Algebra::Operator::Filter)
471
- # Change to expression on left-join with query element
472
- expr, query = query.operands
473
- add_prod_data(:query, SPARQL::Algebra::Expression.for(:leftjoin, :placeholder, query, expr))
474
- else
475
- add_prod_data(:query, SPARQL::Algebra::Expression.for(:leftjoin, :placeholder, query))
476
- end
423
+ expr = nil
424
+ query = data[:query] ? data[:query].first : SPARQL::Algebra::Operator::BGP.new
425
+ if query.is_a?(SPARQL::Algebra::Operator::Filter)
426
+ # Change to expression on left-join with query element
427
+ expr, query = query.operands
428
+ add_prod_data(:leftjoin, query, expr)
429
+ elsif !query.empty?
430
+ add_prod_data(:leftjoin, query)
477
431
  end
478
432
  end
479
433
 
@@ -786,9 +740,9 @@ module SPARQL::Grammar
786
740
  accumulate_operator_expressions(:MultiplicativeExpression, :_Mul_Div, data)
787
741
  end
788
742
 
789
- # [118] UnaryExpression ::= '!' PrimaryExpression
790
- # | '+' PrimaryExpression
791
- # | '-' PrimaryExpression
743
+ # [118] UnaryExpression ::= '!' PrimaryExpression
744
+ # | '+' PrimaryExpression
745
+ # | '-' PrimaryExpression
792
746
  # | PrimaryExpression
793
747
  production(:UnaryExpression) do |input, data, callback|
794
748
  case data[:UnaryExpression]
@@ -830,60 +784,60 @@ module SPARQL::Grammar
830
784
  end
831
785
 
832
786
  # [121] BuiltInCall ::= Aggregate
833
- # | 'STR' '(' Expression ')'
834
- # | 'LANG' '(' Expression ')'
835
- # | 'LANGMATCHES' '(' Expression ',' Expression ')'
836
- # | 'DATATYPE' '(' Expression ')'
837
- # | 'BOUND' '(' Var ')'
838
- # | 'IRI' '(' Expression ')'
839
- # | 'URI' '(' Expression ')'
840
- # | 'BNODE' ( '(' Expression ')' | NIL )
841
- # | 'RAND' NIL
842
- # | 'ABS' '(' Expression ')'
843
- # | 'CEIL' '(' Expression ')'
844
- # | 'FLOOR' '(' Expression ')'
845
- # | 'ROUND' '(' Expression ')'
846
- # | 'CONCAT' ExpressionList
847
- # | SubstringExpression
848
- # | 'STRLEN' '(' Expression ')'
849
- # | StrReplaceExpression
850
- # | 'UCASE' '(' Expression ')'
851
- # | 'LCASE' '(' Expression ')'
852
- # | 'ENCODE_FOR_URI' '(' Expression ')'
853
- # | 'CONTAINS' '(' Expression ',' Expression ')'
854
- # | 'STRSTARTS' '(' Expression ',' Expression ')'
855
- # | 'STRENDS' '(' Expression ',' Expression ')'
856
- # | 'STRBEFORE' '(' Expression ',' Expression ')'
857
- # | 'STRAFTER' '(' Expression ',' Expression ')'
858
- # | 'YEAR' '(' Expression ')'
859
- # | 'MONTH' '(' Expression ')'
860
- # | 'DAY' '(' Expression ')'
861
- # | 'HOURS' '(' Expression ')'
862
- # | 'MINUTES' '(' Expression ')'
863
- # | 'SECONDS' '(' Expression ')'
864
- # | 'TIMEZONE' '(' Expression ')'
865
- # | 'TZ' '(' Expression ')'
866
- # | 'NOW' NIL
787
+ # | 'STR' '(' Expression ')'
788
+ # | 'LANG' '(' Expression ')'
789
+ # | 'LANGMATCHES' '(' Expression ',' Expression ')'
790
+ # | 'DATATYPE' '(' Expression ')'
791
+ # | 'BOUND' '(' Var ')'
792
+ # | 'IRI' '(' Expression ')'
793
+ # | 'URI' '(' Expression ')'
794
+ # | 'BNODE' ( '(' Expression ')' | NIL )
795
+ # | 'RAND' NIL
796
+ # | 'ABS' '(' Expression ')'
797
+ # | 'CEIL' '(' Expression ')'
798
+ # | 'FLOOR' '(' Expression ')'
799
+ # | 'ROUND' '(' Expression ')'
800
+ # | 'CONCAT' ExpressionList
801
+ # | SubstringExpression
802
+ # | 'STRLEN' '(' Expression ')'
803
+ # | StrReplaceExpression
804
+ # | 'UCASE' '(' Expression ')'
805
+ # | 'LCASE' '(' Expression ')'
806
+ # | 'ENCODE_FOR_URI' '(' Expression ')'
807
+ # | 'CONTAINS' '(' Expression ',' Expression ')'
808
+ # | 'STRSTARTS' '(' Expression ',' Expression ')'
809
+ # | 'STRENDS' '(' Expression ',' Expression ')'
810
+ # | 'STRBEFORE' '(' Expression ',' Expression ')'
811
+ # | 'STRAFTER' '(' Expression ',' Expression ')'
812
+ # | 'YEAR' '(' Expression ')'
813
+ # | 'MONTH' '(' Expression ')'
814
+ # | 'DAY' '(' Expression ')'
815
+ # | 'HOURS' '(' Expression ')'
816
+ # | 'MINUTES' '(' Expression ')'
817
+ # | 'SECONDS' '(' Expression ')'
818
+ # | 'TIMEZONE' '(' Expression ')'
819
+ # | 'TZ' '(' Expression ')'
820
+ # | 'NOW' NIL
867
821
  # | 'UUID' NIL
868
822
  # | 'STRUUID' NIL
869
- # | 'MD5' '(' Expression ')'
870
- # | 'SHA1' '(' Expression ')'
871
- # | 'SHA224' '(' Expression ')'
872
- # | 'SHA256' '(' Expression ')'
873
- # | 'SHA384' '(' Expression ')'
874
- # | 'SHA512' '(' Expression ')'
875
- # | 'COALESCE' ExpressionList
876
- # | 'IF' '(' Expression ',' Expression ',' Expression ')'
877
- # | 'STRLANG' '(' Expression ',' Expression ')'
878
- # | 'STRDT' '(' Expression ',' Expression ')'
879
- # | 'sameTerm' '(' Expression ',' Expression ')'
880
- # | 'isIRI' '(' Expression ')'
881
- # | 'isURI' '(' Expression ')'
882
- # | 'isBLANK' '(' Expression ')'
883
- # | 'isLITERAL' '(' Expression ')'
884
- # | 'isNUMERIC' '(' Expression ')'
885
- # | RegexExpression
886
- # | ExistsFunc
823
+ # | 'MD5' '(' Expression ')'
824
+ # | 'SHA1' '(' Expression ')'
825
+ # | 'SHA224' '(' Expression ')'
826
+ # | 'SHA256' '(' Expression ')'
827
+ # | 'SHA384' '(' Expression ')'
828
+ # | 'SHA512' '(' Expression ')'
829
+ # | 'COALESCE' ExpressionList
830
+ # | 'IF' '(' Expression ',' Expression ',' Expression ')'
831
+ # | 'STRLANG' '(' Expression ',' Expression ')'
832
+ # | 'STRDT' '(' Expression ',' Expression ')'
833
+ # | 'sameTerm' '(' Expression ',' Expression ')'
834
+ # | 'isIRI' '(' Expression ')'
835
+ # | 'isURI' '(' Expression ')'
836
+ # | 'isBLANK' '(' Expression ')'
837
+ # | 'isLITERAL' '(' Expression ')'
838
+ # | 'isNUMERIC' '(' Expression ')'
839
+ # | RegexExpression
840
+ # | ExistsFunc
887
841
  # | NotExistsFunc
888
842
  production(:BuiltInCall) do |input, data, callback|
889
843
  if builtin = data.keys.detect {|k| BUILTINS.include?(k)}
@@ -933,12 +887,12 @@ module SPARQL::Grammar
933
887
  add_prod_datum(:notexists, data[:query])
934
888
  end
935
889
 
936
- # [127] Aggregate ::= 'COUNT' '(' 'DISTINCT'? ( '*' | Expression ) ')'
937
- # | 'SUM' '(' 'DISTINCT'? Expression ')'
938
- # | 'MIN' '(' 'DISTINCT'? Expression ')'
939
- # | 'MAX' '(' 'DISTINCT'? Expression ')'
940
- # | 'AVG' '(' 'DISTINCT'? Expression ')'
941
- # | 'SAMPLE' '(' 'DISTINCT'? Expression ')'
890
+ # [127] Aggregate ::= 'COUNT' '(' 'DISTINCT'? ( '*' | Expression ) ')'
891
+ # | 'SUM' '(' 'DISTINCT'? Expression ')'
892
+ # | 'MIN' '(' 'DISTINCT'? Expression ')'
893
+ # | 'MAX' '(' 'DISTINCT'? Expression ')'
894
+ # | 'AVG' '(' 'DISTINCT'? Expression ')'
895
+ # | 'SAMPLE' '(' 'DISTINCT'? Expression ')'
942
896
  # | 'GROUP_CONCAT' '(' 'DISTINCT'? Expression
943
897
  # ( ';' 'SEPARATOR' '=' String )? ')'
944
898
  production(:Aggregate) do |input, data, callback|
@@ -965,7 +919,7 @@ module SPARQL::Grammar
965
919
  production(:RDFLiteral) do |input, data, callback|
966
920
  if data[:string]
967
921
  lit = data.dup
968
- str = lit.delete(:string).last
922
+ str = lit.delete(:string).last
969
923
  lit[:datatype] = lit.delete(:iri).last if lit[:iri]
970
924
  lit[:language] = lit.delete(:language).last.downcase if lit[:language]
971
925
  add_prod_datum(:literal, RDF::Literal.new(str, lit)) if str
@@ -1002,7 +956,7 @@ module SPARQL::Grammar
1002
956
  ##
1003
957
  # Initializes a new parser instance.
1004
958
  #
1005
- # @param [String, #to_s] input
959
+ # @param [String, IO, StringIO, #to_s] input
1006
960
  # @param [Hash{Symbol => Object}] options
1007
961
  # @option options [Hash] :prefixes (Hash.new)
1008
962
  # the prefix mappings to use (for acessing intermediate parser productions)
@@ -1020,9 +974,15 @@ module SPARQL::Grammar
1020
974
  # Show progress of parser productions
1021
975
  # @option options [Boolean] :debug
1022
976
  # Detailed debug output
977
+ # @yield [parser] `self`
978
+ # @yieldparam [SPARQL::Grammar::Parser] parser
979
+ # @yieldreturn [void] ignored
1023
980
  # @return [SPARQL::Grammar::Parser]
1024
- def initialize(input = nil, options = {})
1025
- @input = input.to_s.dup
981
+ def initialize(input = nil, options = {}, &block)
982
+ @input = case input
983
+ when IO, StringIO then input.read
984
+ else input.to_s.dup
985
+ end
1026
986
  @input.force_encoding(Encoding::UTF_8)
1027
987
  @options = {:anon_base => "b0", :validate => false}.merge(options)
1028
988
  @options[:debug] ||= case
@@ -1053,12 +1013,12 @@ module SPARQL::Grammar
1053
1013
  rescue Error
1054
1014
  false
1055
1015
  end
1056
-
1016
+
1057
1017
  # @return [String]
1058
1018
  def to_sxp_bin
1059
1019
  @result
1060
1020
  end
1061
-
1021
+
1062
1022
  def to_s
1063
1023
  @result.to_sxp
1064
1024
  end
@@ -1237,7 +1197,7 @@ module SPARQL::Grammar
1237
1197
  # @return [RDF::Query::Variable]
1238
1198
  def variable(id, distinguished = true)
1239
1199
  id = nil if id.to_s.empty?
1240
-
1200
+
1241
1201
  if id
1242
1202
  @vars[id] ||= begin
1243
1203
  v = RDF::Query::Variable.new(id)
@@ -1281,7 +1241,7 @@ module SPARQL::Grammar
1281
1241
  iri.lexical = "#{prefix}:#{suffix}" unless resolve_iris?
1282
1242
  iri
1283
1243
  end
1284
-
1244
+
1285
1245
  # Create a literal
1286
1246
  def literal(value, options = {})
1287
1247
  options = options.dup
@@ -1300,7 +1260,7 @@ module SPARQL::Grammar
1300
1260
  def expand_collection(data)
1301
1261
  # Add any triples generated from deeper productions
1302
1262
  add_prod_datum(:pattern, data[:pattern])
1303
-
1263
+
1304
1264
  # Create list items for each element in data[:GraphNode]
1305
1265
  first = data[:Collection]
1306
1266
  list = data[:GraphNode].to_a.flatten.compact
@@ -1312,7 +1272,7 @@ module SPARQL::Grammar
1312
1272
  add_pattern(:Collection, :subject => first, :predicate => RDF["rest"], :object => rest)
1313
1273
  first = rest
1314
1274
  end
1315
-
1275
+
1316
1276
  if last
1317
1277
  add_pattern(:Collection, :subject => first, :predicate => RDF["first"], :object => last)
1318
1278
  end
@@ -1343,11 +1303,11 @@ module SPARQL::Grammar
1343
1303
  # Flatten a Data in form of :filter => [op+ bgp?], without a query into filter and query creating exprlist, if necessary
1344
1304
  # @return [Array[:expr, query]]
1345
1305
  def flatten_filter(data)
1346
- query = data.pop if data.last.respond_to?(:execute)
1306
+ query = data.pop if data.last.is_a?(SPARQL::Algebra::Query)
1347
1307
  expr = data.length > 1 ? SPARQL::Algebra::Operator::Exprlist.new(*data) : data.first
1348
1308
  [expr, query]
1349
1309
  end
1350
-
1310
+
1351
1311
  # Merge query modifiers, datasets, and projections
1352
1312
  #
1353
1313
  # This includes tranforming aggregates if also used with a GROUP BY
@@ -1364,7 +1324,7 @@ module SPARQL::Grammar
1364
1324
  query = SPARQL::Algebra::Expression[:group, data[:group].first, query]
1365
1325
  end
1366
1326
 
1367
- if data[:extend]
1327
+ if data[:extend] # FIXME: needed?
1368
1328
  # extension variables must not appear in projected variables.
1369
1329
  # Add them to the projection otherwise
1370
1330
  data[:extend].each do |(var, expr)|
@@ -1382,9 +1342,9 @@ module SPARQL::Grammar
1382
1342
  query = SPARQL::Algebra::Expression[data[:DISTINCT_REDUCED].first, query] if data[:DISTINCT_REDUCED]
1383
1343
 
1384
1344
  query = SPARQL::Algebra::Expression[:slice, data[:slice][0], data[:slice][1], query] if data[:slice]
1385
-
1345
+
1386
1346
  query = SPARQL::Algebra::Expression[:dataset, data[:dataset], query] if data[:dataset]
1387
-
1347
+
1388
1348
  query
1389
1349
  end
1390
1350
 
metadata CHANGED
@@ -1,310 +1,271 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
5
- prerelease:
4
+ version: 1.0.8
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gregg Kellogg
9
8
  - Arto Bendiken
10
- - Pius Uzamere
11
9
  autorequire:
12
10
  bindir: bin
13
11
  cert_chain: []
14
- date: 2013-04-30 00:00:00.000000000 Z
12
+ date: 2013-05-21 00:00:00.000000000 Z
15
13
  dependencies:
16
14
  - !ruby/object:Gem::Dependency
17
15
  name: rdf
18
16
  requirement: !ruby/object:Gem::Requirement
19
- none: false
20
17
  requirements:
21
- - - ! '>='
18
+ - - '>='
22
19
  - !ruby/object:Gem::Version
23
20
  version: 1.0.6
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
- none: false
28
24
  requirements:
29
- - - ! '>='
25
+ - - '>='
30
26
  - !ruby/object:Gem::Version
31
27
  version: 1.0.6
32
28
  - !ruby/object:Gem::Dependency
33
29
  name: rdf-aggregate-repo
34
30
  requirement: !ruby/object:Gem::Requirement
35
- none: false
36
31
  requirements:
37
- - - ! '>='
32
+ - - '>='
38
33
  - !ruby/object:Gem::Version
39
34
  version: '0'
40
35
  type: :runtime
41
36
  prerelease: false
42
37
  version_requirements: !ruby/object:Gem::Requirement
43
- none: false
44
38
  requirements:
45
- - - ! '>='
39
+ - - '>='
46
40
  - !ruby/object:Gem::Version
47
41
  version: '0'
48
42
  - !ruby/object:Gem::Dependency
49
43
  name: ebnf
50
44
  requirement: !ruby/object:Gem::Requirement
51
- none: false
52
45
  requirements:
53
- - - ! '>='
46
+ - - '>='
54
47
  - !ruby/object:Gem::Version
55
48
  version: 0.3.0
56
49
  type: :runtime
57
50
  prerelease: false
58
51
  version_requirements: !ruby/object:Gem::Requirement
59
- none: false
60
52
  requirements:
61
- - - ! '>='
53
+ - - '>='
62
54
  - !ruby/object:Gem::Version
63
55
  version: 0.3.0
64
56
  - !ruby/object:Gem::Dependency
65
57
  name: builder
66
58
  requirement: !ruby/object:Gem::Requirement
67
- none: false
68
59
  requirements:
69
- - - ! '>='
60
+ - - '>='
70
61
  - !ruby/object:Gem::Version
71
62
  version: '3.0'
72
63
  type: :runtime
73
64
  prerelease: false
74
65
  version_requirements: !ruby/object:Gem::Requirement
75
- none: false
76
66
  requirements:
77
- - - ! '>='
67
+ - - '>='
78
68
  - !ruby/object:Gem::Version
79
69
  version: '3.0'
80
70
  - !ruby/object:Gem::Dependency
81
71
  name: json
82
72
  requirement: !ruby/object:Gem::Requirement
83
- none: false
84
73
  requirements:
85
- - - ! '>='
74
+ - - '>='
86
75
  - !ruby/object:Gem::Version
87
76
  version: '1.7'
88
77
  type: :runtime
89
78
  prerelease: false
90
79
  version_requirements: !ruby/object:Gem::Requirement
91
- none: false
92
80
  requirements:
93
- - - ! '>='
81
+ - - '>='
94
82
  - !ruby/object:Gem::Version
95
83
  version: '1.7'
96
84
  - !ruby/object:Gem::Dependency
97
85
  name: sxp
98
86
  requirement: !ruby/object:Gem::Requirement
99
- none: false
100
87
  requirements:
101
- - - ! '>='
88
+ - - '>='
102
89
  - !ruby/object:Gem::Version
103
90
  version: 0.1.0
104
91
  type: :runtime
105
92
  prerelease: false
106
93
  version_requirements: !ruby/object:Gem::Requirement
107
- none: false
108
94
  requirements:
109
- - - ! '>='
95
+ - - '>='
110
96
  - !ruby/object:Gem::Version
111
97
  version: 0.1.0
112
98
  - !ruby/object:Gem::Dependency
113
99
  name: sparql-client
114
100
  requirement: !ruby/object:Gem::Requirement
115
- none: false
116
101
  requirements:
117
- - - ! '>='
102
+ - - '>='
118
103
  - !ruby/object:Gem::Version
119
104
  version: '1.0'
120
105
  type: :runtime
121
106
  prerelease: false
122
107
  version_requirements: !ruby/object:Gem::Requirement
123
- none: false
124
108
  requirements:
125
- - - ! '>='
109
+ - - '>='
126
110
  - !ruby/object:Gem::Version
127
111
  version: '1.0'
128
112
  - !ruby/object:Gem::Dependency
129
113
  name: rdf-xsd
130
114
  requirement: !ruby/object:Gem::Requirement
131
- none: false
132
115
  requirements:
133
- - - ! '>='
116
+ - - '>='
134
117
  - !ruby/object:Gem::Version
135
118
  version: '1.0'
136
119
  type: :runtime
137
120
  prerelease: false
138
121
  version_requirements: !ruby/object:Gem::Requirement
139
- none: false
140
122
  requirements:
141
- - - ! '>='
123
+ - - '>='
142
124
  - !ruby/object:Gem::Version
143
125
  version: '1.0'
144
126
  - !ruby/object:Gem::Dependency
145
127
  name: sinatra
146
128
  requirement: !ruby/object:Gem::Requirement
147
- none: false
148
129
  requirements:
149
- - - ! '>='
130
+ - - '>='
150
131
  - !ruby/object:Gem::Version
151
132
  version: 1.3.3
152
133
  type: :development
153
134
  prerelease: false
154
135
  version_requirements: !ruby/object:Gem::Requirement
155
- none: false
156
136
  requirements:
157
- - - ! '>='
137
+ - - '>='
158
138
  - !ruby/object:Gem::Version
159
139
  version: 1.3.3
160
140
  - !ruby/object:Gem::Dependency
161
141
  name: rack
162
142
  requirement: !ruby/object:Gem::Requirement
163
- none: false
164
143
  requirements:
165
- - - ! '>='
144
+ - - '>='
166
145
  - !ruby/object:Gem::Version
167
146
  version: 1.4.4
168
147
  type: :development
169
148
  prerelease: false
170
149
  version_requirements: !ruby/object:Gem::Requirement
171
- none: false
172
150
  requirements:
173
- - - ! '>='
151
+ - - '>='
174
152
  - !ruby/object:Gem::Version
175
153
  version: 1.4.4
176
154
  - !ruby/object:Gem::Dependency
177
155
  name: rack-test
178
156
  requirement: !ruby/object:Gem::Requirement
179
- none: false
180
157
  requirements:
181
- - - ! '>='
158
+ - - '>='
182
159
  - !ruby/object:Gem::Version
183
160
  version: 0.6.2
184
161
  type: :development
185
162
  prerelease: false
186
163
  version_requirements: !ruby/object:Gem::Requirement
187
- none: false
188
164
  requirements:
189
- - - ! '>='
165
+ - - '>='
190
166
  - !ruby/object:Gem::Version
191
167
  version: 0.6.2
192
168
  - !ruby/object:Gem::Dependency
193
169
  name: rdf-turtle
194
170
  requirement: !ruby/object:Gem::Requirement
195
- none: false
196
171
  requirements:
197
- - - ! '>='
172
+ - - '>='
198
173
  - !ruby/object:Gem::Version
199
174
  version: 1.0.4
200
175
  type: :development
201
176
  prerelease: false
202
177
  version_requirements: !ruby/object:Gem::Requirement
203
- none: false
204
178
  requirements:
205
- - - ! '>='
179
+ - - '>='
206
180
  - !ruby/object:Gem::Version
207
181
  version: 1.0.4
208
182
  - !ruby/object:Gem::Dependency
209
183
  name: linkeddata
210
184
  requirement: !ruby/object:Gem::Requirement
211
- none: false
212
185
  requirements:
213
- - - ! '>='
186
+ - - '>='
214
187
  - !ruby/object:Gem::Version
215
188
  version: '0'
216
189
  type: :development
217
190
  prerelease: false
218
191
  version_requirements: !ruby/object:Gem::Requirement
219
- none: false
220
192
  requirements:
221
- - - ! '>='
193
+ - - '>='
222
194
  - !ruby/object:Gem::Version
223
195
  version: '0'
224
196
  - !ruby/object:Gem::Dependency
225
197
  name: rdf-spec
226
198
  requirement: !ruby/object:Gem::Requirement
227
- none: false
228
199
  requirements:
229
- - - ! '>='
200
+ - - '>='
230
201
  - !ruby/object:Gem::Version
231
202
  version: '1.0'
232
203
  type: :development
233
204
  prerelease: false
234
205
  version_requirements: !ruby/object:Gem::Requirement
235
- none: false
236
206
  requirements:
237
- - - ! '>='
207
+ - - '>='
238
208
  - !ruby/object:Gem::Version
239
209
  version: '1.0'
240
210
  - !ruby/object:Gem::Dependency
241
211
  name: open-uri-cached
242
212
  requirement: !ruby/object:Gem::Requirement
243
- none: false
244
213
  requirements:
245
- - - ! '>='
214
+ - - '>='
246
215
  - !ruby/object:Gem::Version
247
216
  version: 0.0.5
248
217
  type: :development
249
218
  prerelease: false
250
219
  version_requirements: !ruby/object:Gem::Requirement
251
- none: false
252
220
  requirements:
253
- - - ! '>='
221
+ - - '>='
254
222
  - !ruby/object:Gem::Version
255
223
  version: 0.0.5
256
224
  - !ruby/object:Gem::Dependency
257
225
  name: equivalent-xml
258
226
  requirement: !ruby/object:Gem::Requirement
259
- none: false
260
227
  requirements:
261
- - - ! '>='
228
+ - - '>='
262
229
  - !ruby/object:Gem::Version
263
230
  version: '0'
264
231
  type: :development
265
232
  prerelease: false
266
233
  version_requirements: !ruby/object:Gem::Requirement
267
- none: false
268
234
  requirements:
269
- - - ! '>='
235
+ - - '>='
270
236
  - !ruby/object:Gem::Version
271
237
  version: '0'
272
238
  - !ruby/object:Gem::Dependency
273
239
  name: nokogiri
274
240
  requirement: !ruby/object:Gem::Requirement
275
- none: false
276
241
  requirements:
277
- - - ! '>='
242
+ - - '>='
278
243
  - !ruby/object:Gem::Version
279
244
  version: 1.5.0
280
245
  type: :development
281
246
  prerelease: false
282
247
  version_requirements: !ruby/object:Gem::Requirement
283
- none: false
284
248
  requirements:
285
- - - ! '>='
249
+ - - '>='
286
250
  - !ruby/object:Gem::Version
287
251
  version: 1.5.0
288
252
  - !ruby/object:Gem::Dependency
289
253
  name: rspec
290
254
  requirement: !ruby/object:Gem::Requirement
291
- none: false
292
255
  requirements:
293
- - - ! '>='
256
+ - - '>='
294
257
  - !ruby/object:Gem::Version
295
258
  version: 2.12.0
296
259
  type: :development
297
260
  prerelease: false
298
261
  version_requirements: !ruby/object:Gem::Requirement
299
- none: false
300
262
  requirements:
301
- - - ! '>='
263
+ - - '>='
302
264
  - !ruby/object:Gem::Version
303
265
  version: 2.12.0
304
266
  - !ruby/object:Gem::Dependency
305
267
  name: spira
306
268
  requirement: !ruby/object:Gem::Requirement
307
- none: false
308
269
  requirements:
309
270
  - - '='
310
271
  - !ruby/object:Gem::Version
@@ -312,7 +273,6 @@ dependencies:
312
273
  type: :development
313
274
  prerelease: false
314
275
  version_requirements: !ruby/object:Gem::Requirement
315
- none: false
316
276
  requirements:
317
277
  - - '='
318
278
  - !ruby/object:Gem::Version
@@ -320,21 +280,21 @@ dependencies:
320
280
  - !ruby/object:Gem::Dependency
321
281
  name: yard
322
282
  requirement: !ruby/object:Gem::Requirement
323
- none: false
324
283
  requirements:
325
- - - ! '>='
284
+ - - '>='
326
285
  - !ruby/object:Gem::Version
327
286
  version: 0.8.3
328
287
  type: :development
329
288
  prerelease: false
330
289
  version_requirements: !ruby/object:Gem::Requirement
331
- none: false
332
290
  requirements:
333
- - - ! '>='
291
+ - - '>='
334
292
  - !ruby/object:Gem::Version
335
293
  version: 0.8.3
336
- description: ! "\n Implements SPARQL grammar parsing to SPARQL Algebra, SPARQL
337
- Algebra processing\n and includes SPARQL Client for accessing remote repositories."
294
+ description: |2-
295
+
296
+ Implements SPARQL grammar parsing to SPARQL Algebra, SPARQL Algebra processing
297
+ and includes SPARQL Client for accessing remote repositories.
338
298
  email: public-rdf-ruby@w3.org
339
299
  executables:
340
300
  - sparql
@@ -459,27 +419,26 @@ files:
459
419
  homepage: http://github.com/ruby-rdf/sparql
460
420
  licenses:
461
421
  - Public Domain
422
+ metadata: {}
462
423
  post_install_message:
463
424
  rdoc_options: []
464
425
  require_paths:
465
426
  - lib
466
427
  required_ruby_version: !ruby/object:Gem::Requirement
467
- none: false
468
428
  requirements:
469
- - - ! '>='
429
+ - - '>='
470
430
  - !ruby/object:Gem::Version
471
431
  version: 1.9.2
472
432
  required_rubygems_version: !ruby/object:Gem::Requirement
473
- none: false
474
433
  requirements:
475
- - - ! '>='
434
+ - - '>='
476
435
  - !ruby/object:Gem::Version
477
436
  version: '0'
478
437
  requirements: []
479
438
  rubyforge_project: sparql
480
- rubygems_version: 1.8.25
439
+ rubygems_version: 2.0.3
481
440
  signing_key:
482
- specification_version: 3
441
+ specification_version: 4
483
442
  summary: SPARQL library for Ruby.
484
443
  test_files: []
485
444
  has_rdoc: false