Class: SPARQL::Algebra::Operator::Graph

Inherits:
Binary show all
Defined in:
lib/sparql/algebra/operator/graph.rb

Overview

The SPARQL GraphPattern graph operator.

This is a wrapper to add a context to the query.

Examples:

(prefix ((: <http://example/>))
  (graph ?g
    (bgp (triple ?s ?p ?o))))

See Also:

Constant Summary

NAME =
[:graph]

Constants inherited from Binary

Binary::ARITY

Constants inherited from SPARQL::Algebra::Operator

ARITY

Instance Attribute Summary

Attributes inherited from SPARQL::Algebra::Operator

#operands, #options

Class Method Summary collapse

Methods inherited from Binary

#initialize

Methods inherited from SPARQL::Algebra::Operator

arity, #base_uri, base_uri, base_uri=, #boolean, #constant?, #eql?, #evaluatable?, evaluate, #executable?, for, #initialize, #inspect, #operand, #optimize, #prefixes, prefixes, prefixes=, #to_sse, #to_sxp, #variable?

Methods included from Evaluatable

#apply, #evaluate, #memoize

Methods included from Expression

cast, #constant?, #evaluate, for, open, #optimize, parse, #to_sse, #variable?

Constructor Details

This class inherits a constructor from SPARQL::Algebra::Operator::Binary

Class Method Details

.new(context, bgp) ⇒ RDF::Query

A graph is an RDF::Query with a context.

Parameters:

Returns:



22
23
24
25
# File 'lib/sparql/algebra/operator/graph.rb', line 22

def self.new(context, bgp)
  bgp.context = context
  bgp
end