org.topbraid.change
Class ReplaceTriplesChange

java.lang.Object
  extended by org.topbraid.core.change.AbstractChange
      extended by org.topbraid.change.ReplaceTriplesChange
All Implemented Interfaces:
IChange

public class ReplaceTriplesChange
extends AbstractChange

A simple operation that just deletes and/or adds a number of triples from a given Graph. The caller must ensure that the operation is fully valid and does not perform redundant operations (such as deleting and adding an equal triple).

Author:
Holger Knublauch

Constructor Summary
ReplaceTriplesChange(com.hp.hpl.jena.graph.Graph targetGraph, java.util.Collection oldTriples, java.util.Collection newTriples)
           
 
Method Summary
 void execute(ISession session, org.eclipse.core.runtime.IProgressMonitor monitor)
          Executes the change.
 
Methods inherited from class org.topbraid.core.change.AbstractChange
check, getImageMetadata, getLabel, isNoop, setImage, setImage, setLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplaceTriplesChange

public ReplaceTriplesChange(com.hp.hpl.jena.graph.Graph targetGraph,
                            java.util.Collection oldTriples,
                            java.util.Collection newTriples)
Method Detail

execute

public void execute(ISession session,
                    org.eclipse.core.runtime.IProgressMonitor monitor)
Description copied from interface: IChange
Executes the change. This should perform the changes to a Jena model. In case of an unexpected state, the method may throw an IllegalStateException.

Parameters:
session - the session to execute the change on
monitor - a progress monitor for longish operations (may be null)