shex 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d66489982d96aa02cd6be18354daaa81934af243
4
- data.tar.gz: 7385a3e9933b1c81e09b7d0a126a1760de9aa4c2
3
+ metadata.gz: 51c304bc780f271fc54404ac8becb3553504e17f
4
+ data.tar.gz: 15d2a5d06d9830be1071ec8fa8a98b64806e2459
5
5
  SHA512:
6
- metadata.gz: d060ca866830927b3342352249337b6c06b25060677a8fe46e3a017d9c7a269749e5e1e792928eb6c4324bbaffb3bab91da1fb560d5e97ef33df57847df281e7
7
- data.tar.gz: 7bf7a3fb6bd9d121a00ba837a5b0725cb5b2732d04dc8c959a8ee37ff3a311340dd9ebdf4496254dc450c39ee139e92800773990a133d922ffb98e5e7f602160
6
+ metadata.gz: 41c3c2aff0ba9f453d72c1a7a940de48f4826d0657f6e6cafeb4c5154e98ff45ce7c1ea6b26bc8a3d8a86f65d49449a42415217b4238724b4c08a33ddfb4c778
7
+ data.tar.gz: 3efdbda75cf115e4babeec86838d49790a89673109f0c19ae2d00527b1bb048a3dbc51fd1114445cd9669efecd91ece885c32571e2fe13351686630b30e58566
data/README.md CHANGED
@@ -164,6 +164,20 @@ The `#initialize` method is called when {ShEx::Algebra::Schema#execute} starts a
164
164
 
165
165
  To make sure your extension is found, make sure to require it before the shape is executed.
166
166
 
167
+ ## Command Line
168
+ When the `linkeddata` gem is installed, RDF.rb includes a `rdf` executable which acts as a wrapper to perform a number of different
169
+ operations on RDF files, including ShEx. The commands specific to ShEx is
170
+
171
+ * `shex`: Validate repository given shape
172
+
173
+ Using this command requires either a `shex-input` where the ShEx schema is URI encoded, or `shex`, which references a URI or file path to the schema. Other required options are `shape` and `focus`.
174
+
175
+ Example usage:
176
+
177
+ rdf shex https://raw.githubusercontent.com/ruby-rdf/shex/develop/etc/doap.ttl \
178
+ --schema https://raw.githubusercontent.com/ruby-rdf/shex/develop/etc/doap.shex \
179
+ --focus http://rubygems.org/gems/shex
180
+
167
181
  ## Documentation
168
182
 
169
183
  <http://rubydoc.info/github/ruby-rdf/shex>
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
data/etc/doap.ttl CHANGED
@@ -1,3 +1,4 @@
1
+ @base <http://rubygems.org/gems/shex> .
1
2
  @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
2
3
  @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
3
4
  @prefix dc: <http://purl.org/dc/terms/> .
data/lib/shex.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  #
4
4
  # @see http://shex.io/shex-semantics/#shexc
5
5
  module ShEx
6
+ require 'shex/format'
6
7
  autoload :Algebra, 'shex/algebra'
7
8
  autoload :Meta, 'shex/meta'
8
9
  autoload :Parser, 'shex/parser'
data/lib/shex/algebra.rb CHANGED
@@ -13,6 +13,7 @@ module ShEx
13
13
  autoload :External, 'shex/algebra/external'
14
14
  autoload :IriStem, 'shex/algebra/stem'
15
15
  autoload :IriStemRange, 'shex/algebra/stem_range'
16
+ autoload :Language, 'shex/algebra/language'
16
17
  autoload :LanguageStem, 'shex/algebra/stem'
17
18
  autoload :LanguageStemRange,'shex/algebra/stem_range'
18
19
  autoload :LiteralStem, 'shex/algebra/stem'
@@ -56,6 +57,7 @@ module ShEx
56
57
  when 'EachOf' then EachOf
57
58
  when 'IriStem' then IriStem
58
59
  when 'IriStemRange' then IriStemRange
60
+ when 'Language' then Language
59
61
  when 'LanguageStem' then LanguageStem
60
62
  when 'LanguageStemRange' then LanguageStemRange
61
63
  when 'LiteralStem' then LiteralStem
@@ -0,0 +1,22 @@
1
+ module ShEx::Algebra
2
+ ##
3
+ class Language < Operator::Unary
4
+ NAME = :language
5
+
6
+ ##
7
+ # matches any literal having a language tag that matches value
8
+ def match?(value, depth: 0)
9
+ status "", depth: depth
10
+ if case expr = operands.first
11
+ when RDF::Literal then value.language == expr.to_s.to_sym
12
+ else false
13
+ end
14
+ status "matched #{value}", depth: depth
15
+ true
16
+ else
17
+ status "not matched #{value}", depth: depth
18
+ false
19
+ end
20
+ end
21
+ end
22
+ end
@@ -269,11 +269,12 @@ module ShEx::Algebra
269
269
  case k
270
270
  when /length|clusive|digits/ then operands << [k.to_sym, RDF::Literal(v)]
271
271
  when 'id' then id = iri(v, options)
272
- when 'flags' then ; # consumed in pattern below
272
+ when 'flags' then ; # consumed in pattern below
273
273
  when 'min', 'max' then operands << [k.to_sym, (v == -1 ? '*' : v)]
274
274
  when 'inverse', 'closed' then operands << k.to_sym
275
275
  when 'nodeKind' then operands << v.to_sym
276
276
  when 'object' then operands << value(v, options)
277
+ when 'languageTag' then operands << v
277
278
  when 'pattern'
278
279
  # Include flags as well
279
280
  operands << [:pattern, RDF::Literal(v), operator['flags']].compact
@@ -295,7 +296,11 @@ module ShEx::Algebra
295
296
  end
296
297
  when 'stem', 'name'
297
298
  # Value may be :wildcard for stem
298
- operands << (v.is_a?(Symbol) ? v : value(v, options))
299
+ if [IriStem, IriStemRange, SemAct].include?(self)
300
+ operands << (v.is_a?(Symbol) ? v : value(v, options))
301
+ else
302
+ operands << v
303
+ end
299
304
  when 'predicate' then operands << [:predicate, iri(v, options)]
300
305
  when 'extra', 'datatype'
301
306
  v = [v] unless v.is_a?(Array)
@@ -303,9 +308,13 @@ module ShEx::Algebra
303
308
  when 'exclusions'
304
309
  v = [v] unless v.is_a?(Array)
305
310
  operands << v.map do |op|
306
- op.is_a?(Hash) && op.has_key?('type') ?
307
- ShEx::Algebra.from_shexj(op, options) :
311
+ if op.is_a?(Hash) && op.has_key?('type')
312
+ ShEx::Algebra.from_shexj(op, options)
313
+ elsif [IriStem, IriStemRange].include?(self)
308
314
  value(op, options)
315
+ else
316
+ RDF::Literal(op)
317
+ end
309
318
  end.unshift(:exclusions)
310
319
  when 'semActs', 'startActs', 'annotations'
311
320
  v = [v] unless v.is_a?(Array)
@@ -350,7 +359,13 @@ module ShEx::Algebra
350
359
  # First element should be a symbol
351
360
  case sym = op.first
352
361
  when :datatype then obj['datatype'] = op.last.to_s
353
- when :exclusions then obj['exclusions'] = Array(op[1..-1]).map {|v| serialize_value(v)}
362
+ when :exclusions
363
+ obj['exclusions'] = Array(op[1..-1]).map do |v|
364
+ case v
365
+ when Operator then v.to_h
366
+ else v.to_s
367
+ end
368
+ end
354
369
  when :extra then (obj['extra'] ||= []).concat Array(op[1..-1]).map(&:to_s)
355
370
  when :pattern
356
371
  obj['pattern'] = op[1]
@@ -383,13 +398,18 @@ module ShEx::Algebra
383
398
  end
384
399
  when RDF::Value
385
400
  case self
386
- when Stem, StemRange then obj['stem'] = serialize_value(op)
401
+ when Stem, StemRange
402
+ obj['stem'] = case op
403
+ when Operator then op.to_h
404
+ else op.to_s
405
+ end
387
406
  when SemAct then obj[op.is_a?(RDF::URI) ? 'name' : 'code'] = op.to_s
388
407
  when TripleConstraint then obj['valueExpr'] = op.to_s
389
408
  when Shape then obj['expression'] = op.to_s
390
409
  when EachOf, OneOf then (obj['expressions'] ||= []) << op.to_s
391
410
  when And, Or then (obj['shapeExprs'] ||= []) << op.to_s
392
411
  when Not then obj['shapeExpr'] = op.to_s
412
+ when Language then obj['languageTag'] = op.to_s
393
413
  else
394
414
  raise "How to serialize Value #{op.inspect} to json for #{self}"
395
415
  end
@@ -30,7 +30,7 @@ module ShEx::Algebra
30
30
  def json_type
31
31
  # FIXME: This is funky, due to oddities in normative shexj
32
32
  t = self.class.name.split('::').last
33
- parent.is_a?(Value) ? "#{t}Range" : t
33
+ #parent.is_a?(Value) ? "#{t}Range" : t
34
34
  end
35
35
  end
36
36
 
@@ -14,7 +14,7 @@ module ShEx::Algebra
14
14
  status "", depth: depth
15
15
  if case expr = operands.first
16
16
  when RDF::Value then value.eql?(expr)
17
- when Stem, StemRange then expr.match?(value, depth: depth + 1)
17
+ when Language, Stem, StemRange then expr.match?(value, depth: depth + 1)
18
18
  else false
19
19
  end
20
20
  status "matched #{value}", depth: depth
@@ -0,0 +1,112 @@
1
+ require 'rdf/format'
2
+
3
+ module ShEx
4
+ ##
5
+ # ShEx format specification. Note that this format does not define any readers or writers.
6
+ #
7
+ # @example Obtaining an LD Patch format class
8
+ # RDF::Format.for(:shex) #=> LD::Patch::Format
9
+ # RDF::Format.for("etc/foaf.shex")
10
+ # RDF::Format.for(file_name: "etc/foaf.shex")
11
+ # RDF::Format.for(file_extension: "shex")
12
+ # RDF::Format.for(content_type: "application/shex")
13
+ #
14
+ # @see http://www.w3.org/TR/ldpatch/
15
+ class Format < RDF::Format
16
+ content_type 'application/shex', extension: :shex
17
+ content_encoding 'utf-8'
18
+
19
+ ##
20
+ # Hash of CLI commands appropriate for this format
21
+ # @return [Hash{Symbol => Lambda(Array, Hash)}]
22
+ def self.cli_commands
23
+ {
24
+ shex: {
25
+ description: "Validate repository given shape",
26
+ help: "shex [--shape Resource] [--focus Resource] [--schema-input STRING] [--schema STRING] file",
27
+ parse: true,
28
+ lambda: -> (argv, options) do
29
+ options[:schema_input] ||= case options[:schema]
30
+ when IO, StringIO then options[:schema]
31
+ else RDF::Util::File.open_file(options[:schema]) {|f| f.read}
32
+ end
33
+ raise ArgumentError, "Shape matching requires a schema or reference to schema resource" unless options[:schema_input]
34
+ raise ArgumentError, "Shape matching requires a focus node" unless options[:focus]
35
+ format = options[:schema].to_s.end_with?('json') ? 'shexj' : 'shexc'
36
+ shex = ShEx.parse(options[:schema_input], format: format, **options)
37
+
38
+ if options[:to_sxp] || options[:to_json]
39
+ options[:messages][:shex] = {}
40
+ options[:messages][:shex].merge!({"S-Expression": [SXP::Generator.string(shex.to_sxp_bin)]}) if options[:to_sxp]
41
+ options[:messages][:shex].merge!({ShExJ: [shex.to_json(JSON::LD::JSON_STATE)]}) if options[:to_json]
42
+ else
43
+ focus = options.delete(:focus)
44
+ shape = options.delete(:shape)
45
+ map = shape ? {focus => shape} : {}
46
+ begin
47
+ res = shex.execute(RDF::CLI.repository, map, options.merge(focus: focus))
48
+ options[:messages][:shex] = {
49
+ result: ["Satisfied shape."],
50
+ detail: [SXP::Generator.string(res.to_sxp_bin)]
51
+ }
52
+ rescue ShEx::NotSatisfied => e
53
+ options[:logger].error e.to_s
54
+ options[:messages][:shex] = {
55
+ result: ["Did not satisfied shape."],
56
+ detail: [SXP::Generator.stringe.expression]
57
+ }
58
+ raise
59
+ end
60
+ end
61
+ end,
62
+ options: [
63
+ RDF::CLI::Option.new(
64
+ symbol: :focus,
65
+ datatype: String,
66
+ control: :text,
67
+ use: :required,
68
+ on: ["--focus Resource"],
69
+ description: "Focus node within repository"
70
+ ) {|v| RDF::URI(v)},
71
+ RDF::CLI::Option.new(
72
+ symbol: :shape,
73
+ datatype: String,
74
+ control: :text,
75
+ use: :optional,
76
+ on: ["--shape URI"],
77
+ description: "Shape identifier within ShEx schema"
78
+ ) {|v| RDF::URI(v)},
79
+ RDF::CLI::Option.new(
80
+ symbol: :schema_input,
81
+ datatype: String,
82
+ control: :none,
83
+ on: ["--schema-input STRING"],
84
+ description: "ShEx schema in URI encoded format"
85
+ ) {|v| URI.decode(v)},
86
+ RDF::CLI::Option.new(
87
+ symbol: :schema,
88
+ datatype: String,
89
+ control: :url2,
90
+ on: ["--schema URI"],
91
+ description: "ShEx schema location"
92
+ ) {|v| RDF::URI(v)},
93
+ RDF::CLI::Option.new(
94
+ symbol: :to_json,
95
+ datatype: String,
96
+ control: :checkbox,
97
+ on: ["--to-json"],
98
+ description: "Display parsed schema as ShExJ"
99
+ ),
100
+ RDF::CLI::Option.new(
101
+ symbol: :to_sxp,
102
+ datatype: String,
103
+ control: :checkbox,
104
+ on: ["--to-sxp"],
105
+ description: "Display parsed schema as an S-Expression"
106
+ ),
107
+ ]
108
+ }
109
+ }
110
+ end
111
+ end
112
+ end
data/lib/shex/parser.rb CHANGED
@@ -277,8 +277,10 @@ module ShEx
277
277
  def shape_and(input, data)
278
278
  input.merge!(data.dup.keep_if {|k, v| [:closed, :extraPropertySet, :codeDecl].include?(k)})
279
279
  expressions = Array(data[:shapeExpression]).inject([]) do |memo, expr|
280
- memo.concat(expr.is_a?(Algebra::And) ? expr.operands : [expr])
280
+ #memo.concat(expr.is_a?(Algebra::And) ? expr.operands : [expr])
281
+ memo.concat([expr])
281
282
  end
283
+
282
284
  expression = if expressions.length > 1
283
285
  Algebra::And.new(*expressions, {})
284
286
  else
@@ -463,11 +465,11 @@ module ShEx
463
465
  expression = data[:tripleExpression]
464
466
  attrs = Array(data[:extraPropertySet])
465
467
  attrs << :closed if data[:closed]
466
- attrs << expression
468
+ attrs << expression if expression
467
469
  attrs += Array(data[:annotation])
468
470
  attrs += Array(data[:codeDecl])
469
471
 
470
- input[:shape] = Algebra::Shape.new(*attrs, {}) if expression
472
+ input[:shape] = Algebra::Shape.new(*attrs, {})
471
473
  end
472
474
  private :shape_definition
473
475
 
@@ -639,7 +641,7 @@ module ShEx
639
641
  elsif data[:dot]
640
642
  Algebra::LanguageStemRange.new(:wildcard, exclusions)
641
643
  else
642
- data[:language]
644
+ Algebra::Language.new(data[:language])
643
645
  end
644
646
  end
645
647
 
@@ -4,39 +4,38 @@
4
4
  require 'json/ld'
5
5
  class JSON::LD::Context
6
6
  add_preloaded("http://www.w3.org/ns/shex.jsonld") do
7
- new(term_definitions: {
7
+ new(processingMode: "json-ld-1.0", term_definitions: {
8
8
  "Annotation" => TermDefinition.new("Annotation", id: "http://www.w3.org/ns/shex#Annotation", simple: true),
9
9
  "EachOf" => TermDefinition.new("EachOf", id: "http://www.w3.org/ns/shex#EachOf", simple: true),
10
10
  "IriStem" => TermDefinition.new("IriStem", id: "http://www.w3.org/ns/shex#IriStem", simple: true),
11
+ "IriStemRange" => TermDefinition.new("IriStemRange", id: "http://www.w3.org/ns/shex#IriStemRange", simple: true),
11
12
  "LanguageStem" => TermDefinition.new("LanguageStem", id: "http://www.w3.org/ns/shex#LanguageStem", simple: true),
13
+ "LanguageStemRange" => TermDefinition.new("LanguageStemRange", id: "http://www.w3.org/ns/shex#LanguageStemRange", simple: true),
12
14
  "LiteralStem" => TermDefinition.new("LiteralStem", id: "http://www.w3.org/ns/shex#LiteralStem", simple: true),
15
+ "LiteralStemRange" => TermDefinition.new("LiteralStemRange", id: "http://www.w3.org/ns/shex#LiteralStemRange", simple: true),
13
16
  "NodeConstraint" => TermDefinition.new("NodeConstraint", id: "http://www.w3.org/ns/shex#NodeConstraint", simple: true),
14
- "NodeKind" => TermDefinition.new("NodeKind", id: "http://www.w3.org/ns/shex#NodeKind", simple: true),
15
17
  "OneOf" => TermDefinition.new("OneOf", id: "http://www.w3.org/ns/shex#OneOf", simple: true),
16
18
  "Schema" => TermDefinition.new("Schema", id: "http://www.w3.org/ns/shex#Schema", simple: true),
17
19
  "SemAct" => TermDefinition.new("SemAct", id: "http://www.w3.org/ns/shex#SemAct", simple: true),
18
20
  "Shape" => TermDefinition.new("Shape", id: "http://www.w3.org/ns/shex#Shape", simple: true),
19
21
  "ShapeAnd" => TermDefinition.new("ShapeAnd", id: "http://www.w3.org/ns/shex#ShapeAnd", simple: true),
20
- "ShapeExpression" => TermDefinition.new("ShapeExpression", id: "http://www.w3.org/ns/shex#ShapeExpression", simple: true),
21
22
  "ShapeExternal" => TermDefinition.new("ShapeExternal", id: "http://www.w3.org/ns/shex#ShapeExternal", simple: true),
22
23
  "ShapeNot" => TermDefinition.new("ShapeNot", id: "http://www.w3.org/ns/shex#ShapeNot", simple: true),
23
24
  "ShapeOr" => TermDefinition.new("ShapeOr", id: "http://www.w3.org/ns/shex#ShapeOr", simple: true),
24
25
  "Stem" => TermDefinition.new("Stem", id: "http://www.w3.org/ns/shex#Stem", simple: true),
25
26
  "StemRange" => TermDefinition.new("StemRange", id: "http://www.w3.org/ns/shex#StemRange", simple: true),
26
27
  "TripleConstraint" => TermDefinition.new("TripleConstraint", id: "http://www.w3.org/ns/shex#TripleConstraint", simple: true),
27
- "TripleExpression" => TermDefinition.new("TripleExpression", id: "http://www.w3.org/ns/shex#TripleExpression", simple: true),
28
28
  "Wildcard" => TermDefinition.new("Wildcard", id: "http://www.w3.org/ns/shex#Wildcard", simple: true),
29
- "annotation" => TermDefinition.new("annotation", id: "http://www.w3.org/ns/shex#annotation", type_mapping: "@id"),
30
- "annotations" => TermDefinition.new("annotations", id: "http://www.w3.org/ns/shex#annotation", type_mapping: "@id"),
29
+ "annotations" => TermDefinition.new("annotations", id: "http://www.w3.org/ns/shex#annotation", type_mapping: "@id", container_mapping: "@list"),
31
30
  "bnode" => TermDefinition.new("bnode", id: "http://www.w3.org/ns/shex#bnode", simple: true),
32
31
  "closed" => TermDefinition.new("closed", id: "http://www.w3.org/ns/shex#closed", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
33
32
  "code" => TermDefinition.new("code", id: "http://www.w3.org/ns/shex#code"),
34
33
  "datatype" => TermDefinition.new("datatype", id: "http://www.w3.org/ns/shex#datatype", type_mapping: "@id"),
35
- "exclusion" => TermDefinition.new("exclusion", id: "http://www.w3.org/ns/shex#exclusion", type_mapping: "@id"),
36
- "exclusions" => TermDefinition.new("exclusions", id: "http://www.w3.org/ns/shex#exclusion", type_mapping: "@id"),
34
+ "exclusions" => TermDefinition.new("exclusions", id: "http://www.w3.org/ns/shex#exclusion", type_mapping: "@id", container_mapping: "@list"),
37
35
  "expression" => TermDefinition.new("expression", id: "http://www.w3.org/ns/shex#expression", type_mapping: "@id"),
38
36
  "expressions" => TermDefinition.new("expressions", id: "http://www.w3.org/ns/shex#expressions", type_mapping: "@id", container_mapping: "@list"),
39
37
  "extra" => TermDefinition.new("extra", id: "http://www.w3.org/ns/shex#extra", type_mapping: "@id"),
38
+ "flags" => TermDefinition.new("flags", id: "http://www.w3.org/ns/shex#flags"),
40
39
  "fractiondigits" => TermDefinition.new("fractiondigits", id: "http://www.w3.org/ns/shex#fractiondigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
41
40
  "id" => TermDefinition.new("id", id: "@id", simple: true),
42
41
  "inverse" => TermDefinition.new("inverse", id: "http://www.w3.org/ns/shex#inverse", type_mapping: "http://www.w3.org/2001/XMLSchema#boolean"),
@@ -55,7 +54,6 @@ class JSON::LD::Context
55
54
  "name" => TermDefinition.new("name", id: "http://www.w3.org/ns/shex#name", type_mapping: "@id"),
56
55
  "nodeKind" => TermDefinition.new("nodeKind", id: "http://www.w3.org/ns/shex#nodeKind", type_mapping: "@vocab"),
57
56
  "nonliteral" => TermDefinition.new("nonliteral", id: "http://www.w3.org/ns/shex#nonliteral", simple: true),
58
- "numericFacet" => TermDefinition.new("numericFacet", id: "http://www.w3.org/ns/shex#numericFacet"),
59
57
  "object" => TermDefinition.new("object", id: "http://www.w3.org/ns/shex#object", type_mapping: "@id"),
60
58
  "pattern" => TermDefinition.new("pattern", id: "http://www.w3.org/ns/shex#pattern"),
61
59
  "predicate" => TermDefinition.new("predicate", id: "http://www.w3.org/ns/shex#predicate", type_mapping: "@id"),
@@ -68,15 +66,12 @@ class JSON::LD::Context
68
66
  "shex" => TermDefinition.new("shex", id: "http://www.w3.org/ns/shex#", simple: true),
69
67
  "start" => TermDefinition.new("start", id: "http://www.w3.org/ns/shex#start", type_mapping: "@id"),
70
68
  "startActs" => TermDefinition.new("startActs", id: "http://www.w3.org/ns/shex#startActs", type_mapping: "@id", container_mapping: "@list"),
71
- "stem" => TermDefinition.new("stem", id: "http://www.w3.org/ns/shex#stem", type_mapping: "http://www.w3.org/2001/XMLSchema#anyUri"),
72
- "stringFacet" => TermDefinition.new("stringFacet", id: "http://www.w3.org/ns/shex#stringFacet"),
69
+ "stem" => TermDefinition.new("stem", id: "http://www.w3.org/ns/shex#stem", type_mapping: "http://www.w3.org/2001/XMLSchema#string"),
73
70
  "totaldigits" => TermDefinition.new("totaldigits", id: "http://www.w3.org/ns/shex#totaldigits", type_mapping: "http://www.w3.org/2001/XMLSchema#integer"),
74
71
  "type" => TermDefinition.new("type", id: "@type", simple: true),
75
- "uri" => TermDefinition.new("uri", id: "@id", simple: true),
76
72
  "value" => TermDefinition.new("value", id: "@value", simple: true),
77
73
  "valueExpr" => TermDefinition.new("valueExpr", id: "http://www.w3.org/ns/shex#valueExpr", type_mapping: "@id"),
78
74
  "values" => TermDefinition.new("values", id: "http://www.w3.org/ns/shex#values", type_mapping: "@id", container_mapping: "@list"),
79
- "xsFacet" => TermDefinition.new("xsFacet", id: "http://www.w3.org/ns/shex#xsFacet"),
80
75
  "xsd" => TermDefinition.new("xsd", id: "http://www.w3.org/2001/XMLSchema#", simple: true)
81
76
  })
82
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregg Kellogg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-30 00:00:00.000000000 Z
11
+ date: 2017-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdf
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
47
+ version: '2.1'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.0'
54
+ version: '2.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ebnf
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,70 +86,70 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '2.0'
89
+ version: '2.2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '2.0'
96
+ version: '2.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sparql
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.0'
103
+ version: '2.2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '2.0'
110
+ version: '2.2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rdf-spec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '2.0'
117
+ version: '2.2'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '2.0'
124
+ version: '2.2'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rdf-turtle
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '2.0'
131
+ version: '2.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '2.0'
138
+ version: '2.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '3.5'
145
+ version: '3.6'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '3.5'
152
+ version: '3.6'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rspec-its
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -196,6 +196,7 @@ files:
196
196
  - lib/shex/algebra/annotation.rb
197
197
  - lib/shex/algebra/each_of.rb
198
198
  - lib/shex/algebra/external.rb
199
+ - lib/shex/algebra/language.rb
199
200
  - lib/shex/algebra/node_constraint.rb
200
201
  - lib/shex/algebra/not.rb
201
202
  - lib/shex/algebra/one_of.rb
@@ -213,6 +214,7 @@ files:
213
214
  - lib/shex/algebra/value.rb
214
215
  - lib/shex/extensions/extension.rb
215
216
  - lib/shex/extensions/test.rb
217
+ - lib/shex/format.rb
216
218
  - lib/shex/meta.rb
217
219
  - lib/shex/parser.rb
218
220
  - lib/shex/shex_context.rb
@@ -239,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
239
241
  version: '0'
240
242
  requirements: []
241
243
  rubyforge_project: rdf
242
- rubygems_version: 2.6.8
244
+ rubygems_version: 2.6.12
243
245
  signing_key:
244
246
  specification_version: 4
245
247
  summary: Implementation of Shape Expressions (ShEx) for RDF.rb