Module: LD::Patch

Defined in:
vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/format.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/parser.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/algebra.rb,
vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch/terminals.rb

Overview

LD::Patch is a Linked Data Patch extension for RDF.rb.

Author:

Defined Under Namespace

Modules: Algebra, Meta, Terminals, VERSION Classes: Error, Format, ParseError, Parser

Class Method Summary collapse

Class Method Details

.parse(input, **options) ⇒ SPARQL::Algebra::Operator

Parse the given LD Patch input string.

Examples:

query = LD::Patch.parse("Add { <http://example.org/s2> <http://example.org/p2> <http://example.org/o2> } .")

Parameters:

Options Hash (**options):

  • :base_uri (#to_s) — default: nil

    the base URI to use when resolving relative URIs

  • :base_uri (#to_s) — default: nil

    the base URI to use when resolving relative URIs

  • :anon_base (#to_s) — default: "b0"

    Basis for generating anonymous Nodes

  • :resolve_iris (Boolean) — default: false

    Resolve prefix and relative IRIs, otherwise, when serializing the parsed SSE as S-Expressions, use the original prefixed and relative URIs along with base and prefix definitions.

  • :validate (Boolean) — default: false

    whether to validate the parsed statements and values

  • :errors (Array)

    array for placing errors found when parsing

  • :warnings (Array)

    array for placing warnings found when parsing

  • :progress (Boolean)

    Show progress of parser productions

  • :debug (Boolean)

    Detailed debug output

Returns:



31
32
33
# File 'vendor/bundler/ruby/3.3.0/bundler/gems/ld-patch-a8edc852261e/lib/ld/patch.rb', line 31

def self.parse(input, **options)
  LD::Patch::Parser.new(input, **options).parse
end