lib/rdf/ldp/rdf_source.rb in rdf-ldp-0.9.0 vs lib/rdf/ldp/rdf_source.rb in rdf-ldp-0.9.1
- old
+ new
@@ -18,16 +18,16 @@
# the base `#metagraph` updates. `#to_response` is overloaded to return an
# unnamed `RDF::Graph`, to be transformed into an HTTP Body by
# `Rack::LDP::ContentNegotiation`.
#
# @note the contents of `#metagraph`'s are *not* the same as
- # LDP-server-managed triples. `#metagraph` contains internal properties of
- # the RDFSource which are necessary for the server's management purposes,
- # but MAY be absent from (or in conflict with) the representation of its
+ # LDP-server-managed triples. `#metagraph` contains internal properties of
+ # the RDFSource which are necessary for the server's management purposes,
+ # but MAY be absent from (or in conflict with) the representation of its
# state in `#graph`.
#
- # @see http://www.w3.org/TR/ldp/#dfn-linked-data-platform-rdf-source
+ # @see http://www.w3.org/TR/ldp/#dfn-linked-data-platform-rdf-source
# Definition of ldp:RDFSource in the LDP specification
class RDFSource < Resource
class << self
##
# @return [RDF::URI] uri with lexical representation
@@ -197,10 +197,12 @@
rescue LD::Patch::Error => e
raise BadRequest, e.message
end
def sparql_update(input, graph)
- SPARQL.execute(input.read, graph, update: true)
+ SPARQL.execute(input.read, graph,
+ update: true,
+ base_uri: RDF::URI.intern(graph.name))
rescue SPARQL::MalformedQuery => e
raise BadRequest, e.message
end
##