Class: ShEx::Algebra::Not

Inherits:
Operator::Unary show all
Includes:
Satisfiable
Defined in:
lib/shex/algebra/not.rb

Constant Summary collapse

NAME =
:not

Constants inherited from Operator::Unary

Operator::Unary::ARITY

Constants inherited from Operator

Operator::ARITY

Instance Attribute Summary

Attributes inherited from Operator

#operands, #options, #schema

Instance Method Summary collapse

Methods included from Satisfiable

#not_satisfies?, #satisfiable?, #triple_expressions

Methods inherited from Operator::Unary

#initialize

Methods inherited from Operator

#closed?, #each_descendant, #eql?, #first_ancestor, #initialize, #inspect, #not_matched, #not_satisfied, #operand, #parent, #parent=, #satisfiable?, #semact?, #semantic_actions, #status, #structure_error, #to_sxp, #to_sxp_bin, #triple_expression?, #validate!

Constructor Details

This class inherits a constructor from ShEx::Algebra::Operator::Unary

Instance Method Details

#satisfies?(n) ⇒ Boolean

S is a ShapeNot and for the shape expression se2 at shapeExpr, notSatisfies(n, se2, G, m).

Parameters:

  • n (RDF::Resource)

Returns:

  • (Boolean)

    ‘true` when satisfied, meaning that the operand was not satisfied

Raises:



12
13
14
15
16
17
# File 'lib/shex/algebra/not.rb', line 12

def satisfies?(n)
  status ""
  operands.last.not_satisfies?(n)
  status "not satisfied"
  true
end