org.topbraid.change
Class SwapObjectChange

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

public class SwapObjectChange
extends AbstractReplaceObjectChange

Swaps objects of two statements

Author:
Gokhan H. Soydan

Constructor Summary
SwapObjectChange(com.hp.hpl.jena.rdf.model.Statement firstStatement, com.hp.hpl.jena.rdf.model.Statement secondStatement)
           
 
Method Summary
 boolean canDelete()
           
 void execute(ISession session, org.eclipse.core.runtime.IProgressMonitor monitor)
          Executes the change.
 
Methods inherited from class org.topbraid.change.AbstractReplaceObjectChange
replaceObject, replaceObject
 
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

SwapObjectChange

public SwapObjectChange(com.hp.hpl.jena.rdf.model.Statement firstStatement,
                        com.hp.hpl.jena.rdf.model.Statement secondStatement)
Method Detail

canDelete

public boolean canDelete()

execute

public void execute(ISession session,
                    org.eclipse.core.runtime.IProgressMonitor monitor)
             throws java.lang.InterruptedException
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)
Throws:
java.lang.InterruptedException - if the user has cancelled the execution, e.g. using the provided monitor