com.hp.hpl.jena.graph
Interface BulkUpdateHandler


public interface BulkUpdateHandler

Defines how bulk update may be done on Graphs.

Bulk updates are not necessarily transactions; that is, a bulk update may fail part-way through, leaving some but not all triples added or deleted. However, if a bulk update does not fail (ie throw an exception) then the addition or removal of triples must have been successfully completed in accordance with the operation of the owning graph.

Author:
kers

Method Summary
 void add(Graph g)
          Add all the triples of the given graph into the graph this is handler for.
 void add(Graph g, boolean withReifications)
          Add all the triples of the given graph into the graph this is handler for.
 void add(java.util.Iterator<Triple> it)
          Add all the elements from the iterator into the graph this is handler for.
 void add(java.util.List<Triple> triples)
          Add all the triples in the list into the graph this is handler for.
 void add(Triple[] triples)
          Add all the triples into the graph this is handler for.
 void delete(Graph g)
          Remove all the triples of the given graph from the graph this is handler for.
 void delete(Graph g, boolean withReifications)
          Remove all the triples of the given graph from the graph this is handler for.
 void delete(java.util.Iterator<Triple> it)
          Remove all the triples in the iterator from the graph this is handler for.
 void delete(java.util.List<Triple> triples)
          Remove all the triples in the list from the graph this is handler for.
 void delete(Triple[] triples)
          Remove all the triples from the graph this is handler for.
 void remove(Node s, Node p, Node o)
          Remove all triples that would be delivered by find(s, p, o)
 void removeAll()
          Remove all the statements from a graph.
 

Method Detail

add

void add(Triple[] triples)
Add all the triples into the graph this is handler for.

Parameters:
triples - an array of triples to add

add

void add(java.util.List<Triple> triples)
Add all the triples in the list into the graph this is handler for. Each element of the List must be a Triple.

Parameters:
triples - a list of Triple objects to add

add

void add(java.util.Iterator<Triple> it)
Add all the elements from the iterator into the graph this is handler for. Each element of the iterator must be a Triple. WARNING. An implementation may have to expand the iterator into a data structure containing all the component elements; hence long iterators may be expensive on store.

Parameters:
it - an Iterator delivering Triples

add

void add(Graph g,
         boolean withReifications)
Add all the triples of the given graph into the graph this is handler for. Optionally add g's reified triples.

Parameters:
g - a Graph whose triples are to be added
withReifications - if true, the reified triples of g are added as well

add

void add(Graph g)
Add all the triples of the given graph into the graph this is handler for. Leave this graph's reifications unchanged.

Parameters:
g - a Graph whose triples are to be added

delete

void delete(Triple[] triples)
Remove all the triples from the graph this is handler for.

Parameters:
triples - an array of triples to remove

delete

void delete(java.util.List<Triple> triples)
Remove all the triples in the list from the graph this is handler for. Each element of the List must be a Triple.

Parameters:
triples - a list of triples to remove

delete

void delete(java.util.Iterator<Triple> it)
Remove all the triples in the iterator from the graph this is handler for. Each element from the iterator must be a Triple. WARNING. An implementation may have to expand the iterator into a data structure containing all the component elements; hence long iterators may be expensive on store.

Parameters:
it - an iterator over Triple

delete

void delete(Graph g)
Remove all the triples of the given graph from the graph this is handler for. Do not change the reifications.

Parameters:
g - a graph whose triples are to be removed

delete

void delete(Graph g,
            boolean withReifications)
Remove all the triples of the given graph from the graph this is handler for. Reified triples may optionally be removed.

Parameters:
g - a graph whose triples are to be removed
withReifications - if true, remove g's reifications from this graph

removeAll

void removeAll()
Remove all the statements from a graph.


remove

void remove(Node s,
            Node p,
            Node o)
Remove all triples that would be delivered by find(s, p, o)



Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP