public SimpleBulkUpdateHandler( GraphWithPerform graph ) { this.graph = graph; this.manager = graph.getEventManager(); }
@Override @Deprecated public void add( Triple [] triples ) { for (int i = 0; i < triples.length; i += 1) graph.performAdd( triples[i] ); manager.notifyAddArray( graph, triples ); }
@Override @Deprecated public void delete( Triple [] triples ) { for (int i = 0; i < triples.length; i += 1) graph.performDelete( triples[i] ); manager.notifyDeleteArray( graph, triples ); }
protected void add( List<Triple> triples, boolean notify ) { for (int i = 0; i < triples.size(); i += 1) graph.performAdd( triples.get(i) ); if (notify) manager.notifyAddList( graph, triples ); }
protected void delete( List<Triple> triples, boolean notify ) { for (int i = 0; i < triples.size(); i += 1) graph.performDelete( triples.get(i) ); if (notify) manager.notifyDeleteList( graph, triples ); }
public WrappedBulkUpdateHandler( GraphWithPerform graph, BulkUpdateHandler base ) { this.graph = graph; this.base = base; this.manager = graph.getEventManager(); }
private static void addIteratorWorker( Graph graph, Iterator<Triple> it ) { List<Triple> s = IteratorCollection.iteratorToList( it ); if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s ) g.performAdd(t) ; } else { for (Triple t : s ) graph.add(t) ; } }
private static void deleteIteratorWorker( Graph graph, Iterator<Triple> it ) { List<Triple> s = IteratorCollection.iteratorToList( it ); if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s ) g.performDelete(t) ; } else { for (Triple t : s ) graph.delete(t) ; } }
public static void add(Graph graph, List<Triple> triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples) g.performAdd(t) ; graph.getEventManager().notifyAddList(graph, triples) ; } else { for (Triple t : triples) graph.add(t) ; } }
public static void delete(Graph graph, List<Triple> triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples ) g.performDelete(t) ; graph.getEventManager().notifyDeleteList(graph, triples) ; } else { for (Triple t : triples ) graph.delete(t) ; } }
public static void add(Graph graph, Triple[] triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples ) g.performAdd(t) ; graph.getEventManager().notifyAddArray(graph, triples) ; } else { for (Triple t : triples ) graph.add(t) ; } }
public static void delete(Graph graph, Triple[] triples) { if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : triples ) g.performDelete(t) ; graph.getEventManager().notifyDeleteArray(graph, triples) ; } else { for (Triple t : triples ) graph.delete(t) ; } }
public static void add(Graph graph, Iterator<Triple> it) { // Materialize to avoid ConcurrentModificationException. List<Triple> s = IteratorCollection.iteratorToList(it) ; if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s) g.performAdd(t) ; graph.getEventManager().notifyAddIterator(graph, s) ; } else { for (Triple t : s) graph.add(t) ; } }
public static void delete(Graph graph, Iterator<Triple> it) { // Materialize to avoid ConcurrentModificationException. List<Triple> s = IteratorCollection.iteratorToList(it) ; if ( OldStyle && graph instanceof GraphWithPerform ) { GraphWithPerform g = (GraphWithPerform)graph ; for (Triple t : s) g.performDelete(t) ; graph.getEventManager().notifyDeleteIterator(graph, s) ; } else { for (Triple t : s) graph.delete(t) ; } }