1 6 7 package com.hp.hpl.jena.rdf.listeners; 8 9 import com.hp.hpl.jena.rdf.model.*; 10 import java.util.*; 11 12 18 public class StatementListener implements ModelChangedListener 19 { 20 23 public void addedStatement( Statement s ) {} 24 27 public void removedStatement( Statement s ) {} 28 29 public void addedStatements( Statement [] statements ) 30 { for (int i = 0; i < statements.length; i += 1) addedStatement( statements[i] ); } 31 public void addedStatements( List statements ) 32 { for (int i = 0; i < statements.size(); i += 1) addedStatement( (Statement) statements.get(i) ); } 33 public void addedStatements( StmtIterator statements ) 34 { while (statements.hasNext()) addedStatement( statements.nextStatement() ); } 35 public void addedStatements( Model m ) 36 { addedStatements( m.listStatements() ); } 37 public void removedStatements( Statement [] statements ) 38 { for (int i = 0; i < statements.length; i += 1) removedStatement( statements[i] ); } 39 public void removedStatements( List statements ) 40 { for (int i = 0; i < statements.size(); i += 1) removedStatement( (Statement) statements.get(i) ); } 41 public void removedStatements( StmtIterator statements ) 42 { while (statements.hasNext()) removedStatement( statements.nextStatement() ); } 43 public void removedStatements( Model m ) 44 { removedStatements( m.listStatements() ); } 45 public void notifyEvent( Model m, Object event ) 46 {} 47 } 48 49 50 | Popular Tags |