Options
All
  • Public
  • Public/Protected
  • All
Menu

Parses an N3 Patch document and makes sure it conforms to the specification requirements. Requirements can be found at Solid Protocol, ยง5.3.1: https://solid.github.io/specification/protocol#n3-patch

Hierarchy

Index

Constructors

Methods

  • findQuads(store: Store<Quad, Quad, Quad, Quad>, subject: Quad_Subject, predicate: NamedNode<string>): Quad[]
  • Finds all quads in a where/deletes/inserts formula. The returned quads will be updated so their graph is the default graph instead of the N3 reference to the formula. Will error in case there are multiple instances of the subject/predicate combination.

    Parameters

    • store: Store<Quad, Quad, Quad, Quad>
    • subject: Quad_Subject
    • predicate: NamedNode<string>

    Returns Quad[]

  • findVariables(quads: Quad[]): Set<string>
  • parsePatch(patch: Quad_Subject, store: Store<Quad, Quad, Quad, Quad>): { conditions: Quad[]; deletes: Quad[]; inserts: Quad[] }
  • Extracts the deletes/inserts/conditions from a solid:InsertDeletePatch entry.

    Parameters

    • patch: Quad_Subject
    • store: Store<Quad, Quad, Quad, Quad>

    Returns { conditions: Quad[]; deletes: Quad[]; inserts: Quad[] }

    • conditions: Quad[]
    • deletes: Quad[]
    • inserts: Quad[]
  • verifyQuads(otherQuads: Quad[], conditionVars: Set<string>): void
  • Verifies if the delete/insert triples conform to the specification requirements:

    • They should not contain blank nodes.
    • They should not contain variables that do not occur in the conditions.

    Parameters

    • otherQuads: Quad[]
    • conditionVars: Set<string>

    Returns void