Interface RDFChanges

All Known Implementing Classes:
RDFChangesApply, RDFChangesApplyGraph, RDFChangesBase, RDFChangesCollector, RDFChangesCounter, RDFChangesExternalTxn, RDFChangesLog, RDFChangesLogSummary, RDFChangesManagedOutput, RDFChangesN, RDFChangesNoOp, RDFChangesOnStartFinish, RDFChangesSuppressEmpty, RDFChangesWrapper, RDFChangesWriterBinary, RDFChangesWriterText, RDFChangesWriteUpdate

public interface RDFChanges
Interface for a stream of changes to to an RDF Dataset, or RDF Graph. For an RDF graph, the "graph name" will be null.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Notification that a quad or triple is added.
    void
    addPrefix(org.apache.jena.graph.Node gn, String prefix, String uriStr)
    Add a prefix.
    void
    delete(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
    Notification that a quad or triple is deleted.
    void
    deletePrefix(org.apache.jena.graph.Node gn, String prefix)
    Delete a prefix.
    void
    Finish processing.
    void
    header(String field, org.apache.jena.graph.Node value)
    Header field.
    void
    Segment marker.
    void
    Start processing.
    void
    Indicator that a transaction aborts
    void
    Indicator that a transaction begins, or becomes a write transaction.
    void
    Indicator that a transaction commits.
  • Method Details

    • header

      void header(String field, org.apache.jena.graph.Node value)
      Header field. Headers are metadata about the changes being made.
    • add

      void add(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Notification that a quad or triple is added. A stream of Triples outside a dataset will have null for the graph name. Inside an RDF Dataset, it may be more natural to use "urn:x-arq:DefaultGraph" or "urn:x-arq:DefaultGraphNode" in which case test with Quad.isDefaultGraph(Node).

      It is not defined whether the add happens before or after this notification all.

    • delete

      void delete(org.apache.jena.graph.Node g, org.apache.jena.graph.Node s, org.apache.jena.graph.Node p, org.apache.jena.graph.Node o)
      Notification that a quad or triple is deleted. A stream of Triples outside a dataset will have null for the graph name. Inside an RDF Dataset, it may be more natural to use "urn:x-arq:DefaultGraph" or "urn:x-arq:DefaultGraphNode" in which case test with Quad.isDefaultGraph(Node).

      It is not defined whether the delete happens before or after this notification all.

    • addPrefix

      void addPrefix(org.apache.jena.graph.Node gn, String prefix, String uriStr)
    • deletePrefix

      void deletePrefix(org.apache.jena.graph.Node gn, String prefix)
    • txnBegin

      void txnBegin()
      Indicator that a transaction begins, or becomes a write transaction.
    • txnCommit

      void txnCommit()
      Indicator that a transaction commits. If this throws an exception, the transaction will be aborted locally and not commit after all.
    • txnAbort

      void txnAbort()
      Indicator that a transaction aborts
    • segment

      void segment()
      Segment marker.

      A segment is a number of transactions; the grouping rationale is not defined by RDF Patch.

      It might be used to indicate a logical collection of change transactions in a long stream of transactions.

      There is no guarantee it will be used.

      Segments must contain complete transactions.
      Segments must not span start-finish pairs.

    • start

      void start()
      Start processing. The exact meaning is implementation dependent. This should be paired with a finish().
    • finish

      void finish()
      Finish processing. The exact meaning is implementation dependent. This should be paired with a start().