Skip to content

Commit 0d1aea3

Browse files
committed
Cleanup RDF* nomenclature, and use :quoted_triples instead of :rdfstar for supports?.
1 parent 046c8e8 commit 0d1aea3

15 files changed

Lines changed: 20 additions & 19 deletions

lib/rdf/mixin/enumerable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def to_a
8383
# * `: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`.
8484
# * `: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.
8585
# * `: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.
86-
# * `:rdfstar` supports RDF* where statements may be subjects or objects of other statements.
86+
# * `:quoted_triples` supports RDF 1.2 quoted triples.
8787
#
8888
# @param [Symbol, #to_sym] feature
8989
# @return [Boolean]

lib/rdf/mixin/queryable.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def query_execute(query, **options, &block)
140140
# method in order to provide for storage-specific optimized triple
141141
# pattern matching.
142142
#
143-
# ## RDFStar (RDF*)
143+
# ## RDF-star
144144
#
145145
# Statements may have embedded statements as either a subject or object, recursively.
146146
#

lib/rdf/mixin/writable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ def insert_graph(graph)
127127
def insert_statements(statements)
128128
each = statements.respond_to?(:each_statement) ? :each_statement : :each
129129
statements.__send__(each) do |statement|
130-
if statement.embedded? && respond_to?(:supports?) && !supports?(:rdfstar)
131-
raise ArgumentError, "Wriable does not support embedded statements"
130+
if statement.embedded? && respond_to?(:supports?) && !supports?(:quoted_triples)
131+
raise ArgumentError, "Wriable does not support quoted triples"
132132
end
133133
insert_statement(statement)
134134
end

lib/rdf/model/dataset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def isolation_level
104104
# @private
105105
# @see RDF::Enumerable#supports?
106106
def supports?(feature)
107-
return true if %i(graph_name rdfstar).include?(feature)
107+
return true if %i(graph_name quoted_triples).include?(feature)
108108
super
109109
end
110110

lib/rdf/model/graph.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ def query_pattern(pattern, **options, &block)
305305
# @private
306306
# @see RDF::Mutable#insert
307307
def insert_statement(statement)
308-
if statement.embedded? && !@data.supports?(:rdfstar)
309-
raise ArgumentError, "Graph does not support embedded statements"
308+
if statement.embedded? && !@data.supports?(:quoted_triples)
309+
raise ArgumentError, "Graph does not support quoted triples"
310310
end
311311
statement = statement.dup
312312
statement.graph_name = graph_name

lib/rdf/model/statement.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ def variable?(*args)
182182
##
183183
# Returns `true` if any element of the statement is, itself, a statement.
184184
#
185+
# Note: Nomenclature is evolving, alternatives could include `#complex?` and `#nested?`
185186
# @return [Boolean]
186187
def embedded?
187188
subject && subject.statement? || object && object.statement?

lib/rdf/ntriples/reader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ module RDF::NTriples
2828
# end
2929
# end
3030
#
31-
# ** RDFStar (RDF*)
31+
# ** RDF=star
3232
#
3333
# Supports statements as resources using `<<s p o>>`.
3434
#

lib/rdf/ntriples/writer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def format_statement(statement, **options)
224224
end
225225

226226
##
227-
# Returns the N-Triples representation of an RDF* reified statement.
227+
# Returns the N-Triples representation of an RDF-star quoted triple.
228228
#
229229
# @param [RDF::Statement] statement
230230
# @param [Hash{Symbol => Object}] options ({})

lib/rdf/query/solution.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def []=(name, value)
209209
# Merges the bindings from the given `other` query solution into this
210210
# one, overwriting any existing ones having the same name.
211211
#
212-
# ## RDFStar (RDF*)
212+
# ## RDF-star
213213
#
214214
# If merging a binding for a statement to a pattern,
215215
# merge their embedded solutions.

lib/rdf/reader.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ def self.options
163163
datatype: TrueClass,
164164
control: :checkbox,
165165
on: ["--rdfstar"],
166-
description: "Parse RDF*."),
166+
description: "Parse RDF-star for preliminary RDF 1.2 support."),
167167
RDF::CLI::Option.new(
168168
symbol: :validate,
169169
datatype: TrueClass,
@@ -277,7 +277,7 @@ def to_sym
277277
# @param [Boolean] intern (true)
278278
# whether to intern all parsed URIs
279279
# @param [Boolean] rdfstar (false)
280-
# support parsing RDF* statement resources.
280+
# Preliminary support for RDF 1.2.
281281
# @param [Hash] prefixes (Hash.new)
282282
# the prefix mappings to use (not supported by all readers)
283283
# @param [Hash{Symbol => Object}] options

0 commit comments

Comments
 (0)