module ShEx::Algebra ## class OneOf < Operator include TripleExpression NAME = :oneOf ## # `expr` is a OneOf and there is some shape expression `se2` in shapeExprs such that a `matches(T, se2, m)`... # # @param [Array] t # @return [Array e log_recover("oneOf: ignore error: #{e.message}", depth: options.fetch(:depth, 0)) false end end break unless matched_something num_iters += 1 status "matched #{results.length} statements after #{num_iters} iterations" end # Max violations handled in Shape not_matched "Minimum Cardinality Violation: #{num_iters} < #{minimum}" if num_iters < minimum # Last, evaluate semantic acts semantic_actions.all? do |op| op.satisfies?(results) end unless results.empty? status "one of satisfied" results end end end