Skip to content

Commit 320516b

Browse files
committed
Use SXP instead of SSE for this gem; it's not SPARQL!
1 parent d7d685a commit 320516b

File tree

313 files changed

+19
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+19
-19
lines changed

lib/shex.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module ShEx
1818
# ).parse
1919
#
2020
# @param [IO, StringIO, String, #to_s] expression (ShExC or ShExJ)
21-
# @param ['shexc', 'shexj', 'sse'] format ('shexc')
21+
# @param ['shexc', 'shexj', 'sxp'] format ('shexc')
2222
# @param [Hash{Symbol => Object}] options
2323
# @option (see ShEx::Parser#initialize)
2424
# @return (see ShEx::Parser#parse)
@@ -27,7 +27,7 @@ def self.parse(expression, format: 'shexc', **options)
2727
case format
2828
when 'shexc' then Parser.new(expression, options).parse
2929
when 'shexj'
30-
when 'sse'
30+
when 'sxp'
3131
else raise "Unknown expression format: #{format.inspect}"
3232
end
3333
end

lib/shex/algebra/operator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,10 @@ def operand(index = 0)
195195
end
196196

197197
##
198-
# Returns the SPARQL S-Expression (SSE) representation of this operator.
198+
# Returns the binary S-Expression (SXP) representation of this operator.
199199
#
200200
# @return [Array]
201-
# @see http://openjena.org/wiki/SSE
201+
# @see https://en.wikipedia.org/wiki/S-expression
202202
def to_sxp_bin
203203
operator = [self.class.const_get(:NAME)].flatten.first
204204
[operator, *(operands || []).map(&:to_sxp_bin)]

lib/shex/parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def shape_definition(input, data)
569569
# @option options [#to_s] :anon_base ("b0")
570570
# Basis for generating anonymous Nodes
571571
# @option options [Boolean] :resolve_iris (false)
572-
# Resolve prefix and relative IRIs, otherwise, when serializing the parsed SSE
572+
# Resolve prefix and relative IRIs, otherwise, when serializing the parsed SXP
573573
# as S-Expressions, use the original prefixed and relative URIs along with `base` and `prefix`
574574
# definitions.
575575
# @option options [Boolean] :validate (false)

script/run

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def run(graph, options = {})
2222

2323
shex = ShEx.parse(options[:shex], options)
2424

25-
STDERR.puts ("\nSSE:\n" + shex.to_sse) if options[:debug]
25+
STDERR.puts ("\nSXP:\n" + shex.to_sxp) if options[:debug]
2626

27-
if options[:to_sse]
28-
puts (shex.to_sse)
27+
if options[:to_sxp]
28+
puts (shex.to_sxp)
2929
else
3030
res = shex.execute(graph, options)
3131
puts res.dump
@@ -41,7 +41,7 @@ opts = GetoptLong.new(
4141
["--execute", "-e", GetoptLong::REQUIRED_ARGUMENT],
4242
["--shex", GetoptLong::REQUIRED_ARGUMENT],
4343
["--progress", GetoptLong::NO_ARGUMENT],
44-
["--to-sse", GetoptLong::NO_ARGUMENT],
44+
["--to-sxp", GetoptLong::NO_ARGUMENT],
4545
["--validate", GetoptLong::NO_ARGUMENT],
4646
["--verbose", GetoptLong::NO_ARGUMENT],
4747
["--help", "-?", GetoptLong::NO_ARGUMENT]
@@ -56,7 +56,7 @@ opts.each do |opt, arg|
5656
when '--execute' then options[:shex] = arg
5757
when '--shex' then options[:shex] = RDF::Util::File.open_file(arg).read
5858
when '--progress' then options[:debug] ||= 2
59-
when '--to-sse' then options[:to_sse] = true
59+
when '--to-sxp' then options[:to_sxp] = true
6060
when '--validate' then options[:validate] = true
6161
when '--verbose' then options[:verbose] = true
6262
when "--help"
@@ -67,7 +67,7 @@ opts.each do |opt, arg|
6767
puts " --execute,-e: Use option argument as the patch input"
6868
puts " --shex: Location of ShEx document"
6969
puts " --progress Display parse tree"
70-
puts " --to-sse: Generate SSE for patch instead of running query"
70+
puts " --to-sxp: Generate SXP for patch instead of running query"
7171
puts " --validate: Validate patch document"
7272
puts " --verbose: Display details of processing"
7373
puts " --help,-?: This message"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)