1 6 7 package com.hp.hpl.jena.rdf.listeners; 8 9 import com.hp.hpl.jena.rdf.model.*; 10 11 import java.util.*; 12 13 19 public class ChangedListener implements ModelChangedListener 20 { 21 24 private boolean changed = false; 25 28 protected void setChanged() { changed = true; } 29 34 public boolean hasChanged() { try { return changed; } finally { changed = false; } } 35 public void addedStatement( Statement s ) { setChanged(); } 36 public void addedStatements( Statement [] statements ) { setChanged(); } 37 public void addedStatements( List statements ) { setChanged(); } 38 public void addedStatements( StmtIterator statements ) { setChanged(); } 39 public void addedStatements( Model m ) { setChanged(); } 40 public void removedStatement( Statement s ) { setChanged(); } 41 public void removedStatements( Statement [] statements ) { setChanged(); } 42 public void removedStatements( List statements ) { setChanged(); } 43 public void removedStatements( StmtIterator statements ) { setChanged(); } 44 public void removedStatements( Model m ) { setChanged(); } 45 public void notifyEvent( Model m, Object event ) {} 46 } 47 48 49 | Popular Tags |