sparql 1.99.1 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/VERSION +1 -1
  4. data/lib/sparql.rb +1 -1
  5. data/lib/sparql/algebra.rb +1 -1
  6. data/lib/sparql/algebra/aggregate.rb +1 -4
  7. data/lib/sparql/algebra/extensions.rb +1 -1
  8. data/lib/sparql/algebra/operator.rb +1 -1
  9. data/lib/sparql/algebra/operator/abs.rb +2 -2
  10. data/lib/sparql/algebra/operator/alt.rb +5 -1
  11. data/lib/sparql/algebra/operator/and.rb +4 -7
  12. data/lib/sparql/algebra/operator/asc.rb +1 -1
  13. data/lib/sparql/algebra/operator/ask.rb +4 -2
  14. data/lib/sparql/algebra/operator/base.rb +2 -2
  15. data/lib/sparql/algebra/operator/bgp.rb +1 -1
  16. data/lib/sparql/algebra/operator/bnode.rb +2 -0
  17. data/lib/sparql/algebra/operator/bound.rb +2 -3
  18. data/lib/sparql/algebra/operator/ceil.rb +1 -1
  19. data/lib/sparql/algebra/operator/coalesce.rb +1 -4
  20. data/lib/sparql/algebra/operator/compare.rb +3 -3
  21. data/lib/sparql/algebra/operator/concat.rb +3 -1
  22. data/lib/sparql/algebra/operator/construct.rb +5 -6
  23. data/lib/sparql/algebra/operator/contains.rb +1 -1
  24. data/lib/sparql/algebra/operator/copy.rb +1 -1
  25. data/lib/sparql/algebra/operator/dataset.rb +2 -2
  26. data/lib/sparql/algebra/operator/datatype.rb +1 -1
  27. data/lib/sparql/algebra/operator/day.rb +1 -1
  28. data/lib/sparql/algebra/operator/desc.rb +1 -1
  29. data/lib/sparql/algebra/operator/describe.rb +2 -2
  30. data/lib/sparql/algebra/operator/distinct.rb +2 -2
  31. data/lib/sparql/algebra/operator/encode_for_uri.rb +1 -1
  32. data/lib/sparql/algebra/operator/equal.rb +7 -3
  33. data/lib/sparql/algebra/operator/exists.rb +3 -2
  34. data/lib/sparql/algebra/operator/exprlist.rb +1 -1
  35. data/lib/sparql/algebra/operator/extend.rb +2 -2
  36. data/lib/sparql/algebra/operator/filter.rb +3 -3
  37. data/lib/sparql/algebra/operator/floor.rb +3 -1
  38. data/lib/sparql/algebra/operator/graph.rb +2 -2
  39. data/lib/sparql/algebra/operator/greater_than.rb +1 -1
  40. data/lib/sparql/algebra/operator/greater_than_or_equal.rb +1 -1
  41. data/lib/sparql/algebra/operator/group.rb +1 -1
  42. data/lib/sparql/algebra/operator/group_concat.rb +5 -4
  43. data/lib/sparql/algebra/operator/hours.rb +1 -1
  44. data/lib/sparql/algebra/operator/if.rb +1 -1
  45. data/lib/sparql/algebra/operator/in.rb +3 -5
  46. data/lib/sparql/algebra/operator/iri.rb +5 -5
  47. data/lib/sparql/algebra/operator/is_blank.rb +1 -1
  48. data/lib/sparql/algebra/operator/is_iri.rb +1 -1
  49. data/lib/sparql/algebra/operator/is_literal.rb +1 -1
  50. data/lib/sparql/algebra/operator/join.rb +2 -2
  51. data/lib/sparql/algebra/operator/lang.rb +1 -1
  52. data/lib/sparql/algebra/operator/lang_matches.rb +1 -1
  53. data/lib/sparql/algebra/operator/left_join.rb +2 -2
  54. data/lib/sparql/algebra/operator/less_than.rb +1 -1
  55. data/lib/sparql/algebra/operator/less_than_or_equal.rb +1 -1
  56. data/lib/sparql/algebra/operator/md5.rb +2 -0
  57. data/lib/sparql/algebra/operator/minus.rb +1 -1
  58. data/lib/sparql/algebra/operator/minutes.rb +2 -0
  59. data/lib/sparql/algebra/operator/month.rb +2 -0
  60. data/lib/sparql/algebra/operator/not_equal.rb +2 -2
  61. data/lib/sparql/algebra/operator/notexists.rb +2 -0
  62. data/lib/sparql/algebra/operator/notoneof.rb +1 -1
  63. data/lib/sparql/algebra/operator/now.rb +2 -0
  64. data/lib/sparql/algebra/operator/or.rb +3 -3
  65. data/lib/sparql/algebra/operator/order.rb +2 -2
  66. data/lib/sparql/algebra/operator/path.rb +1 -1
  67. data/lib/sparql/algebra/operator/path_opt.rb +1 -1
  68. data/lib/sparql/algebra/operator/path_plus.rb +1 -1
  69. data/lib/sparql/algebra/operator/path_star.rb +1 -1
  70. data/lib/sparql/algebra/operator/prefix.rb +2 -2
  71. data/lib/sparql/algebra/operator/project.rb +2 -2
  72. data/lib/sparql/algebra/operator/rand.rb +2 -0
  73. data/lib/sparql/algebra/operator/reduced.rb +2 -2
  74. data/lib/sparql/algebra/operator/regex.rb +1 -1
  75. data/lib/sparql/algebra/operator/replace.rb +1 -1
  76. data/lib/sparql/algebra/operator/reverse.rb +1 -1
  77. data/lib/sparql/algebra/operator/round.rb +2 -0
  78. data/lib/sparql/algebra/operator/same_term.rb +1 -1
  79. data/lib/sparql/algebra/operator/seconds.rb +2 -0
  80. data/lib/sparql/algebra/operator/seq.rb +1 -1
  81. data/lib/sparql/algebra/operator/sequence.rb +1 -1
  82. data/lib/sparql/algebra/operator/sha1.rb +2 -0
  83. data/lib/sparql/algebra/operator/sha256.rb +2 -0
  84. data/lib/sparql/algebra/operator/sha384.rb +2 -0
  85. data/lib/sparql/algebra/operator/sha512.rb +2 -0
  86. data/lib/sparql/algebra/operator/slice.rb +2 -2
  87. data/lib/sparql/algebra/operator/str.rb +1 -1
  88. data/lib/sparql/algebra/operator/table.rb +1 -1
  89. data/lib/sparql/algebra/operator/timezone.rb +2 -0
  90. data/lib/sparql/algebra/operator/tz.rb +2 -0
  91. data/lib/sparql/algebra/operator/union.rb +2 -2
  92. data/lib/sparql/algebra/operator/year.rb +2 -0
  93. data/lib/sparql/algebra/query.rb +1 -1
  94. data/lib/sparql/grammar.rb +1 -1
  95. data/lib/sparql/grammar/parser11.rb +14 -15
  96. data/lib/sparql/version.rb +1 -1
  97. metadata +80 -46
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (project (?v)
11
11
  # (bgp (triple ?x ?p ?v)))))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
13
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlDistinct
14
14
  class Distinct < Operator::Unary
15
15
  include Query
16
16
 
@@ -30,7 +30,7 @@ module SPARQL; module Algebra
30
30
  # @yieldreturn [void] ignored
31
31
  # @return [RDF::Query::Solutions]
32
32
  # the resulting solution sequence
33
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
33
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
34
34
  def execute(queryable, options = {}, &block)
35
35
  @solutions = queryable.query(operands.last, options.merge(depth: options[:depth].to_i + 1)).distinct
36
36
  @solutions.each(&block) if block_given?
@@ -16,7 +16,7 @@ module SPARQL; module Algebra
16
16
  NAME = :encode_for_uri
17
17
 
18
18
  ##
19
- # The ENCODE_FOR_URI function corresponds to the XPath fn:encode-for-uri function. It returns a simple literal with the lexical form obtained from the lexical form of its input after translating reserved characters according to the fn:encode-for-uri function.
19
+ # The `ENCODE_FOR_URI` function corresponds to the XPath fn:encode-for-uri function. It returns a simple literal with the lexical form obtained from the lexical form of its input after translating reserved characters according to the fn:encode-for-uri function.
20
20
  #
21
21
  # @example
22
22
  # encode_for_uri("Los Angeles") "Los%20Angeles"
@@ -6,13 +6,17 @@ module SPARQL; module Algebra
6
6
  # @example
7
7
  # (= ?x ?y)
8
8
  #
9
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
10
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-RDFterm-equal
9
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
10
+ # @see http://www.w3.org/TR/sparql11-query/#func-RDFterm-equal
11
11
  class Equal < Compare
12
12
  NAME = :'='
13
13
 
14
14
  ##
15
- # Returns `true` if the operands are equal; returns `false` otherwise.
15
+ # Returns TRUE if `term1` and `term2` are the same RDF term as defined in Resource Description Framework (RDF): Concepts and Abstract Syntax [CONCEPTS]; produces a type error if the arguments are both literal but are not the same RDF term *; returns FALSE otherwise. `term1` and `term2` are the same if any of the following is true:
16
+ #
17
+ # * term1 and term2 are equivalent IRIs as defined in 6.4 RDF URI References of [CONCEPTS].
18
+ # * term1 and term2 are equivalent literals as defined in 6.5.1 Literal Equality of [CONCEPTS].
19
+ # * term1 and term2 are the same blank node as described in 6.6 Blank Nodes of [CONCEPTS].
16
20
  #
17
21
  # @param [RDF::Term] term1
18
22
  # an RDF term
@@ -3,13 +3,14 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL logical `exists` operator.
5
5
  #
6
+ # There is a filter operator EXISTS that takes a graph pattern. EXISTS returns `true`/`false` depending on whether the pattern matches the dataset given the bindings in the current group graph pattern, the dataset and the active graph at this point in the query evaluation. No additional binding of variables occurs. The `NOT EXISTS` form translates into `fn:not(EXISTS{...})`.
7
+ #
6
8
  # @example
7
9
  # (prefix ((ex: <http://www.example.org/>))
8
10
  # (filter (exists (bgp (triple ?s ?p ex:o)))
9
11
  # (bgp (triple ?s ?p ?o))))
10
12
  #
11
- # @see http://www.w3.org/TR/sparql11-query/#func-abs
12
- # @see http://www.w3.org/TR/xpath-functions/#func-abs
13
+ # @see http://www.w3.org/TR/sparql11-query/#func-filter-exists
13
14
  class Exists < Operator::Unary
14
15
  include Evaluatable
15
16
 
@@ -14,7 +14,7 @@ module SPARQL; module Algebra
14
14
  # (triple ?s :q ?w)
15
15
  # ))))
16
16
  #
17
- # @see http://www.w3.org/TR/rdf-sparql-query/#evaluation
17
+ # @see http://www.w3.org/TR/sparql11-query/#evaluation
18
18
  class Exprlist < Operator
19
19
  include Evaluatable
20
20
 
@@ -11,7 +11,7 @@ module SPARQL; module Algebra
11
11
  # (extend ((?z (+ ?o 10)))
12
12
  # (bgp (triple ?s <http://example/p> ?o)))))
13
13
  #
14
- # @see http://www.w3.org/TR/rdf-sparql-query/#evaluation
14
+ # @see http://www.w3.org/TR/sparql11-query/#evaluation
15
15
  class Extend < Operator::Binary
16
16
  include Query
17
17
 
@@ -38,7 +38,7 @@ module SPARQL; module Algebra
38
38
  # @yieldreturn [void] ignored
39
39
  # @return [RDF::Query::Solutions]
40
40
  # the resulting solution sequence
41
- # @see http://www.w3.org/TR/rdf-sparql-query/#evaluation
41
+ # @see http://www.w3.org/TR/sparql11-query/#evaluation
42
42
  def execute(queryable, options = {}, &block)
43
43
  debug(options) {"Extend"}
44
44
  @solutions = operand(1).execute(queryable, options.merge(depth: options[:depth].to_i + 1))
@@ -9,7 +9,7 @@ module SPARQL; module Algebra
9
9
  # (filter (= ?v 2)
10
10
  # (bgp (triple ?s <http://example/p> ?v)))))
11
11
  #
12
- # @see http://www.w3.org/TR/rdf-sparql-query/#evaluation
12
+ # @see http://www.w3.org/TR/sparql11-query/#evaluation
13
13
  class Filter < Operator::Binary
14
14
  include Query
15
15
 
@@ -34,8 +34,8 @@ module SPARQL; module Algebra
34
34
  # @yieldreturn [void] ignored
35
35
  # @return [RDF::Query::Solutions]
36
36
  # the resulting solution sequence
37
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
38
- # @see http://www.w3.org/TR/rdf-sparql-query/#ebv
37
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
38
+ # @see http://www.w3.org/TR/sparql11-query/#ebv
39
39
  def execute(queryable, options = {}, &block)
40
40
  debug(options) {"Filter #{operands.first.to_sxp}"}
41
41
  opts = options.merge(queryable: queryable, depth: options[:depth].to_i + 1)
@@ -14,7 +14,9 @@ module SPARQL; module Algebra
14
14
  NAME = [:floor]
15
15
 
16
16
  ##
17
- # Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of $arg. If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
17
+ # Returns the largest (closest to positive infinity) number with no fractional part that is not greater than the value of `arg`. An error is raised if `arg` is not a numeric value.
18
+ #
19
+ # If type of $arg is one of the four numeric types xs:float, xs:double, xs:decimal or xs:integer the type of the result is the same as the type of $arg. If the type of $arg is a type derived from one of the numeric types, the result is an instance of the base numeric type.
18
20
  #
19
21
  # For float and double arguments, if the argument is positive zero, then positive zero is returned. If the argument is negative zero, then negative zero is returned.
20
22
  #
@@ -15,7 +15,7 @@ module SPARQL; module Algebra
15
15
  # (graph :g
16
16
  # ((triple :s :p :o))))
17
17
  #
18
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
18
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
19
19
  class Graph < Operator::Binary
20
20
  include Query
21
21
 
@@ -63,7 +63,7 @@ module SPARQL; module Algebra
63
63
  # @yieldreturn [void] ignored
64
64
  # @return [RDF::Query::Solutions]
65
65
  # the resulting solution sequence
66
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
66
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
67
67
  def execute(queryable, options = {}, &block)
68
68
  debug(options) {"Graph #{operands.first}"}
69
69
  graph_name, query = operands.first, operands.last
@@ -6,7 +6,7 @@ module SPARQL; module Algebra
6
6
  # @example
7
7
  # (> ?x ?y)
8
8
  #
9
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
9
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
10
10
  # @see http://www.w3.org/TR/xpath-functions/#func-compare
11
11
  # @see http://www.w3.org/TR/xpath-functions/#func-numeric-greater-than
12
12
  # @see http://www.w3.org/TR/xpath-functions/#func-boolean-greater-than
@@ -7,7 +7,7 @@ module SPARQL; module Algebra
7
7
  # @example
8
8
  # (>= ?x ?y)
9
9
  #
10
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
10
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
11
11
  # @see http://www.w3.org/TR/xpath-functions/#func-compare
12
12
  # @see http://www.w3.org/TR/xpath-functions/#func-numeric-greater-than
13
13
  # @see http://www.w3.org/TR/xpath-functions/#func-boolean-greater-than
@@ -17,7 +17,7 @@ module SPARQL; module Algebra
17
17
  # (bgp (triple ?s :p ?v))
18
18
  # (bgp (triple ?s :q ?w)))))))
19
19
  #
20
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
20
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
21
21
  class Group < Operator
22
22
  include Query
23
23
 
@@ -3,6 +3,8 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL `groupconcat` set function.
5
5
  #
6
+ # GroupConcat is a set function which performs a string concatenation across the values of an expression with a group. The order of the strings is not specified. The separator character used in the concatenation may be given with the scalar argument SEPARATOR.
7
+ #
6
8
  # @example
7
9
  # (prefix ((: <http://www.example.org/>))
8
10
  # (filter (|| (= ?g "1 22") (= ?g "22 1"))
@@ -16,9 +18,8 @@ module SPARQL; module Algebra
16
18
  include Aggregate
17
19
 
18
20
  NAME = :group_concat
19
-
20
21
  ##
21
- # One, two or three operands, the first may be `distinct`, the last operand, if it exists, is a separator, defaulting to ' '.
22
+ # One or two operands, the second operand, if it exists, is a separator, defaulting to ' '.
22
23
  #
23
24
  # @param [Enumerable<RDF::Query::Solution>] solutions ([])
24
25
  # an enumerable set of query solutions
@@ -28,7 +29,6 @@ module SPARQL; module Algebra
28
29
  # @raise [TypeError]
29
30
  # @abstract
30
31
  def aggregate(solutions = [], options = {})
31
- operands.shift if distinct = (operands.first == :distinct)
32
32
  sep = operands.length == 2 ? operand(0).last : RDF::Literal(' ')
33
33
  args_enum = solutions.map do |solution|
34
34
  begin
@@ -38,9 +38,10 @@ module SPARQL; module Algebra
38
38
  nil
39
39
  end
40
40
  end
41
- apply(distinct ? args_enum.uniq : args_enum, sep)
41
+ apply(args_enum, sep)
42
42
  end
43
43
 
44
+
44
45
  ##
45
46
  # GroupConcat is a set function which performs a string concatenation across the values of an expression with a group. The order of the strings is not specified. The separator character used in the concatenation may be given with the scalar argument SEPARATOR.
46
47
  #
@@ -16,7 +16,7 @@ module SPARQL; module Algebra
16
16
  NAME = :hours
17
17
 
18
18
  ##
19
- # Returns the hours part of arg as an integer.
19
+ # Returns the hours part of `arg` as an integer. The value is as given in the lexical form of the XSD dateTime.
20
20
  #
21
21
  # @param [RDF::Literal] operand
22
22
  # the operand
@@ -17,7 +17,7 @@ module SPARQL; module Algebra
17
17
  NAME = :if
18
18
 
19
19
  ##
20
- # The IF function form evaluates the first argument, interprets it as a effective boolean value, then returns the value of expression2 if the EBV is true, otherwise it returns the value of expression3. Only one of expression2 and expression3 is evaluated. If evaluating the first argument raises an error, then an error is raised for the evaluation of the IF expression.
20
+ # The IF function form evaluates the first argument, interprets it as a effective boolean value, then returns the value of `expression2` if the EBV is true, otherwise it returns the value of `expression3`. Only one of `expression2` and `expression3` is evaluated. If evaluating the first argument raises an error, then an error is raised for the evaluation of the IF expression.
21
21
  #
22
22
  # @example
23
23
  #
@@ -3,8 +3,6 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL GraphPattern `in` operator.
5
5
  #
6
- # Used for filters with more than one expression.
7
- #
8
6
  # @example
9
7
  # (ask (filter (in 2 1 2 3) (bgp)))
10
8
  #
@@ -16,11 +14,11 @@ module SPARQL; module Algebra
16
14
 
17
15
  ##
18
16
  # The IN operator tests whether the RDF term on the left-hand side is found in the values of list of expressions on the right-hand side. The test is done with "=" operator, which tests for the same value, as determined by the operator mapping.
19
- #
17
+ #
20
18
  # A list of zero terms on the right-hand side is legal.
21
- #
19
+ #
22
20
  # Errors in comparisons cause the IN expression to raise an error if the RDF term being tested is not found elsewhere in the list of terms.
23
- #
21
+ #
24
22
  # The IN operator is equivalent to the SPARQL expression:
25
23
  #
26
24
  # (lhs = expression1) || (lhs = expression2) || ...
@@ -8,7 +8,7 @@ module SPARQL; module Algebra
8
8
  # (extend ((?uri (uri "uri")) (?iri (iri "iri")))
9
9
  # (bgp))))
10
10
  #
11
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-iri
11
+ # @see http://www.w3.org/TR/sparql11-query/#func-iri
12
12
  class IRI < Operator::Unary
13
13
  include Evaluatable
14
14
 
@@ -16,13 +16,13 @@ module SPARQL; module Algebra
16
16
 
17
17
  ##
18
18
  # The IRI function constructs an IRI by resolving the string argument (see RFC 3986 and RFC 3987 or any later RFC that superceeds RFC 3986 or RFC 3987). The IRI is resolved against the base IRI of the query and must result in an absolute IRI.
19
- #
19
+ #
20
20
  # The URI function is a synonym for IRI.
21
- #
21
+ #
22
22
  # If the function is passed an IRI, it returns the IRI unchanged.
23
- #
23
+ #
24
24
  # Passing any RDF term other than a simple literal, xsd:string or an IRI is an error.
25
- #
25
+ #
26
26
  # An implementation may normalize the IRI.
27
27
  #
28
28
  # @param [RDF::Term] literal
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (filter (isBlank ?v)
11
11
  # (bgp (triple ?x :p ?v)))))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-isBlank
13
+ # @see http://www.w3.org/TR/sparql11-query/#func-isBlank
14
14
  class IsBlank < Operator::Unary
15
15
  include Evaluatable
16
16
 
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (filter (isIRI ?v)
11
11
  # (bgp (triple ?x :p ?v)))))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-isIRI
13
+ # @see http://www.w3.org/TR/sparql11-query/#func-isIRI
14
14
  class IsIRI < Operator::Unary
15
15
  include Evaluatable
16
16
 
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (filter (isLiteral ?v)
11
11
  # (bgp (triple ?x :p ?v)))))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-isLiteral
13
+ # @see http://www.w3.org/TR/sparql11-query/#func-isLiteral
14
14
  class IsLiteral < Operator::Unary
15
15
  include Evaluatable
16
16
 
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (graph ?g
11
11
  # (bgp (triple ?s ?q ?v)))))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
13
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
14
14
  class Join < Operator::Binary
15
15
  include Query
16
16
 
@@ -31,7 +31,7 @@ module SPARQL; module Algebra
31
31
  # @yieldreturn [void] ignored
32
32
  # @return [RDF::Query::Solutions]
33
33
  # the resulting solution sequence
34
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
34
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
35
35
  # @see http://rdf.rubyforge.org/RDF/Query/Solution.html#merge-instance_method
36
36
  # @see http://rdf.rubyforge.org/RDF/Query/Solution.html#compatible%3F-instance_method
37
37
  def execute(queryable, options = {}, &block)
@@ -3,7 +3,7 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL `lang` operator.
5
5
  #
6
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-lang
6
+ # @see http://www.w3.org/TR/sparql11-query/#func-lang
7
7
  class Lang < Operator::Unary
8
8
  include Evaluatable
9
9
 
@@ -8,7 +8,7 @@ module SPARQL; module Algebra
8
8
  # (filter (langMatches (lang ?v) "en-GB")
9
9
  # (bgp (triple :x ?p ?v))))
10
10
  #
11
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-langMatches
11
+ # @see http://www.w3.org/TR/sparql11-query/#func-langMatches
12
12
  # @see http://tools.ietf.org/html/rfc4647#section-3.3.1
13
13
  class LangMatches < Operator::Binary
14
14
  include Evaluatable
@@ -10,7 +10,7 @@ module SPARQL; module Algebra
10
10
  # (bgp (triple ?y :q ?w))
11
11
  # (= ?v 2)))
12
12
  #
13
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
13
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
14
14
  class LeftJoin < Operator
15
15
  include Query
16
16
 
@@ -31,7 +31,7 @@ module SPARQL; module Algebra
31
31
  # @yieldreturn [void] ignored
32
32
  # @return [RDF::Query::Solutions]
33
33
  # the resulting solution sequence
34
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
34
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
35
35
  # @see http://rdf.rubyforge.org/RDF/Query/Solution.html#merge-instance_method
36
36
  # @see http://rdf.rubyforge.org/RDF/Query/Solution.html#compatible%3F-instance_method
37
37
  def execute(queryable, options = {}, &block)
@@ -6,7 +6,7 @@ module SPARQL; module Algebra
6
6
  # @example
7
7
  # (< ?x ?y)
8
8
  #
9
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
9
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
10
10
  # @see http://www.w3.org/TR/xpath-functions/#func-compare
11
11
  # @see http://www.w3.org/TR/xpath-functions/#func-numeric-less-than
12
12
  # @see http://www.w3.org/TR/xpath-functions/#func-boolean-less-than
@@ -6,7 +6,7 @@ module SPARQL; module Algebra
6
6
  # @example
7
7
  # (<= ?x ?y)
8
8
  #
9
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
9
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
10
10
  # @see http://www.w3.org/TR/xpath-functions/#func-compare
11
11
  # @see http://www.w3.org/TR/xpath-functions/#func-numeric-less-than
12
12
  # @see http://www.w3.org/TR/xpath-functions/#func-boolean-less-than
@@ -5,6 +5,8 @@ module SPARQL; module Algebra
5
5
  ##
6
6
  # The SPARQL logical `md5` operator.
7
7
  #
8
+ # Returns the MD5 checksum, as a hex digit string, calculated on the UTF-8 representation of the simple literal or lexical form of the `xsd:string`. Hex digits `SHOULD` be in lower case.
9
+ #
8
10
  # @example
9
11
  # (prefix ((: <http://example.org/>))
10
12
  # (project (?hash)
@@ -12,7 +12,7 @@ module SPARQL; module Algebra
12
12
  # (bgp (triple ?animal <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type))))))
13
13
  #
14
14
  # @see http://www.w3.org/TR/xpath-functions/#func-numeric-unary-minus
15
- # @see http://www.w3.org/TR/rdf-sparql-query/#sparqlAlgebra
15
+ # @see http://www.w3.org/TR/sparql11-query/#sparqlAlgebra
16
16
  class Minus < Operator::Binary
17
17
  include Query
18
18
 
@@ -3,6 +3,8 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL logical `minutes` operator.
5
5
  #
6
+ # Returns the minutes part of the lexical form of `arg`. The value is as given in the lexical form of the XSD dateTime.
7
+ #
6
8
  # @example
7
9
  # (prefix ((: <http://example.org/>))
8
10
  # (project (?s ?x)
@@ -3,6 +3,8 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL logical `month` operator.
5
5
  #
6
+ # Returns the month part of `arg` as an integer.
7
+ #
6
8
  # @example
7
9
  # (prefix ((: <http://example.org/>))
8
10
  # (project (?s ?x)
@@ -3,8 +3,8 @@ module SPARQL; module Algebra
3
3
  ##
4
4
  # The SPARQL relational `!=` (not equal) comparison operator.
5
5
  #
6
- # @see http://www.w3.org/TR/rdf-sparql-query/#OperatorMapping
7
- # @see http://www.w3.org/TR/rdf-sparql-query/#func-RDFterm-equal
6
+ # @see http://www.w3.org/TR/sparql11-query/#OperatorMapping
7
+ # @see http://www.w3.org/TR/sparql11-query/#func-RDFterm-equal
8
8
  class NotEqual < Equal
9
9
  NAME = :'!='
10
10