java.lang.Object
org.apache.jena.rdfpatch.RDFPatchOps
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyChange(Graph graph, InputStream input) Apply changes from a text format input stream to aGraphstatic voidapplyChange(Graph graph, RDFPatch patch) static voidapplyChange(DatasetGraph dsg, InputStream input) Apply changes from a text format input stream to aDatasetGraphstatic voidapplyChange(DatasetGraph dsg, RDFPatch patch) Apply changes from aRDFPatchto aDatasetGraphstatic RDFPatchbuild(Consumer<RDFChangesCollector> filler) Build a patch.static Graphchanges(Graph graphBase, RDFChanges changes) Create aGraphthat sends changes to aRDFChangesstreamstatic DatasetGraphchanges(DatasetGraph dsgBase, RDFChanges changes) Create aDatasetGraphthat sends changes to aRDFChangesstreamstatic RDFChangesAnRDFChangesthat prints debug information toSystem.out.static RDFPatchMake sure a patch has been read from its input.static RDFPatchAn immutable "empty" patch - a single transaction of no changes.static RDFPatchfileToPatch(String filename) Read anRDFPatchfrom a file.static PatchHeadermakeHeader(Node id, Node prev) Match a patch header with the given id and prev.static RDFPatchA immutable "nullop" patch - no transaction, no id.static RDFPatchRDF data file to patch.static RDFPatchread(InputStream input) Read anRDFPatchfrom a file in text format ThrowsPatchExceptionon patch parse error.static RDFPatchread(InputStream input, ErrorHandler errorHandler) static RDFPatchRead anRDFPatchfrom a file.static RDFPatchreadBinary(InputStream input) Read anRDFPatchfrom an input stream in binary format.static RDFPatchreadBinary(String filename) Read anRDFPatchfrom a file.static PatchHeaderreadHeader(InputStream input) Read anRDFPatchheader.static Stringstatic PatchSummaryCreate a brief summary of a patch.static RDFChangesWriterTexttextWriter(OutputStream output) AnRDFChangesthat prints RDFPatch syntax to anOutputStreamin text format.static GraphtextWriter(Graph graph, OutputStream out) Create aGraphthat writes changes to anOutputStreamin text format.static DatasetGraphtextWriter(DatasetGraph dsgBase, OutputStream out) Create aDatasetGraphthat writes changes to anOutputStreamin text format.static RDFPatchwithHeader(PatchHeader header, RDFPatch body) Create a patch with the header and body as given in the arguments, ignoring any header in the body patch.static RDFPatchwithHeader(RDFPatch body, Node id, Node prev) Create a patch with the id and prev as as given in the arguments, ignoring any header in the body patch.static RDFPatchCreate a patch with a specified "prev".static RDFPatchCreate a patch with body from "patch" and previous set to the id of "prevPatch".static StreamRDFwrite(OutputStream out) static voidwrite(OutputStream out, RDFPatch patch) Write aRDFPatchin text formatstatic voidwriteBinary(OutputStream out, Consumer<StreamRDF> action) Provide anStreamRDFthat will output in RDFPatch binary format.static voidwriteBinary(OutputStream out, RDFPatch patch) Write aRDFPatchin binary format
-
Field Details
-
namespace
-
-
Constructor Details
-
RDFPatchOps
public RDFPatchOps()
-
-
Method Details
-
fileToPatch
Read anRDFPatchfrom a file. -
nullPatch
A immutable "nullop" patch - no transaction, no id. -
emptyPatch
An immutable "empty" patch - a single transaction of no changes. Each call generates a new empty patch with a different id. -
summary
Create a brief summary of a patch.This function plays the patch.
-
collect
Make sure a patch has been read from its input. The returnedRDFPatchis not connected to an external resource like anInputStream. -
build
Build a patch. -
rdf2patch
RDF data file to patch. The patch has no Id or Previous - seewithHeader(org.apache.jena.rdfpatch.RDFPatch, org.apache.jena.graph.Node, org.apache.jena.graph.Node). -
withPrev
Create a patch with a specified "prev". -
withPrev
Create a patch with body from "patch" and previous set to the id of "prevPatch". -
withHeader
Create a patch with the id and prev as as given in the arguments, ignoring any header in the body patch. -
withHeader
Create a patch with the header and body as given in the arguments, ignoring any header in the body patch. -
makeHeader
Match a patch header with the given id and prev. Prev may be null. -
read
Read anRDFPatchfrom a file in text format ThrowsPatchExceptionon patch parse error. -
read
-
read
Read anRDFPatchfrom a file. -
readBinary
Read anRDFPatchfrom an input stream in binary format. -
readBinary
Read anRDFPatchfrom a file. -
readHeader
Read anRDFPatchheader. -
applyChange
Apply changes from aRDFPatchto aDatasetGraph -
applyChange
Apply changes from a text format input stream to aDatasetGraph -
applyChange
-
applyChange
Apply changes from a text format input stream to aGraph -
changes
Create aDatasetGraphthat sends changes to aRDFChangesstream -
changesPrinter
AnRDFChangesthat prints debug information toSystem.out. Output is for debugging - it is not legal text patch syntax. -
textWriter
AnRDFChangesthat prints RDFPatch syntax to anOutputStreamin text format. The application must callRDFChanges.startandRDFChanges.finish. -
changes
Create aGraphthat sends changes to aRDFChangesstream -
textWriter
Create aDatasetGraphthat writes changes to anOutputStreamin text format. The caller is responsible for closing theOutputStream. -
textWriter
Create aGraphthat writes changes to anOutputStreamin text format. The caller is responsible for closing theOutputStream. -
write
Write aRDFPatchin text format -
writeBinary
Write aRDFPatchin binary format -
write
Write anStreamRDFout inRDFPatchtext format.StreamRDF.start()andStreamRDF.finish()must be called; these bracket the patch in transaction markersTXandTC. -
writeBinary
Provide anStreamRDFthat will output in RDFPatch binary format.StreamRDF.start()andStreamRDF.finish()must be called; these bracket the patch in transaction markersTXandTC. -
str
-