public class DatasetGraphMonitor extends DatasetGraphWrapper
QuadAction to indicate
the change made.Transactional.Promote| Constructor and Description |
|---|
DatasetGraphMonitor(DatasetGraph dsg,
DatasetChanges monitor)
Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads).
|
DatasetGraphMonitor(DatasetGraph dsg,
DatasetChanges monitor,
boolean recordOnlyIfRealChange)
Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads).
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(Node g,
Node s,
Node p,
Node o)
Add a quad
|
void |
add(Quad quad)
Add a quad
|
void |
addGraph(Node gn,
Graph g)
Add the given graph to the dataset.
|
void |
delete(Node g,
Node s,
Node p,
Node o)
Delete a quad
|
void |
delete(Quad quad)
Delete a quad
|
void |
deleteAny(Node g,
Node s,
Node p,
Node o)
Delete any quads matching the pattern
|
Graph |
getDefaultGraph()
Get the default graph as a Jena Graph
|
Graph |
getGraph(Node graphNode)
Get the graph named by graphNode : returns null when there is no such graph.
|
DatasetChanges |
getMonitor()
Return the monitor
|
DatasetGraph |
monitored()
Return the monitored DatasetGraph
|
void |
removeGraph(Node gn)
Remove all data associated with the named graph.
|
void |
sync() |
abort, begin, begin, begin, clear, close, commit, contains, contains, containsGraph, end, find, find, find, findNG, getBase, getBaseForQuery, getContext, getLock, getUnionGraph, getWrapped, isEmpty, isInTransaction, listGraphNodes, promote, promote, setDefaultGraph, size, supportsTransactionAbort, supportsTransactions, toString, transactionMode, transactionTypepublic DatasetGraphMonitor(DatasetGraph dsg, DatasetChanges monitor)
dsg - The DatasetGraph to monitormonitor - The handler for a changeDatasetChanges,
QuadActionpublic DatasetGraphMonitor(DatasetGraph dsg, DatasetChanges monitor, boolean recordOnlyIfRealChange)
dsg - The DatasetGraph to monitormonitor - The handler for a changerecordOnlyIfRealChange - If true, check to see if the change would have an effect (e.g. add is a new quad).
If false, log changes as ADD/DELETE regardless of whether the dataset actually changes.DatasetChanges,
QuadActionpublic DatasetChanges getMonitor()
public DatasetGraph monitored()
public void add(Quad quad)
DatasetGraphadd in interface DatasetGraphadd in class DatasetGraphWrapperpublic void add(Node g, Node s, Node p, Node o)
DatasetGraphadd in interface DatasetGraphadd in class DatasetGraphWrapperpublic void delete(Quad quad)
DatasetGraphdelete in interface DatasetGraphdelete in class DatasetGraphWrapperpublic void delete(Node g, Node s, Node p, Node o)
DatasetGraphdelete in interface DatasetGraphdelete in class DatasetGraphWrapperpublic void deleteAny(Node g, Node s, Node p, Node o)
DatasetGraphdeleteAny in interface DatasetGraphdeleteAny in class DatasetGraphWrapperpublic void addGraph(Node gn, Graph g)
DatasetGraphDatasetGraph.getGraph(org.apache.jena.graph.Node)addGraph in interface DatasetGraphaddGraph in class DatasetGraphWrapperpublic void removeGraph(Node gn)
DatasetGraphremoveGraph in interface DatasetGraphremoveGraph in class DatasetGraphWrapperpublic void sync()
sync in interface org.apache.jena.atlas.lib.Syncsync in class DatasetGraphWrapperpublic Graph getDefaultGraph()
DatasetGraphgetDefaultGraph in interface DatasetGraphgetDefaultGraph in class DatasetGraphWrapperpublic Graph getGraph(Node graphNode)
DatasetGraphgetGraph in interface DatasetGraphgetGraph in class DatasetGraphWrapperLicenced under the Apache License, Version 2.0