java.lang.Object
org.apache.jena.enhanced.EnhGraph
org.apache.jena.rdf.model.impl.ModelCom
org.apache.jena.util.MonitorModel
- All Implemented Interfaces:
Model
,ModelCon
,ModelGraphInterface
,RDFReaderF
,RDFWriterF
,Lock
,PrefixMapping
Model wrapper which provides normal access to an underlying model but
also maintains a snapshot of the triples it was last known to contain.
A snapshot action
causes the set of changes between this and the previous snapshot to
be calculated and the cache updated. The snapshot process will also
fire change notification.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.jena.shared.PrefixMapping
PrefixMapping.Factory, PrefixMapping.IllegalPrefixException, PrefixMapping.JenaLockedException
-
Field Summary
Fields inherited from interface org.apache.jena.shared.PrefixMapping
Extended, Standard
-
Constructor Summary
ConstructorsConstructorDescriptionMonitorModel
(Model base) Create a monitor over the given underlying base model. -
Method Summary
Modifier and TypeMethodDescriptionvoid
snapshot()
Compute the differences between the current monitored graph and the last snapshot, forward any changes to registered listeners, then take a new snapshot.void
Compute the differences between the current monitored graph and the last snapshot.Methods inherited from class org.apache.jena.rdf.model.impl.ModelCom
abort, adapt, add, add, add, add, add, add, add, add, add, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addNamespaces, asModel, asNode, asRDFNode, asStatement, asStatements, asStatements, asStatements, begin, calculateInTxn, clearNsPrefixMap, close, commit, contains, contains, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsLiteral, containsResource, createAlt, createAlt, createBag, createBag, createList, createList, createList, createLiteral, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createProperty, createResource, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, enterCriticalSection, executeInTxn, expandPrefix, getAlt, getAlt, getBag, getBag, getGraph, getList, getList, getLock, getModelLock, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, getProperty, getProperty, getProperty, getProperty, getRDFNode, getReader, getRequiredProperty, getRequiredProperty, getResource, getResource, getSeq, getSeq, getWriter, hasNoMappings, independent, intersect, intersection, isClosed, isEmpty, isIsomorphicWith, leaveCriticalSection, listBySubject, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, lock, notifyEvent, numPrefixes, qnameFor, read, read, read, read, read, read, read, register, reifiedToString, remove, remove, remove, remove, remove, remove, removeAll, removeAll, removeNsPrefix, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, size, supportsSetOperations, supportsTransactions, toString, union, unregister, withDefaultMappings, wrapAsResource, write, write, write, write, write, write
-
Constructor Details
-
MonitorModel
Create a monitor over the given underlying base model.
-
-
Method Details
-
snapshot
Compute the differences between the current monitored graph and the last snapshot. The changes will also be forwarded to any listeners. Then take a new snapshot.- Parameters:
additions
- a place in which the set of newly added statements should be noted, can be nulldeletions
- a place in which the set of newly deleted statements should be noted, can be null
-
snapshot
public void snapshot()Compute the differences between the current monitored graph and the last snapshot, forward any changes to registered listeners, then take a new snapshot.
-