Class CumulativeDeltaModeler

  • All Implemented Interfaces:
    org.apache.jena.rdf.model.ModelChangedListener

    public class CumulativeDeltaModeler
    extends org.apache.jena.rdf.listeners.StatementListener
    This 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 Detail

      • CumulativeDeltaModeler

        public CumulativeDeltaModeler()
      • CumulativeDeltaModeler

        public CumulativeDeltaModeler​(org.apache.jena.rdf.model.Model model)
      • CumulativeDeltaModeler

        public CumulativeDeltaModeler​(org.apache.jena.ontology.OntModel ontModel)
    • 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:
        addedStatement in interface org.apache.jena.rdf.model.ModelChangedListener
        Overrides:
        addedStatement in class org.apache.jena.rdf.listeners.StatementListener
      • removedStatement

        public void removedStatement​(org.apache.jena.rdf.model.Statement s)
        Specified by:
        removedStatement in interface org.apache.jena.rdf.model.ModelChangedListener
        Overrides:
        removedStatement in class org.apache.jena.rdf.listeners.StatementListener