Class: RDF::Query::Pattern

Inherits:
Object show all
Defined in:
lib/sparql/algebra/extensions.rb

Instance Method Summary collapse

Instance Method Details

#executable?Boolean

Returns true as this is executable.

Returns:

  • (Boolean)

    true



571
# File 'lib/sparql/algebra/extensions.rb', line 571

def executable?; true; end

#ndvarsArray<RDF::Query::Variable>

Return the non-destinguished variables contained within this pattern



556
557
558
# File 'lib/sparql/algebra/extensions.rb', line 556

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

#to_sxp(prefixes: nil, base_uri: nil) ⇒ String

Returns an S-Expression (SXP) representation

Parameters:

  • prefixes (Hash{Symbol => RDF::URI}) (defaults to: nil)

    (nil)

  • base_uri (RDF::URI) (defaults to: nil)

    (nil)

Returns:

  • (String)


579
580
581
# File 'lib/sparql/algebra/extensions.rb', line 579

def to_sxp(prefixes: nil, base_uri: nil)
  to_sxp_bin.to_sxp(prefixes: prefixes, base_uri: base_uri)
end

#varsArray<RDF::Query::Variable>

Return the variables contained within this pattern



563
564
565
# File 'lib/sparql/algebra/extensions.rb', line 563

def vars
  variables.values
end