public class DatasetGraphMonitor extends DatasetGraphWrapper
QuadAction
to indicate
the change made.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
|
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() |
clear, close, contains, contains, containsGraph, find, find, find, findNG, getContext, getDefaultGraph, getGraph, getLock, getWrapped, isEmpty, listGraphNodes, setDefaultGraph, size, toString
public DatasetGraphMonitor(DatasetGraph dsg, DatasetChanges monitor)
dsg
- The DatasetGraph to monitormonitor
- The handler for a changeDatasetChanges
,
QuadAction
public DatasetGraphMonitor(DatasetGraph dsg, DatasetChanges monitor, boolean recordOnlyIfRealChange)
dsg
- The DatasetGraph to monitormonitor
- The handler for a changerecordOnlyIfRealChange
- If true, check to see if the chnage 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
,
QuadAction
public DatasetChanges getMonitor()
public DatasetGraph monitored()
public void add(Quad quad)
DatasetGraph
add
in interface DatasetGraph
add
in class DatasetGraphWrapper
public void add(Node g, Node s, Node p, Node o)
DatasetGraph
add
in interface DatasetGraph
add
in class DatasetGraphWrapper
public void delete(Quad quad)
DatasetGraph
delete
in interface DatasetGraph
delete
in class DatasetGraphWrapper
public void delete(Node g, Node s, Node p, Node o)
DatasetGraph
delete
in interface DatasetGraph
delete
in class DatasetGraphWrapper
public void deleteAny(Node g, Node s, Node p, Node o)
DatasetGraph
deleteAny
in interface DatasetGraph
deleteAny
in class DatasetGraphWrapper
public void addGraph(Node gn, Graph g)
DatasetGraph
DatasetGraph.getGraph(com.hp.hpl.jena.graph.Node)
addGraph
in interface DatasetGraph
addGraph
in class DatasetGraphWrapper
public void removeGraph(Node gn)
DatasetGraph
removeGraph
in interface DatasetGraph
removeGraph
in class DatasetGraphWrapper
public void sync()
sync
in interface Sync
sync
in class DatasetGraphWrapper
Licenced under the Apache License, Version 2.0