Package org.apache.jena.util
Class MonitorModel
- 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
public class MonitorModel extends ModelCom
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
-
-
Constructor Summary
Constructors Constructor Description MonitorModel(Model base)
Create a monitor over the given underlying base model.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.void
snapshot(java.util.List<Statement> additions, java.util.List<Statement> deletions)
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, add, add, addLiteral, 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, createLiteral, createLiteral, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createLiteralStatement, createProperty, createProperty, createReifiedStatement, createReifiedStatement, createResource, createResource, createResource, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, createTypedLiteral, difference, enterCriticalSection, executeInTxn, expandPrefix, findTriplesFrom, getAlt, getAlt, getAnyReifiedStatement, getBag, getBag, getGraph, getList, getList, getLock, getModelLock, getNsPrefixMap, getNsPrefixURI, getNsURIPrefix, getProperty, getProperty, getProperty, getProperty, getRDFNode, getReader, getReader, getRequiredProperty, getRequiredProperty, getResource, getResource, getSeq, getSeq, getWriter, getWriter, hasNoMappings, independent, intersect, intersection, isClosed, isEmpty, isIsomorphicWith, isReified, leaveCriticalSection, listBySubject, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listLiteralStatements, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listReifiedStatements, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listResourcesWithProperty, listStatements, listStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, lock, notifyEvent, numPrefixes, qnameFor, query, read, read, read, read, read, read, read, register, reifiedToString, remove, remove, remove, remove, remove, remove, removeAll, removeAll, removeAllReifications, removeNsPrefix, removeReification, samePrefixMappingAs, setNsPrefix, setNsPrefixes, setNsPrefixes, shortForm, size, supportsSetOperations, supportsTransactions, toString, union, unregister, withDefaultMappings, wrapAsResource, write, write, write, write, write, write
-
Methods inherited from class org.apache.jena.enhanced.EnhGraph
asGraph, equals, getNodeAs, hashCode, isIsomorphicWith, setNodeCache
-
-
-
-
Constructor Detail
-
MonitorModel
public MonitorModel(Model base)
Create a monitor over the given underlying base model.
-
-
Method Detail
-
snapshot
public void snapshot(java.util.List<Statement> additions, java.util.List<Statement> deletions)
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.
-
-