Class CumulativeDeltaModeler
- java.lang.Object
-
- org.apache.jena.rdf.listeners.StatementListener
-
- edu.cornell.mannlib.vitro.webapp.dao.jena.CumulativeDeltaModeler
-
- All Implemented Interfaces:
org.apache.jena.rdf.model.ModelChangedListener
public class CumulativeDeltaModeler extends org.apache.jena.rdf.listeners.StatementListenerThis ModelChangedListener will accumulate all statements added to or removed from the audited model in an additions model and a retractions model. Note that this class attempts to be clever. If a statement is retracted that is already in the additions model, the statement will be removed from the additions model and not added to the retractions model. in this object.- Author:
- bjl23
-
-
Constructor Summary
Constructors Constructor Description CumulativeDeltaModeler()CumulativeDeltaModeler(org.apache.jena.ontology.OntModel ontModel)CumulativeDeltaModeler(org.apache.jena.rdf.model.Model model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddedStatement(org.apache.jena.rdf.model.Statement s)org.apache.jena.rdf.model.ModelgetAdditions()Return a model containing all statements added to the attached modelorg.apache.jena.rdf.model.ModelgetRetractions()Return a model containing all statements retracted from the attached modelvoidremovedStatement(org.apache.jena.rdf.model.Statement s)
-
-
-
Method Detail
-
getAdditions
public org.apache.jena.rdf.model.Model getAdditions()
Return a model containing all statements added to the attached model- Returns:
- additionsModel
-
getRetractions
public org.apache.jena.rdf.model.Model getRetractions()
Return a model containing all statements retracted from the attached model- Returns:
- retractionsModel
-
addedStatement
public void addedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
addedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener- Overrides:
addedStatementin classorg.apache.jena.rdf.listeners.StatementListener
-
removedStatement
public void removedStatement(org.apache.jena.rdf.model.Statement s)
- Specified by:
removedStatementin interfaceorg.apache.jena.rdf.model.ModelChangedListener- Overrides:
removedStatementin classorg.apache.jena.rdf.listeners.StatementListener
-
-