Skip to content

Commit daac23c

Browse files
author
Thomas Johnson
committed
Merge pull request #281 from ruby-rdf/feature/literal-equality
Add support for `:literal_equality`
2 parents ff89e1c + 525f580 commit daac23c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/rdf/mixin/enumerable.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,15 @@ module Enumerable
6868
# Supported features include:
6969
# * `:graph_name` supports statements with a graph_name, allowing multiple named graphs
7070
# * `:inference` supports RDFS inferrence of queryable contents.
71+
# * `:literal_equality' preserves [term-equality](https://www.w3.org/TR/rdf11-concepts/#dfn-literal-term-equality) for literals. Literals are equal only if their lexical values and datatypes are equal, character by character. Literals may be "inlined" to value-space for efficiency only if `:literal_equality` is `false`.
7172
# * `:validity` allows a concrete Enumerable implementation to indicate that it does or does not support valididty checking. By default implementations are assumed to support validity checking.
7273
# * `:skolemize` supports [Skolemization](https://www.w3.org/wiki/BnodeSkolemization) of an `Enumerable`. Implementations supporting this feature must implement a `#skolemize` method, taking a base URI used for minting URIs for BNodes as stable identifiers and a `#deskolemize` method, also taking a base URI used for turning URIs having that prefix back into the same BNodes which were originally skolemized.
7374
#
7475
# @param [Symbol, #to_sym] feature
7576
# @return [Boolean]
7677
# @since 0.3.5
7778
def supports?(feature)
78-
feature == :validity
79+
feature == :validity || feature == :literal_equality
7980
end
8081

8182
##

0 commit comments

Comments
 (0)