module SPARQL::Client::Update
Public Class Methods
Clear
the graph
@example CLEAR GRAPH <example.org/data.rdf>
clear.graph(RDF::URI(http://example.org/data.rdf)) clear(:graph, RDF::URI(http://example.org/data.rdf))
@example CLEAR DEFAULT
clear.default clear(:default)
@example CLEAR NAMED
clear.named clear(:named)
@example CLEAR ALL
clear.all clear(:all)
@example CLEAR SILENT ALL
clear.all.silent clear(:all, silent: true)
@param (see Clear#initialize)
# File lib/sparql/client/update.rb, line 84 def self.clear(*arguments, **options) Clear.new(*arguments, **options) end
Create
a graph
@example CREATE GRAPH <example.org/data.rdf>
create(RDF::URI(http://example.org/data.rdf))
@example CREATE SILENT GRAPH <example.org/data.rdf>
create(RDF::URI(http://example.org/data.rdf)).silent create(RDF::URI(http://example.org/data.rdf), silent: true)
@param (see Create#initialize)
# File lib/sparql/client/update.rb, line 99 def self.create(*arguments, **options) Create.new(*arguments, **options) end
Delete statements from the graph
@example DELETE DATA { <example.org/jhacker> <xmlns.com/foaf/0.1/name> "J. Random Hacker" .}
data = RDF::Graph.new do |graph| graph << [RDF::URI('http://example.org/jhacker'), RDF::Vocab::FOAF.name, "J. Random Hacker"] end delete_data(data)
@example DELETE DATA { GRAPH <example.org/> {}}
delete_data(RDF::Graph.new, graph: 'http://example.org/') delete_data(RDF::Graph.new).graph('http://example.org/')
@param (see DeleteData#initialize)
# File lib/sparql/client/update.rb, line 37 def self.delete_data(*arguments, **options) DeleteData.new(*arguments, **options) end
Drop
a graph
@example DROP GRAPH <example.org/data.rdf>
drop.graph(RDF::URI(http://example.org/data.rdf)) drop(:graph, RDF::URI(http://example.org/data.rdf))
@example DROP DEFAULT
drop.default drop(:default)
@example DROP NAMED
drop.named drop(:named)
@example DROP ALL
drop.all drop(:all)
@example DROP ALL SILENT
drop.all.silent drop(:all, silent: true)
@param (see Drop#initialize)
# File lib/sparql/client/update.rb, line 127 def self.drop(*arguments, **options) Drop.new(*arguments, **options) end
Insert statements into the graph
@example INSERT DATA { <example.org/jhacker> <xmlns.com/foaf/0.1/name> "J. Random Hacker" .}
data = RDF::Graph.new do |graph| graph << [RDF::URI('http://example.org/jhacker'), RDF::Vocab::FOAF.name, "J. Random Hacker"] end insert_data(data)
@example INSERT DATA { GRAPH <example.org/> {}}
insert_data(RDF::Graph.new, graph: 'http://example.org/') insert_data(RDF::Graph.new).graph('http://example.org/')
@param (see InsertData#initialize)
# File lib/sparql/client/update.rb, line 19 def self.insert_data(*arguments, **options) InsertData.new(*arguments, **options) end
Load
statements into the graph
@example LOAD <example.org/data.rdf>
load(RDF::URI(http://example.org/data.rdf))
@example LOAD SILENT <example.org/data.rdf>
load(RDF::URI(http://example.org/data.rdf)).silent load(RDF::URI(http://example.org/data.rdf), silent: true)
@example LOAD <example.org/data.rdf> INTO <example.org/data.rdf>
load(RDF::URI(http://example.org/data.rdf)).into(RDF::URI(http://example.org/data.rdf)) load(RDF::URI(http://example.org/data.rdf), into: RDF::URI(http://example.org/data.rdf))
@param (see Load#initialize)
# File lib/sparql/client/update.rb, line 56 def self.load(*arguments, **options) Load.new(*arguments, **options) end