Skip to content

Check n3-patch implementation with solid-protocl v0.9 #1645

@bourgeoa

Description

@bourgeoa

a solid:InsertDeletePatch has been added
How to keep compatibility. ?

https://solidproject.org/TR/2021/protocol-20211217#writing-resource

EXAMPLE: Applying an N3 patch.

@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix ex: <http://www.example.org/terms#>.

_:rename a solid:InsertDeletePatch;
  solid:where   { ?person ex:familyName "Garcia". };
  solid:inserts { ?person ex:givenName "Alex". };
  solid:deletes { ?person ex:givenName "Claudia". }.
This N3 Patch instructs to rename Claudia Garcia into Alex Garcia, on the condition that no other Garcia family members are present in the target RDF document.

The NSS implementation is :

'text/n3' patchContent can use inserts, deletes and where. N3 notation is a turtle content with graph objects.
    @prefix solid: <http://www.w3.org/ns/solid/terms#>.
    @prefix : <#>.
    @prefix ex: <http://example.com#>.
    <> solid:patches <fileUrl>;
          solid:deletes { <> a :test. };
          solid:inserts { <#new> ex:temp :321; ex:temp1 :200, :300. }.

if triples <#new> ex:temp1 :250 exists. The solid:inserts clause can be expressed as :

          solid:where { ?a ex:temp1 :250. };
          solid:inserts { ?a ex:temp :321; ex:temp1 :200, :300. }.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions