Module: RDF::Term

Includes:
SPARQL::Algebra::Expression
Defined in:
vendor/bundler/ruby/2.5.0/bundler/gems/sparql-7b34b4cf091a/lib/sparql/algebra/extensions.rb

Overview

Extensions for RDF::Term.

Instance Method Summary collapse

Methods included from SPARQL::Algebra::Expression

cast, #constant?, extension, extensions, for, #invalid?, new, #node?, open, #optimize, parse, register_extension, #to_sxp_bin, #valid?, #validate!, #variable?

Instance Method Details

#aggregate?Boolean

Returns:

  • (Boolean)


198
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-7b34b4cf091a/lib/sparql/algebra/extensions.rb', line 198

def aggregate?; false; end

#evaluate(bindings, options = {}) ⇒ RDF::Term

Parameters:

  • bindings (RDF::Query::Solution)

    a query solution containing zero or more variable bindings

  • options (Hash{Symbol => Object}) (defaults to: {})

    ({}) options passed from query

Returns:



194
195
196
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-7b34b4cf091a/lib/sparql/algebra/extensions.rb', line 194

def evaluate(bindings, options = {})
  self
end

#ndvarsArray<RDF::Query::Variable>

Return the non-destinguished variables contained within this operator



203
204
205
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-7b34b4cf091a/lib/sparql/algebra/extensions.rb', line 203

def ndvars
  vars.reject(&:distinguished?)
end

#varsArray<RDF::Query::Variable>

Return the variables contained within this operator



210
211
212
# File 'vendor/bundler/ruby/2.5.0/bundler/gems/sparql-7b34b4cf091a/lib/sparql/algebra/extensions.rb', line 210

def vars
  variable? ? [self] : []
end