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 TypeMethodDescriptionvoidvoidvoidvoidvoidvoidReturn the monitorReturn the monitored DatasetGraphvoidremoveGraph(Node gn) voidsync()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, unwrapMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.jena.sparql.core.DatasetGraph
addAll, stream, streamMethods 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:
addin interfaceDatasetGraph- Overrides:
addin classDatasetGraphWrapper
-
add
- Specified by:
addin interfaceDatasetGraph- Overrides:
addin classDatasetGraphWrapper
-
delete
- Specified by:
deletein interfaceDatasetGraph- Overrides:
deletein classDatasetGraphWrapper
-
delete
- Specified by:
deletein interfaceDatasetGraph- Overrides:
deletein classDatasetGraphWrapper
-
deleteAny
- Specified by:
deleteAnyin interfaceDatasetGraph- Overrides:
deleteAnyin classDatasetGraphWrapper
-
addGraph
- Specified by:
addGraphin interfaceDatasetGraph- Overrides:
addGraphin classDatasetGraphWrapper
-
removeGraph
- Specified by:
removeGraphin interfaceDatasetGraph- Overrides:
removeGraphin classDatasetGraphWrapper
-
sync
public void sync()- Specified by:
syncin interfaceorg.apache.jena.atlas.lib.Sync- Overrides:
syncin classDatasetGraphWrapper
-
getDefaultGraph
- Specified by:
getDefaultGraphin interfaceDatasetGraph- Overrides:
getDefaultGraphin classDatasetGraphWrapper
-
getGraph
- Specified by:
getGraphin interfaceDatasetGraph- Overrides:
getGraphin classDatasetGraphWrapper
-