class RDF::N3::Algebra::Log::EqualTo
True if the subject and object are the same RDF
node (symbol or literal). Do not confuse with owl:sameAs. A cwm built-in logical operator, RDF
graph level.
Constants
- NAME
- URI
Public Instance Methods
apply(left, right)
click to toggle source
@param [RDF::Literal] left
a literal
@param [RDF::Literal] right
a literal
@return [RDF::Literal::Boolean]
# File lib/rdf/n3/algebra/log/equal_to.rb, line 30 def apply(left, right) RDF::Literal(left.sameTerm?(right)) end
input_operand()
click to toggle source
Both subject and object are inputs.
# File lib/rdf/n3/algebra/log/equal_to.rb, line 20 def input_operand RDF::N3::List.new(values: operands) end
resolve(resource, position:)
click to toggle source
Resolves inputs as terms.
@param [RDF::Term] resource @param [:subject, :object] position @return [RDF::Literal] @see RDF::N3::ResourceOperator#evaluate
# File lib/rdf/n3/algebra/log/equal_to.rb, line 15 def resolve(resource, position:) resource if resource.term? end