Module: RDF::Term
- Includes:
- SPARQL::Algebra::Expression
- Defined in:
- lib/sparql/algebra/extensions.rb
Overview
Extensions for RDF::Term
.
Constant Summary
Constants included from SPARQL::Algebra::Expression
SPARQL::Algebra::Expression::PATTERN_PARENTS
Instance Method Summary collapse
- #aggregate? ⇒ Boolean
- #evaluate(bindings, **options) ⇒ RDF::Term
-
#ndvars ⇒ Array<RDF::Query::Variable>
Return the non-destinguished variables contained within this operator.
-
#optimize(**options) ⇒ RDF::Term
A duplicate of this term.
-
#to_sparql(**options) ⇒ String
Returns a partial SPARQL grammar for this term.
-
#vars ⇒ Array<RDF::Query::Variable>
Return the variables contained within this operator.
Methods included from SPARQL::Algebra::Expression
cast, #constant?, extension, extension?, extensions, for, #invalid?, new, #node?, open, #optimize!, parse, register_extension, #to_sxp_bin, #valid?, #validate!, #variable?
Instance Method Details
#aggregate? ⇒ Boolean
260 |
# File 'lib/sparql/algebra/extensions.rb', line 260 def aggregate?; false; end |
#evaluate(bindings, **options) ⇒ RDF::Term
256 257 258 |
# File 'lib/sparql/algebra/extensions.rb', line 256 def evaluate(bindings, **) self end |
#ndvars ⇒ Array<RDF::Query::Variable>
Return the non-destinguished variables contained within this operator
265 266 267 |
# File 'lib/sparql/algebra/extensions.rb', line 265 def ndvars vars.reject(&:distinguished?) end |
#optimize(**options) ⇒ RDF::Term
A duplicate of this term.
281 282 283 284 285 |
# File 'lib/sparql/algebra/extensions.rb', line 281 def optimize(**) optimized = self.deep_dup #optimized.lexical = nil if optimized.respond_to?(:lexical=) #optimized end |
#to_sparql(**options) ⇒ String
Returns a partial SPARQL grammar for this term.
292 293 294 |
# File 'lib/sparql/algebra/extensions.rb', line 292 def to_sparql(**) to_sxp(**) end |
#vars ⇒ Array<RDF::Query::Variable>
Return the variables contained within this operator
272 273 274 |
# File 'lib/sparql/algebra/extensions.rb', line 272 def vars variable? ? [self] : [] end |