java.lang.Object
org.apache.jena.rdfpatch.text.RDFChangesWriterText
- All Implemented Interfaces:
AutoCloseable
,RDFChanges
- Direct Known Subclasses:
RDFChangesManagedOutput
Write out a changes as a stream of syntax tokens.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
Add a prefix.void
close()
static RDFChangesWriterText
create
(OutputStream out) Create aRDFChangesWriter
with standard text output.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()
Finish processing.void
Header field.void
segment()
Segment marker.void
start()
Start processing.void
txnAbort()
Indicator that a transaction abortsvoid
txnBegin()
Indicator that a transaction begins, or becomes a write transaction.void
Indicator that a transaction commits.
-
Constructor Details
-
RDFChangesWriterText
-
-
Method Details
-
create
Create aRDFChangesWriter
with standard text output. -
start
public void start()Description copied from interface:RDFChanges
Start processing. The exact meaning is implementation dependent. This should be paired with aRDFChanges.finish()
.- Specified by:
start
in interfaceRDFChanges
-
finish
public void finish()Description copied from interface:RDFChanges
Finish processing. The exact meaning is implementation dependent. This should be paired with aRDFChanges.start()
.- Specified by:
finish
in interfaceRDFChanges
-
header
Description copied from interface:RDFChanges
Header field. Headers are metadata about the changes being made.- Specified by:
header
in interfaceRDFChanges
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
add
public 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) Description copied from interface:RDFChanges
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 withQuad.isDefaultGraph(Node)
.It is not defined whether the add happens before or after this notification all.
- Specified by:
add
in interfaceRDFChanges
-
delete
public 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) Description copied from interface:RDFChanges
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 withQuad.isDefaultGraph(Node)
.It is not defined whether the delete happens before or after this notification all.
- Specified by:
delete
in interfaceRDFChanges
-
addPrefix
Description copied from interface:RDFChanges
Add a prefix. The graph name follows the same rules asRDFChanges.add(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node)
.- Specified by:
addPrefix
in interfaceRDFChanges
-
deletePrefix
Description copied from interface:RDFChanges
Delete a prefix. The graph name follows the same rules asRDFChanges.add(org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node, org.apache.jena.graph.Node)
.- Specified by:
deletePrefix
in interfaceRDFChanges
-
txnBegin
public void txnBegin()Description copied from interface:RDFChanges
Indicator that a transaction begins, or becomes a write transaction.- Specified by:
txnBegin
in interfaceRDFChanges
-
txnCommit
public void txnCommit()Description copied from interface:RDFChanges
Indicator that a transaction commits. If this throws an exception, the transaction will be aborted locally and not commit after all.- Specified by:
txnCommit
in interfaceRDFChanges
-
txnAbort
public void txnAbort()Description copied from interface:RDFChanges
Indicator that a transaction aborts- Specified by:
txnAbort
in interfaceRDFChanges
-
segment
public void segment()Description copied from interface:RDFChanges
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.- Specified by:
segment
in interfaceRDFChanges
-