Class: ShEx::Algebra::LiteralStem
- Inherits:
-
Stem
- Object
- Operator
- Operator::Unary
- Stem
- ShEx::Algebra::LiteralStem
- Defined in:
- lib/shex/algebra/stem.rb
Constant Summary collapse
- NAME =
:literalStem
Constants inherited from Operator::Unary
Constants inherited from Operator
Instance Attribute Summary
Attributes inherited from Operator
#id, #logger, #operands, #options, #schema
Instance Method Summary collapse
-
#match?(value, depth: 0) ⇒ Boolean
For a node n and constraint value v, nodeSatisfies(n, v) if n matches some valueSetValue vsv in v.
Methods inherited from Stem
Methods inherited from Operator::Unary
Methods inherited from Operator
#base_uri, #closed?, #dup, #each_descendant, #eql?, #expression, #expressions, #find, #focus, #focus=, from_shexj, #initialize, #inspect, #iri, iri, #json_type, #matched, #matched=, #message, #message=, #not_matched, #not_satisfied, #operand, #parent, #parent=, #references, #satisfied, #satisfied=, #satisfy, #semact?, #semantic_actions, #serialize_value, #status, #structure_error, #to_h, #to_json, #to_sxp, #to_sxp_bin, #triple_expression?, #unmatched, #unmatched=, #unsatisfied, #unsatisfied=, #validate!, #value, value
Constructor Details
This class inherits a constructor from ShEx::Algebra::Operator::Unary
Instance Method Details
#match?(value, depth: 0) ⇒ Boolean
For a node n and constraint value v, nodeSatisfies(n, v) if n matches some valueSetValue vsv in v. A term matches a valueSetValue if:
-
vsv is a Stem with stem st and nodeIn(n, st).
55 56 57 58 59 60 61 62 |
# File 'lib/shex/algebra/stem.rb', line 55 def match?(value, depth: 0) if value.literal? super else status "not matched #{value.inspect} if wrong type", depth: depth false end end |