class SPARQL::Algebra::Operator::IsBlank
The SPARQL
`isBlank` operator.
@example
(prefix ((xsd: <http://www.w3.org/2001/XMLSchema#>) (: <http://example.org/things#>)) (project (?x ?v) (filter (isBlank ?v) (bgp (triple ?x :p ?v)))))
Constants
- NAME
Public Instance Methods
apply(term, **options)
click to toggle source
Returns `true` if the operand is an `RDF::Node`, `false` otherwise.
@param [RDF::Term] term
an RDF term
@return [RDF::Literal::Boolean] `true` or `false` @raise [TypeError] if the operand is not an RDF
term
# File lib/sparql/algebra/operator/is_blank.rb, line 26 def apply(term, **options) case term when RDF::Node then RDF::Literal::TRUE when RDF::Term then RDF::Literal::FALSE else raise TypeError, "expected an RDF::Term, but got #{term.inspect}" end end