Module org.apache.jena.text
Class DatasetGraphTextMonitor
java.lang.Object
org.apache.jena.sparql.core.DatasetGraphWrapper
org.apache.jena.query.text.changes.DatasetGraphTextMonitor
- All Implemented Interfaces:
org.apache.jena.atlas.lib.Closeable
,org.apache.jena.atlas.lib.Sync
,DatasetGraph
,Transactional
- Direct Known Subclasses:
DatasetGraphText
Connect a DatasetGraph to a DatasetChanges monitor.
Any add or delete to the DatasetGraph is notified to the
monitoring object with a
TextQuadAction
to indicate
the change made.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.sparql.core.Transactional
Transactional.Promote
-
Constructor Summary
ConstructorsConstructorDescriptionDatasetGraphTextMonitor
(DatasetGraph dsg, TextDatasetChanges monitor) Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads).DatasetGraphTextMonitor
(DatasetGraph dsg, TextDatasetChanges monitor, boolean recordOnlyIfRealChange) Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads). -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
void
void
Return the monitorReturn the monitored DatasetGraphvoid
removeGraph
(Node gn) void
sync()
Methods inherited from class org.apache.jena.sparql.core.DatasetGraphWrapper
abort, begin, begin, begin, clear, close, commit, contains, contains, containsGraph, end, find, find, find, findNG, getBase, getBaseForQuery, getContext, getLock, getUnionGraph, getWrapped, isEmpty, isInTransaction, listGraphNodes, prefixes, promote, promote, setDefaultGraph, size, supportsTransactionAbort, supportsTransactions, toString, transactionMode, transactionType, unwrap
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.jena.sparql.core.DatasetGraph
addAll, stream, stream
Methods inherited from interface org.apache.jena.sparql.core.Transactional
calc, calculate, calculateRead, calculateWrite, exec, execute, executeRead, executeWrite
-
Constructor Details
-
DatasetGraphTextMonitor
Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads). Use this DatasetGraph for all operations in order to record changes. Note whether additions of deletions cause an actual change to the dataset or not.- Parameters:
dsg
- The DatasetGraph to monitormonitor
- The handler for a change- See Also:
-
DatasetGraphTextMonitor
public DatasetGraphTextMonitor(DatasetGraph dsg, TextDatasetChanges monitor, boolean recordOnlyIfRealChange) Create a DatasetGraph wrapper that monitors the dataset for changes (add or delete quads). Use this DatasetGraph for all operations in order to record changes.- Parameters:
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.- See Also:
-
-
Method Details
-
getMonitor
Return the monitor -
monitored
Return the monitored DatasetGraph -
add
- Specified by:
add
in interfaceDatasetGraph
- Overrides:
add
in classDatasetGraphWrapper
-
add
- Specified by:
add
in interfaceDatasetGraph
- Overrides:
add
in classDatasetGraphWrapper
-
delete
- Specified by:
delete
in interfaceDatasetGraph
- Overrides:
delete
in classDatasetGraphWrapper
-
delete
- Specified by:
delete
in interfaceDatasetGraph
- Overrides:
delete
in classDatasetGraphWrapper
-
deleteAny
- Specified by:
deleteAny
in interfaceDatasetGraph
- Overrides:
deleteAny
in classDatasetGraphWrapper
-
addGraph
- Specified by:
addGraph
in interfaceDatasetGraph
- Overrides:
addGraph
in classDatasetGraphWrapper
-
removeGraph
- Specified by:
removeGraph
in interfaceDatasetGraph
- Overrides:
removeGraph
in classDatasetGraphWrapper
-
sync
public void sync()- Specified by:
sync
in interfaceorg.apache.jena.atlas.lib.Sync
- Overrides:
sync
in classDatasetGraphWrapper
-
getDefaultGraph
- Specified by:
getDefaultGraph
in interfaceDatasetGraph
- Overrides:
getDefaultGraph
in classDatasetGraphWrapper
-
getGraph
- Specified by:
getGraph
in interfaceDatasetGraph
- Overrides:
getGraph
in classDatasetGraphWrapper
-