Class StatementListener

java.lang.Object
org.apache.jena.rdf.listeners.StatementListener
All Implemented Interfaces:
ModelChangedListener

public class StatementListener extends Object implements ModelChangedListener
A listener that filters all its listening down to the single-statement level. Users of this class override addedStatement(Statement) and removedStatement(Statement).
  • Constructor Details

    • StatementListener

      public StatementListener()
  • Method Details

    • addedStatement

      public void addedStatement(Statement s)
      Override this to listen to all incoming added statements
      Specified by:
      addedStatement in interface ModelChangedListener
      Parameters:
      s - the statement that has been presented for addition.
    • removedStatement

      public void removedStatement(Statement s)
      Override this to listen to all incoming removed statements
      Specified by:
      removedStatement in interface ModelChangedListener
      Parameters:
      s - the statement that has been presented for removal.
    • addedStatements

      public void addedStatements(Statement[] statements)
      Description copied from interface: ModelChangedListener
      Method to call when an array of statements has been added to the attached model. NOTE. This array need not be == to the array added using Model::add(Statement[]).
      Specified by:
      addedStatements in interface ModelChangedListener
      Parameters:
      statements - the array of added statements
    • addedStatements

      public void addedStatements(List<Statement> statements)
      Description copied from interface: ModelChangedListener
      Method to call when a list of statements has been added to the attached model. NOTE. This list need not be == to the list added using Model::add(List).
      Specified by:
      addedStatements in interface ModelChangedListener
      Parameters:
      statements - the list of statements that has been removed.
    • addedStatements

      public void addedStatements(StmtIterator statements)
      Description copied from interface: ModelChangedListener
      Method to call when a statement iterator has supplied elements to be added to the attached model. statements is a copy of the original iterator.
      Specified by:
      addedStatements in interface ModelChangedListener
    • addedStatements

      public void addedStatements(Model m)
      Description copied from interface: ModelChangedListener
      Method to call when a model has been used to define the statements to be added to our attached model.
      Specified by:
      addedStatements in interface ModelChangedListener
      Parameters:
      m - a model equivalent to [and sharing with] the added model
    • removedStatements

      public void removedStatements(Statement[] statements)
      Description copied from interface: ModelChangedListener
      Method to call when an array of statements has been removed from the attached model. NOTE. This array need not be == to the array added using Model::remove(Statement[]).
      Specified by:
      removedStatements in interface ModelChangedListener
      Parameters:
      statements - the array of removed statements
    • removedStatements

      public void removedStatements(List<Statement> statements)
      Description copied from interface: ModelChangedListener
      Method to call when a list of statements has been deleted from the attached model. NOTE. This list need not be == to the list added using Model::remove(List).
      Specified by:
      removedStatements in interface ModelChangedListener
      Parameters:
      statements - the list of statements that have been removed.
    • removedStatements

      public void removedStatements(StmtIterator statements)
      Description copied from interface: ModelChangedListener
      Method to call when a statement iterator has been used to remove statements from the attached model. The iterator will be a copy, in the correct order, of the iterator supplied for the removal.
      Specified by:
      removedStatements in interface ModelChangedListener
      Parameters:
      statements - a statement-type copy of the updating iterator
    • removedStatements

      public void removedStatements(Model m)
      Description copied from interface: ModelChangedListener
      Method to call when a model has been used to remove statements from our attached model.
      Specified by:
      removedStatements in interface ModelChangedListener
      Parameters:
      m - a model equivalent to [and sharing with] the one removed
    • notifyEvent

      public void notifyEvent(Model m, Object event)
      Specified by:
      notifyEvent in interface ModelChangedListener